RDF

Fermé
raniajulie Messages postés 3 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 14 mai 2017 - 14 mai 2017 à 13:01
Bonjour tout le monde,

J'ai une question, j'ai écris une requête sparql en java et j'ai eu un résultat en RDF que je n'ai pas compris. Est ce que quelqu'un pourra m'expliquer ce résultat et me montrer comment je le manipule. Merci de me répondre le plus vite possible car j'ai vraiment besoin de la réponse.

voilà le code java de la requête:


import javax.management.Query;

import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QueryFactory;
import org.apache.jena.rdf.model.Model;


public class essai {
	
	public void BuildRDF(String terme){
		String queryString="PREFIX : <http://dbpedia.org/resource/>"
				+ "CONSTRUCT {: ?p ?o} WHERE {"
				+ ":"+terme+"?p ?o"
				+"} LIMIT 10";
				 org.apache.jena.query.Query query = QueryFactory.create(queryString);
				 QueryExecution qexec = QueryExecutionFactory.sparqlService("http://dbpedia.org/sparql", query);
                 System.out.println("coucou");
                 Model model = qexec.execConstruct();
                 model.write(System.out, "RDF/XML-ABBREV");
                 model.write(System.out, "N-TRIPLE");        
	}

	public static void main(String[] args) {

essai e= new essai();
e.BuildRDF("Paris");	
	}
}



voilà le résultat de la requête:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:wikidata="http://www.wikidata.org/entity/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:dbo="http://dbpedia.org/ontology/"
xmlns:schema="http://schema.org/"
xmlns:umbel-rc="http://umbel.org/umbel/rc/">
<owl:Thing rdf:about="http://dbpedia.org/resource/">
<rdf:type rdf:resource="http://dbpedia.org/ontology/Location"/>
<rdf:type rdf:resource="http://www.wikidata.org/entity/Q486972"/>
<rdf:type rdf:resource="http://schema.org/Place"/>
<rdf:type rdf:resource="http://dbpedia.org/ontology/Place"/>
<rdf:type rdf:resource="http://dbpedia.org/ontology/Settlement"/>
<rdf:type rdf:resource="http://umbel.org/umbel/rc/PopulatedPlace"/>
<rdf:type rdf:resource="http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing"/>
<rdf:type rdf:resource="http://umbel.org/umbel/rc/Location_Underspecified"/>
<rdf:type rdf:resource="http://dbpedia.org/ontology/PopulatedPlace"/>
</owl:Thing>
</rdf:RDF>
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Location> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.wikidata.org/entity/Q486972> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Place> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Place> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Settlement> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://umbel.org/umbel/rc/PopulatedPlace> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://umbel.org/umbel/rc/Location_Underspecified> .
<http://dbpedia.org/resource/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/PopulatedPlace> .


Cordialement.