Property Paths Update (negated property classes)

This is Doug Reid's suggestion of:

?x !(rdf:type|^rdf:type) ?y

or find all connections between ?x and ?y that are not via rdf:type, in 
either direction.  This should extend to longer paths.

?x !(rdf:type|^rdf:type)* ?y

# Added extra () for clarity of precedence.
# ! binds tighter than * so it's not needed
?x (!(rdf:type|^rdf:type))* ?y


The case of

?x !(rdf:type|rdfs:label) ?y

without use of ^ works quite easily.  I am wondering about the need for 
reversed properties

A safe course of action would be to allow the case of forward negated 
sets (^ can be applied outside the pattern).  It is quite useful to 
match all but know unwanted properties.

Some cases of "(^)" can be written in other forms (to get semantically 
equivalent results - not exactly the same e.g. ?x/:a ?y/:b and ?x/:b 
?y/:a) but I haven't discovered whether this covers all cases or not.

 Andy

Received on Tuesday, 16 March 2010 10:17:29 UTC