sparql - How to get such data as abstraction, location and link for image in Dbpedia? -
i trying data museum not successfull. code. know name of museum, want data museum
prefix dbpedia: <http://dbpedia.org/resource/> prefix dbpedia-owl: <http://dbpedia.org/ontology/> prefix dbpprop: <http://dbpedia.org/property/> select ?abstract ?location { ?architectural_structure rdf:type dbpedia-owl:museum . ?architectural_structure dbpedia-owl:location dbpedia:taganrog . ?architectural_structure dbpprop:name dbpedia:chekhov_shop . }
the dbpprop:name
have selected (dbpedia:chekhov_shop
) in fact string. if @ dbpedia page has been defined the chekhov shop
. therefore, suggestion filter query based on name displayed:
prefix dbpedia: <http://dbpedia.org/resource/> prefix dbpedia-owl: <http://dbpedia.org/ontology/> prefix dbpprop: <http://dbpedia.org/property/> select * { ?architectural_structure rdf:type dbpedia-owl:museum . ?architectural_structure dbpedia-owl:location dbpedia:taganrog . ?architectural_structure dbpprop:name ?name. filter (str(?name)="the chekhov shop") }
and if need more information specific architectural structure, start exploring. example,
prefix dbpedia: <http://dbpedia.org/resource/> prefix dbpedia-owl: <http://dbpedia.org/ontology/> prefix dbpprop: <http://dbpedia.org/property/> select distinct * { ?architectural_structure rdf:type dbpedia-owl:museum . ?architectural_structure dbpedia-owl:location dbpedia:taganrog . ?architectural_structure dbpprop:name ?name. ?architectural_structure dbpprop:location ?location. ?architectural_structure dbpedia-owl:abstract ?abstract. filter (str(?name)="the chekhov shop") }
in general, when faced triple store try find ?o ?p ?s
, see need put specific predicate.
Comments
Post a Comment