1. Remplace :
?film dbpprop:name "Toy story".
Par :
?film dbpprop:name "Toy Story"@en.
(attention aux majuscules / minuscules, et les infos sont en langue anglaise).
Et certaines propriétés ne sont sans doute pas renseignées, donc met tous tes critères entre OPTIONAL :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbpprop:<http://dbpedia.org/property/>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
select * where {
?film rdf:type <http://dbpedia.org/ontology/Film>.
?film dbpprop:name "Toy Story"@en.
OPTIONAL { ?film dbpprop:title ?title. }
OPTIONAL { ?film dbpedia-owl:cinematography ?cinematography. }
OPTIONAL { ?film dbpedia-owl:director ?director. }
OPTIONAL { ?film dbpedia-owl:editing ?editing. }
OPTIONAL { ?film dbpedia-owl:musicComposer ?musicComposer. }
OPTIONAL { ?film dbpedia-owl:starring ?starring. }
OPTIONAL { ?film dbpedia-owl:writer ?writer. }
OPTIONAL { ?film dbpprop:artist ?artist. }
OPTIONAL { ?film dbpprop:country ?country. }
OPTIONAL { ?film dbpprop:distributor ?distributor. }
OPTIONAL { ?film dcterms:subject ?subject. }
} |
Ceci étant dit ça ne me parait pas une bonne approche car le résultat te donne le produit cartesien entre toutes les variables, tu as donc un tableau de résultats très long.
J'utiliserai plutôt un DESCRIBE :
DESCRIBE <http://dbpedia.org/resource/Toy_Story>
Partager