- 更新日時:
- 2016/02/16 16:14:54 (9 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java
r256 r264 74 74 String st = request.getParameter("startclass"); 75 75 String en = request.getParameter("endclass"); 76 String ask = request.getParameter("ask"); 76 //String ask = request.getParameter("ask"); 77 78 // String 79 String uri = request.getQueryString(); 80 System.out.println(uri); 77 81 78 82 HttpSession session = request.getSession(); 79 QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg");80 if ( qpg == null ){81 82 }83 //QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 84 //if ( qpg == null ){ 85 QueryPathGenerator qpg = new QueryPathGenerator(ep); 86 //} 83 87 SClass[] classes = qpg.getClasses(null); 88 qpg.setClassLabels(classes); 89 84 90 Path[] paths = null; 85 paths = qpg.getPaths(st, en, true); 86 87 String jsonstr = "["; 88 for(int i = 0; i< paths.length; i++){ 89 if (i > 0 && paths[i] != null){ 90 jsonstr += ","; 91 paths = qpg.getPaths(st, en); 92 if ( paths == null ){ 93 out.print(" "); 94 }else{ 95 String jsonstr = "["; 96 for(int i = 0; i< paths.length; i++){ 97 if (i > 0 && paths[i] != null){ 98 jsonstr += ","; 99 } 100 if ( paths[i] == null ){ 101 continue; 102 } 103 jsonstr += paths[i].toJSONString4(qpg); 91 104 } 92 if ( paths[i] == null ){ 93 continue; 94 } 95 jsonstr += paths[i].toJSONString4(qpg); 96 } 97 jsonstr += "]"; 105 jsonstr += "]"; 98 106 // For debug 99 107 /* … … 101 109 System.out.println(jsonstr); 102 110 */ 103 out.print(jsonstr); 111 out.print(jsonstr); 112 } 104 113 } 105 114