Bonsoir,
j'ai cette requete :
lors de l’exécution, il s'affiche une petite erreur.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 String queryString ="SELECT ?nom ?prenom WHERE { ?Homme <http://lacot.org/public/owl/famille#prenom> ?Paul." + "?Homme <http://lacot.org/public/owl/famille#nom> ?nom ." + "}"; Query query = QueryFactory.create(queryString); // Execute the query and obtain results QueryExecution qe = QueryExecutionFactory.create(query, model); com.hp.hpl.jena.query.ResultSet rs = qe.execSelect(); for ( ; rs.hasNext() ; ){ QuerySolution soln = ((com.hp.hpl.jena.query.ResultSet) rs).nextSolution() ; RDFNode c = soln.get("nom") ; String n=c.asNode().getLocalName(); System.out.println(n); RDFNode b = soln.get("prenom") ; String p=b.asNode().getLocalName(); System.out.println(p);
En googlant j'ai pas trouvé de solutions, y t-il quelqu'un qui a une idée?Exception in thread "main" java.lang.UnsupportedOperationException: "dupond"^^http://www.w3.org/2001/XMLSchema#String is not a URI node
at com.hp.hpl.jena.graph.Node.getLocalName(Node.java:219)
at Select.main(Select.java:115)
Merci d'avance
Partager