1 | package org.biohackathon.SPARQLBuilder.OWL;
|
---|
2 |
|
---|
3 | import org.biohackathon.SPARQLBuilder.endpointMetadata.MetadataManager;
|
---|
4 | import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.CrawledMetadata;
|
---|
5 |
|
---|
6 |
|
---|
7 | public class RDFSchemaAnalyzerFactory {
|
---|
8 |
|
---|
9 | private MetadataManager metadataManager = null;
|
---|
10 | private static final String FILENAME = "C:\\home\\kobayashi";
|
---|
11 |
|
---|
12 |
|
---|
13 | public static void main(String[] args) throws Exception{
|
---|
14 | RDFSchemaAnalyzerFactory factory = new RDFSchemaAnalyzerFactory();
|
---|
15 | RDFSchemaAnalyzer analyzer = factory.create();
|
---|
16 | SClass[] sClassList = analyzer.getOWLClasses(null, null);
|
---|
17 | for(SClass sClass: sClassList){
|
---|
18 | System.out.println(sClass.getClassURI());
|
---|
19 | }
|
---|
20 | }
|
---|
21 |
|
---|
22 | public RDFSchemaAnalyzerFactory(String fileName){
|
---|
23 | try{
|
---|
24 | metadataManager = new MetadataManager(fileName);
|
---|
25 | }catch(Exception e){
|
---|
26 | System.err.println(e);
|
---|
27 | }
|
---|
28 | }
|
---|
29 |
|
---|
30 | public RDFSchemaAnalyzerFactory(){
|
---|
31 | try{
|
---|
32 | metadataManager = new MetadataManager(FILENAME);
|
---|
33 | }catch(Exception e){
|
---|
34 | System.err.println(e);
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|
38 |
|
---|
39 |
|
---|
40 | public String[] getEndpointURIList(){
|
---|
41 | return metadataManager.getURIList();
|
---|
42 | }
|
---|
43 |
|
---|
44 | public CrawledMetadata[] getMetadataFiles(){
|
---|
45 | return metadataManager.getCrawlerMetadataList();
|
---|
46 | }
|
---|
47 |
|
---|
48 |
|
---|
49 | public RDFSchemaAnalyzer create() throws Exception{
|
---|
50 | return new AcquiredStructureAnalyzer(metadataManager);
|
---|
51 | }
|
---|
52 | }
|
---|