チェンジセット 291 : SPARQLBuilderWWW
- 更新日時:
- 2016/06/24 16:04:08 (8 年 前)
- パス:
- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder
- ファイル:
-
- 3 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r283 r291 347 347 return prob; 348 348 } 349 350 349 } -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/QueryPathGenerator.java
r284 r291 7 7 package org.biohackathon.SPARQLBuilder.OWL; 8 8 9 import java.io.*;9 //import java.io.*; 10 10 import java.util.*; 11 11 … … 107 107 } 108 108 109 /*110 public void readClassGraph(String ep){111 112 }113 114 public void writeClassGraphs(){115 factory = new RDFSchemaAnalyzerFactory(CDIR);116 epurifile = new HashMap<String, String>();117 String[] eps = factory.getEndpointURIList();118 for ( int i = 0 ; i < eps.length; i++ ){119 try {120 analyzer = factory.create(eps[i]);121 graph = new OWLClassGraph(analyzer);122 String fn = "cgraph".concat(Integer.toString(i)).concat(".obj");123 ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fn));124 oos.writeObject(graph);125 epurifile.put(eps[i],fn);126 oos.close();127 } catch (Exception e) {128 e.printStackTrace();129 }130 }131 }132 */133 134 109 public SClass[] getClasses(String keyword){ 135 110 String[] keywords = null; … … 153 128 } 154 129 if ( graph == null ){ 155 //System.err.println("Class graph is null.");156 130 setOWLClassGraph(startClass); 157 131 } … … 245 219 246 220 public OWLClassGraph getOWLClassGraph(){ 247 /*if ( graph == null ){248 graph = new OWLClassGraph(analyzer);249 }*/250 221 return graph; 251 222 } -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java
r264 r291 74 74 String st = request.getParameter("startclass"); 75 75 String en = request.getParameter("endclass"); 76 //String ask = request.getParameter("ask");77 76 78 77 // String … … 81 80 82 81 HttpSession session = request.getSession(); 83 //QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg");84 //if ( qpg == null ){85 82 QueryPathGenerator qpg = new QueryPathGenerator(ep); 86 //}87 83 SClass[] classes = qpg.getClasses(null); 88 84 qpg.setClassLabels(classes); 89 85 90 86 Path[] paths = null; 91 paths = qpg.getPaths(st, en); 87 paths = qpg.getPaths(st, en); 92 88 if ( paths == null ){ 93 89 out.print(" ");