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

QueryPathGenerator? にgetFactory を追加

ファイル:
1 変更

凡例:

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

    r133 r149  
    1414import javax.servlet.http.HttpServletRequest; 
    1515import javax.servlet.http.HttpServletResponse; 
     16import javax.servlet.http.HttpSession; 
    1617import org.biohackathon.SPARQLBuilder.OWL.*; 
    1718import javax.json.*; 
     
    2627public class EPServlet extends HttpServlet { 
    2728 
    28     private RDFSchemaAnalyzerFactory factory = null; 
     29    //private RDFSchemaAnalyzerFactory factory = null; 
     30    private QueryPathGenerator qpg = null; 
    2931    private static final String FILENAME = "cdata/"; 
    3032     
     
    7173        response.setContentType("application/json;charset=UTF-8"); 
    7274        PrintWriter out = response.getWriter(); 
    73         if ( factory == null ){ 
    74             factory = new RDFSchemaAnalyzerFactory(FILENAME); 
     75        if ( qpg == null ){ 
     76            qpg = new QueryPathGenerator(); 
    7577        } 
    76         String[] elist = factory.getEndpointURIList(); 
     78        String[] elist = qpg.getFactory().getEndpointURIList(); 
    7779        JsonBuilderFactory jbfactory = Json.createBuilderFactory(null); 
    7880        JsonArrayBuilder jab = jbfactory.createArrayBuilder(); 
     
    8284        JsonArray ja = jab.build(); 
    8385        out.print(ja); 
     86        HttpSession session = request.getSession(); 
     87        session.setAttribute("qpg", qpg); 
    8488    } 
    8589