Replace SPARQL restrictions with restrictions on property paths
At the moment, dataset restrictions are expressed as SPARQL patterns.
Example:
{{?a rdf:type dbpedia:Film} UNION {?a rdf:type dbpedia:Musical}}
?a <http://dbpedia.org/property/language> ?lang .
FILTER(str(?lang) = "English")
This is not ideal for two reasons:
New Syntax from LDIF:
Restrictions are expressed as a combination of conditions. A condition consists of a path and a list of values. Multiple conditions can be combined using the
Example:
Example:
{{?a rdf:type dbpedia:Film} UNION {?a rdf:type dbpedia:Musical}}
?a <http://dbpedia.org/property/language> ?lang .
FILTER(str(?lang) = "English")
This is not ideal for two reasons:
- Difficult to support non-SPARQL datasources
- Mixture of vocabularies
New Syntax from LDIF:
Restrictions are expressed as a combination of conditions. A condition consists of a path and a list of values. Multiple conditions can be combined using the
and
and or
operators.Example:
<Restriction>
<And>
<Condition path="/rdf:type">
<Uri>dbpedia:Film</Uri>
<Uri>dbpedia:Musical</Uri>
</Condition>
<Condition path="/dbpedia:language">
<Literal>English</Literal>
</Condition>
</And>
</Condition>
Leave a comment
on 2011-04-29 11:23 *
By Robert Isele
Description changed from At the moment, dataset rest... to At the moment, dataset rest...