差分発生行の前後
無視リスト:
更新日時:
2014/09/26 18:16:47 (10 年 前)
更新者:
atsuko
ログメッセージ:

BHSPARQLBuilderに追従

ファイル:
1 変更

凡例:

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

    r181 r186  
    252252 
    253253        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]); 
    256263        } 
    257264