Open labra opened 5 years ago
The current shape map specification allows node selectors like:
{ FOCUS rdf:type :Person}@<PersonShape>
to select all nodes that have type :Person to be checked as <PersonShape>.
:Person
<PersonShape>
It would be helpful to extend the grammar of node selectors to allow SPARQL property paths apart of single iris.
For example:
{ FOCUS rdfs:subClassOf*/rdf:type :Person}@<PersonShape>
The Shaclex implementation already supports this feature.
The grammar employed can be seen here
The relevant parts are in lines:
triplePattern : '{' KW_FOCUS path (objectTerm | '_' ) '}' # focusSubject | '{' (subjectTerm | '_') path KW_FOCUS '}' # focusObject ; status : negation | questionMark ; reason : '/' string ; jsonAttributes : '$' ; // TODO // SPARQL Grammar rule 82 path : pathAlternative ; pathAlternative : pathSequence ( '|' pathSequence ) * ; pathSequence : pathEltOrInverse ( '/' pathEltOrInverse ) * ; pathEltOrInverse : pathElt | inverse pathElt ; inverse : '^' ; pathElt : pathPrimary pathMod? ; // Todo: Add pathNegatedPrimarySet pathPrimary : nodeIri | rdfType | '(' path ')' ; pathMod : '*' # star | '?' # optional | '+' # plus ;
The current shape map specification allows node selectors like:
to select all nodes that have type
:Person
to be checked as<PersonShape>
.It would be helpful to extend the grammar of node selectors to allow SPARQL property paths apart of single iris.
For example:
The Shaclex implementation already supports this feature.
The grammar employed can be seen here
The relevant parts are in lines: