チェンジセット 284 : SPARQLBuilderWWW/src/java/org

差分発生行の前後
無視リスト:
更新日時:
2016/06/13 10:53:43 (8 年 前)
更新者:
atsuko
ログメッセージ:

クラスグラフ変更準備

ファイル:
1 変更

凡例:

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

    r275 r284  
    2222 
    2323    private Map<String, String> clabels; 
     24    private Map<String, String> epurifile; // key: endpoint URI, value: filename 
    2425     
    2526    private static final String CDIR = "cdata"; 
    2627    private static final String ODIR = "owldata"; 
    27          
     28    //private static final String CGDIR = "cgraph"; 
     29     
    2830    /* 
    2931    public static void main(String[] args){ 
     
    105107    } 
    106108     
     109    /* 
     110    public void readClassGraph(String ep){ 
     111         
     112    } 
     113     
     114    public void writeClassGraphs(){ 
     115        factory = new RDFSchemaAnalyzerFactory(CDIR); 
     116        epurifile = new HashMap<String, String>();  
     117        String[] eps = factory.getEndpointURIList(); 
     118        for ( int i = 0 ; i < eps.length; i++ ){ 
     119            try { 
     120                analyzer = factory.create(eps[i]); 
     121                graph = new OWLClassGraph(analyzer); 
     122                String fn = "cgraph".concat(Integer.toString(i)).concat(".obj"); 
     123                ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fn)); 
     124                oos.writeObject(graph); 
     125                epurifile.put(eps[i],fn); 
     126                oos.close(); 
     127            } catch (Exception e) { 
     128                e.printStackTrace(); 
     129            }       
     130        } 
     131    } 
     132    */ 
     133  
    107134    public SClass[] getClasses(String keyword){ 
    108135        String[] keywords = null; 
     
    214241         
    215242    public Map<String, String> getClassLabelsFromExternal(){ 
    216         return  OWLLabelReader.readLabels(ODIR); 
     243        return OWLLabelReader.readLabels(ODIR); 
    217244    } 
    218245