Skip to content

Should blank nodes be ignored in member assertion by default? #248

@tpluscode

Description

@tpluscode

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions