example Code SPARQL

Example code SPARQL

following below :


PREFIX dcterms: http://purl.org/dc/terms/>
PREFIX owl: http://www.w3.org/2002/07/owl#>
PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: http://www.w3.org/2001/XMLSchema#>
PREFIX geo: http://aims.fao.org/aos/geopolitical.owl#>


SELECT * WHERE { ?s rdf:type geo:self_governing . }


PREFIX dcterms: <http://purl.org/dc/terms/&gt;
PREFIX owl: <http://www.w3.org/2002/07/owl#&gt;
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#&gt;
PREFIX geo: <http://aims.fao.org/aos/geopolitical.owl#&gt;

SELECT * WHERE { ?s rdf:type geo:self_governing . ?s geo:codeISO3 ?code }

PREFIX geo: <http://aims.fao.org/aos/geopolitical.owl#&gt;
PREFIX dcterms: <http://purl.org/dc/terms/&gt;
PREFIX owl: <http://www.w3.org/2002/07/owl#&gt;
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#&gt;

SELECT ?x WHERE { ?x rdf:type geo:non_self_governing . }

PREFIX abc: <http://aims.fao.org/aos/geopolitical.owl#&gt;
PREFIX dcterms: <http://purl.org/dc/terms/&gt;
PREFIX owl: <http://www.w3.org/2002/07/owl#&gt;
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#&gt;

SELECT ?x ?code WHERE { ?x rdf:type abc:non_self_governing . ?x abc:codeGAUL ?code }

PREFIX abc: <http://aims.fao.org/aos/geopolitical.owl#&gt;
PREFIX dcterms: <http://purl.org/dc/terms/&gt;
PREFIX owl: <http://www.w3.org/2002/07/owl#&gt;
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#&gt;

SELECT * WHERE { ?s rdf:type abc:non_self_governing . ?s abc:isAdministeredBy ?is }

 

Advertisements