- 更新日時:
- 2015/04/08 17:05:11 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/EndpointAccess.java
r248 r251 16 16 */ 17 17 public class EndpointAccess { 18 static public boolean checkPath(Path path, String sparqlEndpoint){ 19 return checkPath(path.getStartClass(), path.getClassLinks(), sparqlEndpoint); 20 } 21 18 22 static public boolean checkPath(String startClass, List<ClassLink> classlinks, String sparqlEndpoint){ 19 23 // SPARQL Query construction … … 45 49 String sparqlQuery = queryStr.toString(); 46 50 Query query = QueryFactory.create(sparqlQuery, Syntax.syntaxARQ); 47 /*48 QueryEngineHTTP httpQuery = new QueryEngineHTTP(sparqlEndpoint, query);49 boolean res = httpQuery.execAsk();50 httpQuery.close();51 */52 51 QueryExecution qexec = QueryExecutionFactory.sparqlService(sparqlEndpoint, query); 53 52 boolean res = qexec.execAsk(); … … 104 103 queryStr.append("ASK { \n"); 105 104 106 queryStr.append("?n1 ").append(" rdf:type <").append(ocg.labels.get(node1)).append(">.\n");107 queryStr.append("?n2 ").append(" rdf:type <").append(ocg.labels.get(node2)).append(">.\n");108 queryStr.append("?n3 ").append(" rdf:type <").append(ocg.labels.get(node3)).append(">.\n");105 queryStr.append("?n1縲rdf:type ?c1 .\n"); 106 queryStr.append("?n2縲rdf:type ?c2 .\n"); 107 queryStr.append("?n3縲rdf:type ?c3 .\n"); 109 108 110 109 queryStr.append("{{"); … … 119 118 queryStr.append("?n3").append(" ").append("?p2").append(" ") 120 119 .append("?n2").append(" }}\n"); 121 120 121 queryStr.append("VALUES (?c1 ?c2 ?c3){ \n"); 122 queryStr.append("<").append(ocg.labels.get(node1)).append("> \n"); 123 queryStr.append("<").append(ocg.labels.get(node2)).append("> \n"); 124 queryStr.append("<").append(ocg.labels.get(node3)).append("> \n"); 125 queryStr.append("} \n"); 122 126 queryStr.append("} \n"); 123 127 … … 126 130 System.out.println(sparqlQuery); 127 131 Query query = QueryFactory.create(sparqlQuery, Syntax.syntaxARQ); 128 /*129 QueryEngineHTTP httpQuery = new QueryEngineHTTP(sparqlEndpoint, query);130 boolean res = httpQuery.execAsk();131 httpQuery.close();132 */133 132 QueryExecution qexec = QueryExecutionFactory.sparqlService(sparqlEndpoint, query); 134 133 boolean res = qexec.execAsk();