示例#1
0
 def get_provenance_parent(self):
     if self.has_provenance():
         collection = JSONClientValidated(
             'repository',
             collection='Composition',
             runtime=self.my_osid_object._runtime)
         result = collection.find_one({
             '_id':
             ObjectId(Id(self.get_provenance_id()).get_identifier())
         })
         return Asset(osid_object_map=result,
                      runtime=self.my_osid_object._runtime,
                      proxy=self.my_osid_object._proxy)
     raise IllegalState("Composition has no provenance parent.")
示例#2
0
文件: base_records.py 项目: UOC/dlkit
 def get_provenance_parent(self):
     """stub"""
     if self.has_provenance():
         collection = JSONClientValidated(
             'assessment',
             collection='Item',
             runtime=self.my_osid_object._runtime)
         result = collection.find_one({
             '_id':
             ObjectId(Id(self.get_provenance_id()).get_identifier())
         })
         return Item(osid_object_map=result,
                     runtime=self.my_osid_object._runtime,
                     proxy=self.my_osid_object._proxy)
     raise IllegalState("Item has no provenance parent.")