HydraCG / extensions

3 stars 1 forks source link

Additional terms using OWL semantics #16

Open tpluscode opened 3 years ago

tpluscode commented 3 years ago

In addition to describing data structured using OWL (#13), which I find not too useful, I would also propose to define additional modelling terms to allow for additional ways of defining resource semantics.

For starters I propose two inverse properties, which I have been using to declare operations

hex:supportedByClass
  a rdf:Property ;
  owl:inverseOf hydra:supportedOperation ;
  rdfs:domain hydra:Operation ;
  rdfs:range hydra:Class ;
  rdfs:comment "Allows creating supported operations with reverse relation with a hydra:Class"
.

hex:supportedByProperty
  a rdf:Property ;
  owl:inverseOf hydra:supportedOperation ;
  rdfs:domain hydra:Operation ;
  rdfs:range hydra:Link ;
  rdfs:label "Operation supported by a (link) property" ;
  rdfs:comment "Allows creating supported operations with reverse relation with a hydra:Link"
.

This way I add operations to external terms, such as having a PUT on schema:Person without using it as subject, instead making such an operation a resource in its own right

<schema:Person/PutOperation>
  a hydra:Operation , schema:UpdateAction ;
  hex:supportedByClass schema:Person ;
  hydra:method "PUT" ;
.

Obviously, this will only work with server which understands OWL semantics but the client does not need any modifications.

alien-mcl commented 3 years ago

I was aiming to have that as a separate extension. I envisioned both Hydra in OWL and Hydra in SHACL to be two separate "extensions" describing Hydra terms in details using adequate constructs so it is possible to validate or represent as diagrams. I also envisioned using Hydra with SHACL as another separate extension.

As for Hydra in OWL applicability - I'd love to increase adoption as much as possible - having Hydra described in details in OWL I hope to create some interests in old-school RDF based developers