- 更新日時:
- 2014/12/19 18:01:25 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/QueryPathGenerator.java
r204 r221 17 17 private RDFSchemaAnalyzerFactory factory = null; 18 18 private RDFSchemaAnalyzer analyzer = null; 19 //private OWLClassGraph graph;19 private OWLClassGraph graph; 20 20 //private PathMatrix matrix = null; 21 21 … … 43 43 //QueryPathGenerator qpg = new QueryPathGenerator(sp, "c:\\cdata"); 44 44 QueryPathGenerator qpg1 = new QueryPathGenerator(sp, "cdata/"); 45 //qpg1.testOWLClassGraph(); 45 46 //SClass[] cl = qpg.getClasses(null); 46 47 } … … 53 54 factory = new RDFSchemaAnalyzerFactory(CDIR); 54 55 setSPARQLendpoint(sparqlEndpoint); 56 setOWLClassGraph(); 55 57 } 56 58 … … 58 60 factory = new RDFSchemaAnalyzerFactory(crawlFileName); 59 61 setSPARQLendpoint(sparqlEndpoint); 62 setOWLClassGraph(); 60 63 } 61 64 … … 77 80 78 81 public Path[] getPaths(String startClass, String endClass, boolean countLink){ 79 if ( analyzer== null ){80 System.err.println("ERROR. SPARQL endpoint is not decided.");82 if ( graph == null ){ 83 setOWLClassGraph(); 81 84 } 82 OWLClassGraph graph = new OWLClassGraph(startClass, endClass);83 return graph.getPaths(analyzer, countLink);85 return graph.getPaths(startClass, endClass); 86 //return graph.getPaths_old(analyzer, true, startClass, endClass); 84 87 } 85 88 … … 129 132 return label; 130 133 } 134 135 public void setOWLClassGraph(){ 136 graph = new OWLClassGraph(analyzer); 137 } 138 139 public OWLClassGraph getOWLClassGraph(){ 140 if ( graph == null ){ 141 graph = new OWLClassGraph(analyzer); 142 } 143 return graph; 144 } 131 145 }