Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace query:include with SHACL #251

Open
tpluscode opened this issue Jan 23, 2022 · 0 comments
Open

Replace query:include with SHACL #251

tpluscode opened this issue Jan 23, 2022 · 0 comments

Comments

@tpluscode
Copy link
Member

tpluscode commented Jan 23, 2022

Currently the use of query:include requires that additional assertions are made about a class, which is likely a term from an external vocabulary. For example to load friends when a foaf:Person resource is loaded

foaf:Person 
  a hydra:Class ;             # this changes the semantics of external resource
  hydra:apiDocumentation <> ; # this is necessary to be picked up by ApiDocumentation loader
  query:include 
    [ query:path foaf:knows ] ,
    [ query:path foaf:account ] ;
.

Instead, it would be beneficial to create an independent shape resource (subclass of sh:Shape) which would use SHACL's targets and semantics for defining how to load representations. Later SHACL Advanced Features could also be added.

</api/Peron#representationShape>
  a hex:RepresentationShape ; # rdfs:subClassOf sh:Shape
  sh:targetClass foaf:Person ;
  sh:property
   [ sh:path foaf:knows ] ,
   [ sh:path foaf:account ] .

This should be incorporated into the load query but possibly could remain a separate DESCRIBE as it is now implemented

DESCRIBE ?this ?include {
  ?this a foaf:Person .

  {
    ?this foaf:knows ?include
  }
  UNION
  {
    ?this foaf:account ?include
  }
}
VALUES ?this { <...> }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant