差分発生行の前後
無視リスト:
更新日時:
2014/11/11 14:23:58 (10 年 前)
更新者:
atsuko
ログメッセージ:

他サイトから利用することを想定してHTTPヘッダ追加

パス:
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder
ファイル:
1 削除
7 変更

凡例:

変更なし
追加
削除
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/LabeledMultiDigraph.java

    r201 r204  
    1616    List<String> labels; 
    1717    HashMap<String,Integer> labelednodes; 
     18    List<Map<Integer,List<LabeledEdge>>> gadjlist; // node, node-edge list 
    1819     
    1920    public class LabeledEdge{ 
     
    4142        labels.add(label); 
    4243        adjlist.add(new LinkedList<LabeledEdge>()); 
     44        gadjlist.add(new HashMap<Integer, List<LabeledEdge>>()); 
    4345    } 
    4446     
     
    5052        LabeledEdge edge = new LabeledEdge(node2, elabel, direction, ntriples); 
    5153        adjlist.get(node1).add(edge); 
     54        Map<Integer, List<LabeledEdge>> edges = gadjlist.get(node1); 
     55        //  
    5256    } 
    5357} 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java

    r201 r204  
    2121    int th; 
    2222    int prunecut; 
    23          
     23 
    2424    public class LinkAndPath{ 
    2525        String originalClassURI; // originalClasssURI -classLink.propertyURI-> classLink.linkedClassURL 
     
    4141        } 
    4242    } 
    43      
     43         
    4444    public OWLClassGraph(String startClass, String endClass){ 
    4545        super(); 
     
    5252        nsteps = 3; 
    5353        limit = 1000; 
    54         prunecut = 100; 
    55          
     54        prunecut = 100;         
    5655    } 
    5756 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/QueryPathGenerator.java

    r201 r204  
    4444        QueryPathGenerator qpg1 = new QueryPathGenerator(sp, "cdata/"); 
    4545        //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         */ 
    6446    } 
    6547     
     
    11294 
    11395    private void setAnalyzer(){ 
    114         //analyzer = new EndpointAnalyzer(sparqlEndpoint); //ForTest 
    115          
    11696        try { 
    11797            analyzer = factory.create(sparqlEndpoint); 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java

    r197 r204  
    6969        //processRequest(request, response); 
    7070        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");      
    7175        PrintWriter out = response.getWriter(); 
    7276        String ep = request.getParameter("ep"); 
     
    7478        QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 
    7579        if ( qpg == null ){ 
    76         //QueryPathGenerator  
    7780                   qpg = new QueryPathGenerator(); 
    7881        } 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/EPServlet.java

    r175 r204  
    7272         
    7373        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");         
    7478        PrintWriter out = response.getWriter(); 
    7579        if ( qpg == null ){ 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java

    r175 r204  
    6666        //processRequest(request, response); 
    6767        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"); 
    6872        PrintWriter out = response.getWriter(); 
    6973        String ep = request.getParameter("ep"); 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/SPServlet.java

    r193 r204  
    7878        //processRequest(request, response); 
    7979        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(); 
    8185        String jpath = request.getParameter("jsonpath"); 
    8286        Path path = null;