- 更新日時:
- 2015/03/24 18:18:00 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/QueryPathGenerator.java
r228 r248 18 18 private RDFSchemaAnalyzer analyzer = null; 19 19 private OWLClassGraph graph; 20 private boolean askcheck; 20 21 21 22 private static final String CDIR = "cdata"; … … 50 51 factory = new RDFSchemaAnalyzerFactory(CDIR); 51 52 } 52 53 53 54 public QueryPathGenerator(String sparqlEndpoint){ 54 55 factory = new RDFSchemaAnalyzerFactory(CDIR); 55 56 setSPARQLendpoint(sparqlEndpoint); 56 setOWLClassGraph();57 57 } 58 58 59 public void setOWLClassGraph(String startClass){ 60 graph = new OWLClassGraph(analyzer, sparqlEndpoint, startClass, askcheck); 61 } 62 63 /* 59 64 public QueryPathGenerator(String sparqlEndpoint, String crawlFileName){ 60 65 factory = new RDFSchemaAnalyzerFactory(crawlFileName); … … 62 67 setOWLClassGraph(); 63 68 } 69 */ 64 70 65 71 public SClass[] getClasses(String keyword){ … … 79 85 } 80 86 81 public Path[] getPaths(String startClass, String endClass, boolean countLink){ 87 public Path[] getPaths(String startClass, String endClass, boolean askcheck){ 88 this.askcheck = askcheck; 82 89 if ( graph == null ){ 83 setOWLClassGraph(); 90 //System.err.println("Class graph is null."); 91 setOWLClassGraph(startClass); 84 92 } 85 graph.setPartClassGraph(analyzer, startClass);86 93 return graph.getPaths(startClass, endClass); 87 //return graph.getPaths(startClass, endClass, analyzer);88 //return graph.getPaths_old(analyzer, true, startClass, endClass);89 94 } 90 95 … … 135 140 } 136 141 142 /* 137 143 private void setOWLClassGraph(){ 138 graph = new OWLClassGraph(analyzer); 139 } 144 //graph = new OWLClassGraph(analyzer); 145 graph = new OWLClassGraph(); 146 }*/ 140 147 141 148 public OWLClassGraph getOWLClassGraph(){ 142 if ( graph == null ){149 /*if ( graph == null ){ 143 150 graph = new OWLClassGraph(analyzer); 144 } 151 }*/ 145 152 return graph; 146 153 }