- 更新日時:
- 2014/09/26 18:16:47 (10 年 前)
- パス:
- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/endpointMetadata
- ファイル:
-
- 2 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/endpointMetadata/MetadataFile.java
r181 r186 252 252 253 253 public static Resource[] getClassRelations(Resource propertyPartition) throws Exception{ 254 //TODO 255 return null; 254 Model model = propertyPartition.getModel(); 255 Property sbm_classRelation = model.getProperty(URICollection.PROPERTY_SB_CLASS_RELATION); 256 NodeIterator nit = model.listObjectsOfProperty(propertyPartition, sbm_classRelation); 257 ArrayList<Resource> classRelations = new ArrayList<Resource>(); 258 if( nit.hasNext()){ 259 Resource classRelation = nit.next().asResource(); 260 classRelations.add(classRelation); 261 } 262 return classRelations.toArray(new Resource[0]); 256 263 } 257 264 -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/endpointMetadata/MetadataManager.java
r181 r186 63 63 String uri = metadataFile.getEndpointURI(); 64 64 if( uri != null ){ 65 metadataTable.put(uri, metadataFile); 65 if( metadataTable.containsKey(uri)){ 66 MetadataFile tempMF = metadataTable.get(uri); 67 if(tempMF.getEndDateTime().before(metadataFile.getEndDateTime()) ){ 68 metadataTable.remove(uri); 69 metadataTable.put(uri, metadataFile); 70 } 71 }else{ 72 metadataTable.put(uri, metadataFile); 73 } 66 74 } 67 75 }catch(Exception ex){ … … 72 80 } 73 81 } 74 75 76 77 82 }