チェンジセット 277
- 更新日時:
- 2016/03/16 19:52:20 (9 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java
r274 r277 79 79 QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 80 80 SortedSet<String> sortedClasses = null; 81 String classURI = request.getParameter("class"); 81 82 82 83 if ( qpg == null ){ … … 85 86 if ( ep == null ){ 86 87 JsonBuilderFactory jbfactory = Json.createBuilderFactory(null); 87 88 String[] eplist = qpg.getFactory().getEndpointURIList();89 88 TreeSet<String> classes = new TreeSet<String>(); 90 for ( int i = 0; i < eplist.length; i++ ){ 91 try{ 92 qpg.setSPARQLendpoint(eplist[i]); 93 SClass[] cls = qpg.getClasses(null); 94 qpg.setClassLabels(cls); // HENKO TODO 95 for (int j = 0; j < cls.length; j++ ){ 96 classes.add(qpg.getClassLabel(cls[j].getClassURI()).concat("\t") 89 90 if ( classURI == null ){ 91 String[] eplist = qpg.getFactory().getEndpointURIList(); 92 for ( int i = 0; i < eplist.length; i++ ){ 93 try{ 94 qpg.setSPARQLendpoint(eplist[i]); 95 SClass[] cls = qpg.getClasses(null); 96 qpg.setClassLabels(cls); // HENKO TODO 97 for (int j = 0; j < cls.length; j++ ){ 98 classes.add(qpg.getClassLabel(cls[j].getClassURI()).concat("\t") 97 99 .concat(cls[j].getClassURI()).concat("\t") 98 100 .concat(new Integer(cls[j].getNumOfInstances()).toString()) 99 101 .concat("\t").concat(eplist[i])); 102 } 103 }catch(Exception e){ 104 e.printStackTrace(); 105 System.err.println(e); 100 106 } 101 }catch(Exception e){102 e.printStackTrace();103 System.err.println(e);104 107 } 108 }else{ // classURI 109 return; // TODO 105 110 } 106 111 JsonArray ja = getJsonArrayFromClasses(jbfactory, classes); … … 108 113 return; 109 114 } 110 String classURI = request.getParameter("class");111 115 qpg.setSPARQLendpoint(ep); 112 116 SClass[] classes = null;