- 更新日時:
- 2014/09/25 11:06:29 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/EPServlet.java
r133 r149 14 14 import javax.servlet.http.HttpServletRequest; 15 15 import javax.servlet.http.HttpServletResponse; 16 import javax.servlet.http.HttpSession; 16 17 import org.biohackathon.SPARQLBuilder.OWL.*; 17 18 import javax.json.*; … … 26 27 public class EPServlet extends HttpServlet { 27 28 28 private RDFSchemaAnalyzerFactory factory = null; 29 //private RDFSchemaAnalyzerFactory factory = null; 30 private QueryPathGenerator qpg = null; 29 31 private static final String FILENAME = "cdata/"; 30 32 … … 71 73 response.setContentType("application/json;charset=UTF-8"); 72 74 PrintWriter out = response.getWriter(); 73 if ( factory== null ){74 factory = new RDFSchemaAnalyzerFactory(FILENAME);75 if ( qpg == null ){ 76 qpg = new QueryPathGenerator(); 75 77 } 76 String[] elist = factory.getEndpointURIList();78 String[] elist = qpg.getFactory().getEndpointURIList(); 77 79 JsonBuilderFactory jbfactory = Json.createBuilderFactory(null); 78 80 JsonArrayBuilder jab = jbfactory.createArrayBuilder(); … … 82 84 JsonArray ja = jab.build(); 83 85 out.print(ja); 86 HttpSession session = request.getSession(); 87 session.setAttribute("qpg", qpg); 84 88 } 85 89