チェンジセット 86 : BH13SPARQLBuilder/src/org

差分発生行の前後
無視リスト:
更新日時:
2014/06/18 18:44:35 (10 年 前)
更新者:
nori
ログメッセージ:

クロール済みのEndpointURIListをとってこれるように追加

パス:
BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL
ファイル:
2 変更

凡例:

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

    r85 r86  
    1616        } 
    1717         
     18        public String[] getEndpointURIList(){ 
     19                if( acquiredRDFFiles == null ){ 
     20                        return new String[0]; 
     21                }else{ 
     22                        return acquiredRDFFiles.keySet().toArray(new String[0]); 
     23                } 
     24        } 
     25         
    1826         
    1927        public RDFSchemaAnalyzer create(String uri) throws Exception{ 
  • BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL/StructureCrawler.java

    r85 r86  
    1717                StructureCrawler sc = new StructureCrawler(new File("c:\\temp")); 
    1818                sc.crawl("http://data.allie.dbcls.jp/sparql", "allie.ttl"); 
     19                 
     20                System.out.println("done"); 
     21                 
    1922                 
    2023                Map<String,String> acTable = sc.getAcquiredStructureFiles(); 
     
    8790 
    8891                // RDF/XML, RDF/XML-ABBREV, N-TRIPLE, N3 
    89                 String tFileName = null; 
     92                File outFile = null; 
    9093                if (outFileName == null) { 
     94                        String tFileName = null; 
    9195                        if (endPURI.lastIndexOf("/", endPURI.length() - 2) > 0) { 
    9296                                tFileName = endPURI.substring( 
     
    96100                                tFileName = endPURI; 
    97101                        } 
    98                 } else { 
    99                         tFileName = outFileName; 
    100                         File outFile = new File(dataDir, tFileName); 
     102                        outFile = new File(dataDir, tFileName); 
    101103                        if (outFile.exists()) { 
    102104                                outFile = File.createTempFile(tFileName, "", dataDir); 
    103105                        } 
    104                         sc.write2File(outFile.getAbsolutePath(), "Turtle"); 
    105                         // System.out.println("Category:" + sc.getCategory()); 
     106                } else { 
     107                        outFile = new File(dataDir, outFileName); 
    106108                } 
    107  
     109                sc.write2File(outFile.getAbsolutePath(), "Turtle"); 
     110                // System.out.println("Category:" + sc.getCategory()); 
    108111        } 
    109112