チェンジセット 272 : SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/AcquiredStructureAnalyzer.java
- 更新日時:
- 2016/03/15 15:26:22 (9 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/AcquiredStructureAnalyzer.java
r271 r272 5 5 import org.biohackathon.SPARQLBuilder.endpointMetadata.MetadataManager; 6 6 7 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.JenaModelGenerator;8 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.URICollection;9 7 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.ClassPartition; 10 8 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.ClassRelation; … … 14 12 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.PropertyPartition; 15 13 16 import com.hp.hpl.jena.query.Query;17 import com.hp.hpl.jena.query.QueryExecution;18 import com.hp.hpl.jena.query.QueryExecutionFactory;19 import com.hp.hpl.jena.query.QueryFactory;20 import com.hp.hpl.jena.query.QuerySolution;21 import com.hp.hpl.jena.query.ResultSet;22 import com.hp.hpl.jena.rdf.model.Literal;23 import com.hp.hpl.jena.rdf.model.Model;24 import com.hp.hpl.jena.rdf.model.Property;25 import com.hp.hpl.jena.rdf.model.Resource;26 14 27 15 //public class OWLQueryBuilderForCrawlerImpl implements OWLQueryBuilder { … … 85 73 // default 86 74 Dataset dataset = cm.getDefaultDataset(); 87 List<SClass> tempClassList = getOWLClassList( dataset, keywords, language);75 List<SClass> tempClassList = getOWLClassList(endpointURI, null, dataset, keywords, language); 88 76 for(SClass sClass: tempClassList){ 89 77 classList.add(sClass); … … 95 83 for(String graphURI: graphURIs){ 96 84 dataset = cm.getDataset(graphURI); 97 tempClassList = getOWLClassList( dataset, keywords, language);85 tempClassList = getOWLClassList(endpointURI, graphURI, dataset, keywords, language); 98 86 for(SClass sClass: tempClassList){ 99 87 classList.add(sClass); … … 105 93 } 106 94 107 private List<SClass> getOWLClassList( Dataset dataset, String[] keywords, String language) throws Exception{95 private List<SClass> getOWLClassList(String endpointURI, String graphURI, Dataset dataset, String[] keywords, String language) throws Exception{ 108 96 ArrayList<SClass> results = new ArrayList<SClass>(); 109 97 … … 127 115 128 116 if( keywords == null || keywords.length == 0 ){ 129 SClass sClass = new SClass(classURI, labels, entities );117 SClass sClass = new SClass(classURI, labels, entities, endpointURI, graphURI); 130 118 results.add(sClass); 131 119 }else{ … … 145 133 } 146 134 if( hit ){ 147 SClass sClass = new SClass(classURI, labels, entities );135 SClass sClass = new SClass(classURI, labels, entities, endpointURI, graphURI); 148 136 results.add(sClass); 149 137 }