Describe the requirement
I have been working with member assertions lately and I figured that in the current design they do not make sense when their subject/property/object are blank nodes
Hydra-agnostic example
In my particular example, I wanted to express a collection of languages in which known books are written. In SPARQL I can express this as
SELECT ?language {
?book dcterms:language ?language .
?book a bibo:Book .
}
To turn that into a member assertion, I first got hydra:property dcterm:language but the hydra:subject needed to be something that expresses more patterns.
I used SHACL to create a variable for the ?book in query. My custom implementation converts that into query patterns above
<book-languages>
hydra:memberAssertion
[
hydra:property dcterms:language ;
hydra:subject
[
a sh:NodeShape ;
sh:targetClass bibo:Book ;
] ;
] ;
.
Proposed solutions
There is nothing in the spec that disallows that but I figured that a blank node has potentially undetermined meaning for a generic client or server. I propose that we explicitly state that if the hydra:subject/predicate/object is a blank node it SHOULD be ignored by a generic client, unless they explicitly know how to support that particular node (such as sh:NodeShape here).
That is to prevent queries like []dcterms:language ?language .
Further work
I also propose to describe the use of SHACL or OWL in their respective extensions.
Describe the requirement
I have been working with member assertions lately and I figured that in the current design they do not make sense when their
subject/property/objectare blank nodesHydra-agnostic example
In my particular example, I wanted to express a collection of languages in which known books are written. In SPARQL I can express this as
To turn that into a member assertion, I first got
hydra:property dcterm:languagebut thehydra:subjectneeded to be something that expresses more patterns.I used SHACL to create a variable for the
?bookin query. My custom implementation converts that into query patterns aboveProposed solutions
There is nothing in the spec that disallows that but I figured that a blank node has potentially undetermined meaning for a generic client or server. I propose that we explicitly state that if the
hydra:subject/predicate/objectis a blank node it SHOULD be ignored by a generic client, unless they explicitly know how to support that particular node (such assh:NodeShapehere).That is to prevent queries like
[]dcterms:language ?language .Further work
I also propose to describe the use of SHACL or OWL in their respective extensions.