- 更新日時:
- 2014/11/13 21:45:40 (10 年 前)
- パス:
- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www
- ファイル:
-
- 2 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/EPServlet.java
r204 r205 27 27 public class EPServlet extends HttpServlet { 28 28 29 //private RDFSchemaAnalyzerFactory factory = null;30 private QueryPathGenerator qpg = null;31 29 private static final String FILENAME = "cdata/"; 32 30 … … 69 67 protected void doGet(HttpServletRequest request, HttpServletResponse response) 70 68 throws ServletException, IOException { 71 //processRequest(request, response); 72 69 HttpSession session = request.getSession(); 70 session.removeAttribute("qpg"); 71 QueryPathGenerator qpg = new QueryPathGenerator(); 72 73 73 response.setContentType("application/json;charset=UTF-8"); 74 74 response.setHeader("Access-Control-Allow-Origin", "*"); … … 77 77 response.setHeader("Access-Control-Max-Age", "-1"); 78 78 PrintWriter out = response.getWriter(); 79 if ( qpg == null ){ 80 qpg = new QueryPathGenerator(); 81 } 79 82 80 String[] elist = qpg.getFactory().getEndpointURIList(); 83 81 JsonBuilderFactory jbfactory = Json.createBuilderFactory(null); … … 88 86 JsonArray ja = jab.build(); 89 87 out.print(ja); 90 HttpSession session = request.getSession();91 88 session.setAttribute("qpg", qpg); 92 89 } -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java
r204 r205 88 88 jsonstr += ","; 89 89 } 90 //jsonstr += paths[i].toJSONString2();91 90 if ( paths[i] == null ){ 92 91 continue; 93 //System.out.println("here");94 92 } 95 93 jsonstr += paths[i].toJSONString3(classes);