Open VladimirAlexiev opened 4 years ago
@afs are there RDF props to access these?
There is a general mechanism to get direct forms:
urn:x-hp-direct-predicate:http_//www.w3.org/2000/01/rdf-schema#subClassOf
It can be used via a prefix.
Often it is done by having the inference and base data graphs available in the same dataset so it is a matter of using GRAPH
.
Often it is done by having the inference and base data graphs available
I described this as a Workaround above (Q2). Let me clarify: given these triples
:x :p :y.
:p rdfs:domain :a.
:a rdfs:subClassOf :b.
An RDFS inferencer will infer:
:x rdf:type :a. # domain
:x rdf:type :b. # subclass
:a rdfs:subClassOf :a. # reflexivity
:b rdfs:subClassOf :b. # reflexivity
But I'd like only these as "direct":
:x sesame:directType :a. # domain
:a sesame:directSubClassOf :b. # explicit
(This is an addition to the RDFS vocab not a SPARQL feature, but I still think this group is an appropriate forum to post such addition.)
Why?
rdfs:subClassOf
,rdfs:subPropertyOf
are reflexive and transitive, andrdf:type
is transitive over subClassOf.But reflexivity is most often useless, and having the direct (step, non-transitive) variants of such properties is useful in many situations, eg:
Previous work
sesame:directSubClassOf, directType and directSubPropertyOf
:directSubPropertyOf
anddirectRDFType
.Workarounds
One could hack it with complex and inefficient queries like this:
an approximation is also possible by using Entailment Regimes or vendor specific mechanisms like
onto:explicit
, eg