user221458
user221458

Reputation: 736

Get only properties of a Dbpedia subject

I am currently retrieving information about a subject using following query:

DESCRIBE <http://dbpedia.org/resource/Albert_Einstein>

How can I edit this query to only get information where predicate is dbpedia property (http://dbpedia.org/property/*)?

Upvotes: 0

Views: 481

Answers (1)

AndyS
AndyS

Reputation: 16630

To get one particular property:

SELECT ?o { <http://dbpedia.org/resource/Albert_Einstein> <http://dbpedia.org/property/...> ?o }

or to get all properties beginning with http://dbpedia.org/property/

SELECT ?p ?o { 
  <http://dbpedia.org/resource/Albert_Einstein> ?p ?o .
  FILTER(STRSTARTS(str(?p), "http://dbpedia.org/property/")))
}

Upvotes: 3

Related Questions