チェンジセット 197 : SPARQLBuilderWWW/src/java
- 更新日時:
- 2014/10/28 11:44:50 (10 年 前)
- パス:
- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder
- ファイル:
-
- 4 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r177 r197 44 44 public OWLClassGraph(String startClass, String endClass){ 45 45 super(); 46 47 // start & end 46 48 this.startClass = startClass; 47 addNode(startClass);48 49 this.endClass = endClass; 49 addNode(endClass); 50 51 // parameters 50 52 nsteps = 3; 51 53 limit = 1000; 52 54 prunecut = 100; 55 56 // constructing subgraph 57 53 58 } 54 59 … … 229 234 } 230 235 */ 236 237 private void setGraph(RDFSchemaAnalyzer rdfsa, boolean countLink){ 238 // BFS 239 240 241 //ClassLink[] classLinks = rdfsa.getNextClass(null, crrlp.classLink.getLinkedClassURI(), limit, countLinks); 242 } 231 243 232 244 } -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/QueryPathGenerator.java
r177 r197 18 18 private RDFSchemaAnalyzer analyzer = null; 19 19 //private OWLClassGraph graph; 20 20 //private PathMatrix matrix = null; 21 21 22 private static final String CDIR = "cdata"; 22 23 … … 84 85 } 85 86 try { 86 return analyzer.getOWLClasses(null, keywords, null, false);87 return analyzer.getOWLClasses(null, keywords, null, true); 87 88 }catch(Exception e){ 88 89 System.err.println(e); -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/endpointMetadata/MetadataFile.java
r192 r197 324 324 } 325 325 326 327 328 329 326 private void readFile(File file) throws Exception{ 330 327 System.out.println("readfile: " + file.getAbsolutePath()); -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java
r196 r197 83 83 for (int i = 0 ; i < classes.length; i++ ){ 84 84 JsonObjectBuilder job = jbfactory.createObjectBuilder(); 85 job.add("uri", classes[i].getClassURI()); 86 job.add("display", classes[i].getClassURI()); 87 //jab.add(classes[i].getClassURI()); 85 String uri = classes[i].getClassURI(); 86 job.add("uri", uri); 87 Label[] labels = classes[i].getLabels(); 88 String label = null; 89 for ( int j = 0 ; j < labels.length; j++ ){ 90 if ( labels[j].getLanguage() == null ){ 91 label = labels[j].getLabel(); break; 92 }else if ( labels[j].getLanguage().equals("en") ){ 93 label = labels[j].getLabel(); break; 94 } 95 } 96 if ( label == null ){ 97 String[] uris = uri.split("/"); 98 String tmplabel = uris[uris.length-1]; 99 String[] tmplabel2 = tmplabel.split("#"); 100 label = tmplabel2[tmplabel2.length-1]; 101 } 102 103 StringBuilder displaybuilder = new StringBuilder(label); 104 displaybuilder.append(" ("); 105 displaybuilder.append(classes[i].getNumOfInstances()); 106 displaybuilder.append(")"); 107 job.add("display", displaybuilder.toString()); 88 108 jab.add(job); 89 109 }