- 更新日時:
- 2015/09/14 11:20:13 (9 年 前)
- パス:
- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www
- ファイル:
-
- 2 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java
r250 r256 74 74 PrintWriter out = response.getWriter(); 75 75 String ep = request.getParameter("ep"); 76 // 77 78 76 79 String classURI = request.getParameter("class"); 77 80 HttpSession session = request.getSession(); … … 88 91 89 92 SClass[] classes = qpg.getClasses(null); 93 qpg.setClassLabels(classes); 90 94 for (int i = 0 ; i < classes.length; i++ ){ 91 95 String uri = classes[i].getClassURI(); 96 /* 92 97 //if ( ocg.getNumberOfEdge(uri) == 0 ){ 93 98 // continue; … … 108 113 } 109 114 if ( label == null ){ 115 qpg.getClassLabelfromExternal(uri); 116 } 117 if ( label == null ){ 110 118 String[] uris = uri.split("/"); 111 119 String tmplabel = uris[uris.length-1]; … … 113 121 label = tmplabel2[tmplabel2.length-1]; 114 122 } 123 */ 124 String label = qpg.getClassLabel(uri); 115 125 StringBuilder classbuilder = new StringBuilder(label); 116 126 classbuilder.append(" "); -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java
r251 r256 83 83 SClass[] classes = qpg.getClasses(null); 84 84 Path[] paths = null; 85 //if ( ask == null ){ 86 // paths = qpg.getPaths(st, en, false); 87 //}else if ( ask.equalsIgnoreCase("true")){ 88 paths = qpg.getPaths(st, en, true); 89 //}else{ 90 // paths = qpg.getPaths(st, en, false); 91 //} 85 paths = qpg.getPaths(st, en, true); 92 86 93 87 String jsonstr = "["; … … 99 93 continue; 100 94 } 101 jsonstr += paths[i].toJSONString 3(classes);95 jsonstr += paths[i].toJSONString4(qpg); 102 96 } 103 97 jsonstr += "]"; 104 98 // For debug 99 /* 105 100 System.out.println("JSON:"); 106 101 System.out.println(jsonstr); 102 */ 107 103 out.print(jsonstr); 108 104 }