チェンジセット 268 : SPARQLBuilderWWW2016/src/java
- 更新日時:
- 2016/03/14 15:36:25 (9 年 前)
- パス:
- SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder
- ファイル:
-
- 5 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/EndpointAnalyzer.java
r267 r268 1 1 package org.biohackathon.SPARQLBuilder.OWL; 2 2 3 import java.util.ArrayList; 4 import java.util.Collection; 5 import java.util.HashMap; 6 import java.util.HashSet; 7 import java.util.Set; 3 import java.util.*; 8 4 9 5 import com.hp.hpl.jena.query.Query; … … 152 148 */ 153 149 150 public List<SClass> getOWLClassList(String[] graphURIs, String[] keywords, 151 String language, 152 153 boolean countInstances) throws Exception { 154 return null; //dummy 155 } 156 154 157 // public List<SClass> 155 158 -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r267 r268 17 17 List<String> nodeType; 18 18 String sparqlEndpoint; 19 Set<Integer> visited;20 //List<Map<Integer, Integer>> edgeweight;21 //List<Integer> nodeweight;22 19 Map<String, Boolean> checkedpaths; 23 20 21 /* 24 22 public class LinkAndPath{ 25 23 String originalClassURI; // originalClasssURI -classLink.propertyURI-> classLink.linkedClassURL … … 46 44 this.classURIs = classURIs; 47 45 } 48 } 46 }*/ 49 47 50 48 public OWLClassGraph(){ // not used … … 59 57 } 60 58 59 /* 61 60 public OWLClassGraph(RDFSchemaAnalyzer rdfsa, String sparqlEndpoint, String startClass){ // used 62 61 super(); … … 64 63 setPartClassGraph(rdfsa, sparqlEndpoint, startClass); 65 64 } 65 */ 66 66 67 67 public int getNumberOfEdge(String url){ … … 72 72 return adjlist.get(node).size(); 73 73 } 74 75 public boolean visitedNode(String classURI){ 76 if ( visited.contains(labelednodes.get(classURI)) ){ 77 return true; 78 } 79 return false; 80 } 81 74 82 75 public Path[] getPaths(String startClass, String endClass){ 83 76 List<List<ClassLink>> paths = searchPaths(startClass, endClass); -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/QueryPathGenerator.java
r267 r268 16 16 17 17 public class QueryPathGenerator { 18 //private String sparqlEndpoint = null;19 18 private RDFSchemaAnalyzerFactory factory = null; 20 //private RDFSchemaAnalyzer analyzer = null;21 19 private HashMap<String, RDFSchemaAnalyzer> analyzers = null; 22 20 private OWLClassGraph graph; -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java
r267 r268 90 90 for ( int i = 0; i < eplist.length; i++ ){ 91 91 try{ 92 qpg.setSPARQLendpoint(eplist[i]); 93 SClass[] classes = qpg.getClasses(null); 92 SClass[] classes = qpg.getClassesByEndpoint(eplist[i]); 94 93 sortedClasses = qpg.getSortedClasses(classes); 95 94 JsonArray ja = getJsonArrayFromSortedClasses(jbfactory, sortedClasses); … … 104 103 } 105 104 String classURI = request.getParameter("class"); 106 qpg.setSPARQLendpoint(ep);107 105 SClass[] classes = null; 108 106 if ( classURI != null ){ 109 qpg.setOWLClassGraph(classURI);110 classes = qpg.getReachableClasses();107 //qpg.setOWLClassGraph(classURI); // KOKO 108 //classes = qpg.getReachableClasses(); 111 109 }else{ 112 110 classes = qpg.getClasses(null); -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java
r267 r268 81 81 82 82 HttpSession session = request.getSession(); 83 //QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg");84 //if ( qpg == null ){85 QueryPathGenerator qpg = new QueryPathGenerator(ep);86 //}83 QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 84 if ( qpg == null ){ 85 qpg = new QueryPathGenerator(); 86 } 87 87 SClass[] classes = qpg.getClasses(null); 88 88 qpg.setClassLabels(classes);