SPARQL DESCRIBE query
As stated by @Thomas, DESCRIBE
is underspecified a bit by the standard, hence you will get inconsistent results. However, using CONSTRUCT
, you can return what many engines will return for DESCRIBE
, i.e. the SPO plus the OPS, and do so consistently across services. Here a query that does this:
CONSTRUCT {
?person ?p ?o .
?s ?p1 ?person .
}
WHERE {
?person rdf:type foaf:Person .
FILTER EXISTS { ?person owl:sameAs ?sameAs } .
?person ?p ?o .
?s ?p1 ?person .
}
This gets you an RDF graph that "describes" the resources bound to ?person
, namely all properties of ?person
and all properties whose value (object) is ?person.
The "received resources" without skos:prefLabel
or skos:Concept
are probably related to a resource that meets your requirements.
The SPARQL DESCRIBE query does not actually return resources matched by the graph pattern of the query, but an RDF graph that "describes" those resources. It is up to the sparql service to choose what triples are included to describe a resource. (see the standard below)
The W3C Proposed Recommendation on SPARQL 1.1 says:
The DESCRIBE form returns a single result RDF graph containing RDF data about resources. [...] The description is determined by the query service.
So, the resources you unexpectedly receive maybe describing the resources you actually want. To investigate your issue: Check the triples you should actually receive for a relation to your wanted resource. A good way is to start with LIMIT 1
to see the effect of DESCRIBE queries.
Maybe a SELECT query is what you need? It returns only the resources matched by the graph pattern.