-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Proposal: the use of SPARQL Constraints to test for cycles. Which works for the test cases in LV.
Also, shouldn't there be a test case for cyclical fields to ensure all cases are covered?
rmlsh:parentCyclesShape a sh:NodeShape ;
sh:targetSubjectsOf rml:viewOn ;
sh:targetSubjectsOf rml:field ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:message "There must be no cycles via rml:viewOn or rml:Field." ;
sh:select """
PREFIX rml: <http://w3id.org/rml/>
SELECT ?this
WHERE {
?this a rml:LogicalView .
?this (rml:viewOn|rml:field)+ ?this .
}
""" ;
] .
rmlsh:joinCyclesShape a sh:NodeShape ;
sh:targetSubjectsOf rml:viewOn ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:message "There must be no cycles via rml:viewOn and rml:leftJoin or rml:innerJoin." ;
sh:select """
PREFIX rml: <http://w3id.org/rml/>
SELECT ?this
WHERE {
?this a rml:LogicalView .
?this ((rml:leftJoin|rml:innerJoin)/rml:parentLogicalView)+ ?this .
}
""" ;
] .