- 更新日時:
- 2014/11/11 14:23:58 (10 年 前)
- パス:
- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder
- ファイル:
-
- 1 削除
- 7 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/LabeledMultiDigraph.java
r201 r204 16 16 List<String> labels; 17 17 HashMap<String,Integer> labelednodes; 18 List<Map<Integer,List<LabeledEdge>>> gadjlist; // node, node-edge list 18 19 19 20 public class LabeledEdge{ … … 41 42 labels.add(label); 42 43 adjlist.add(new LinkedList<LabeledEdge>()); 44 gadjlist.add(new HashMap<Integer, List<LabeledEdge>>()); 43 45 } 44 46 … … 50 52 LabeledEdge edge = new LabeledEdge(node2, elabel, direction, ntriples); 51 53 adjlist.get(node1).add(edge); 54 Map<Integer, List<LabeledEdge>> edges = gadjlist.get(node1); 55 // 52 56 } 53 57 } -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r201 r204 21 21 int th; 22 22 int prunecut; 23 23 24 24 public class LinkAndPath{ 25 25 String originalClassURI; // originalClasssURI -classLink.propertyURI-> classLink.linkedClassURL … … 41 41 } 42 42 } 43 43 44 44 public OWLClassGraph(String startClass, String endClass){ 45 45 super(); … … 52 52 nsteps = 3; 53 53 limit = 1000; 54 prunecut = 100; 55 54 prunecut = 100; 56 55 } 57 56 -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/QueryPathGenerator.java
r201 r204 44 44 QueryPathGenerator qpg1 = new QueryPathGenerator(sp, "cdata/"); 45 45 //SClass[] cl = qpg.getClasses(null); 46 47 /*48 long start1 = System.currentTimeMillis();49 Path[] path1 = qpg1.getPaths(sc, ec, false);50 long end1 = System.currentTimeMillis();51 52 QueryPathGenerator qpg2 = new QueryPathGenerator(sp, "ddata/");53 long start2 = System.currentTimeMillis();54 Path[] path2 = qpg2.getPaths(sc, ec, false);55 long end2 = System.currentTimeMillis();56 System.out.println("TOTAL1:");57 System.out.println(end1 - start1);58 System.out.println("TOTAL2:");59 System.out.println(end2 - start2);60 61 System.out.println(path1.length);62 System.out.println(path2.length);63 */64 46 } 65 47 … … 112 94 113 95 private void setAnalyzer(){ 114 //analyzer = new EndpointAnalyzer(sparqlEndpoint); //ForTest115 116 96 try { 117 97 analyzer = factory.create(sparqlEndpoint); -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java
r197 r204 69 69 //processRequest(request, response); 70 70 response.setContentType("application/json;charset=UTF-8"); 71 response.setHeader("Access-Control-Allow-Origin", "*"); 72 response.setHeader("Access-Control-Allow-Methods", "GET"); 73 response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 74 response.setHeader("Access-Control-Max-Age", "-1"); 71 75 PrintWriter out = response.getWriter(); 72 76 String ep = request.getParameter("ep"); … … 74 78 QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 75 79 if ( qpg == null ){ 76 //QueryPathGenerator77 80 qpg = new QueryPathGenerator(); 78 81 } -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/EPServlet.java
r175 r204 72 72 73 73 response.setContentType("application/json;charset=UTF-8"); 74 response.setHeader("Access-Control-Allow-Origin", "*"); 75 response.setHeader("Access-Control-Allow-Methods", "GET"); 76 response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 77 response.setHeader("Access-Control-Max-Age", "-1"); 74 78 PrintWriter out = response.getWriter(); 75 79 if ( qpg == null ){ -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java
r175 r204 66 66 //processRequest(request, response); 67 67 response.setContentType("application/json;charset=UTF-8"); 68 response.setHeader("Access-Control-Allow-Origin", "*"); 69 response.setHeader("Access-Control-Allow-Methods", "GET"); 70 response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 71 response.setHeader("Access-Control-Max-Age", "-1"); 68 72 PrintWriter out = response.getWriter(); 69 73 String ep = request.getParameter("ep"); -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/SPServlet.java
r193 r204 78 78 //processRequest(request, response); 79 79 response.setContentType("application/json;charset=UTF-8"); 80 PrintWriter out = response.getWriter(); 80 response.setHeader("Access-Control-Allow-Origin", "*"); 81 response.setHeader("Access-Control-Allow-Methods", "GET"); 82 response.setHeader("Access-Control-Allow-Headers", request.getHeader("Access-Control-Request-Headers")); 83 response.setHeader("Access-Control-Max-Age", "-1"); 84 PrintWriter out = response.getWriter(); 81 85 String jpath = request.getParameter("jsonpath"); 82 86 Path path = null;