Ejemplo n.º 1
0
 def from_obj(object_equivalence_obj):
     if not object_equivalence_obj:
         return None
     object_equivalence_ = ObjectEquivalence()
     object_equivalence_.id = object_equivalence_obj.get_id()
     object_equivalence_.object_references = [ObjectReference.from_obj(x) for x in object_equivalence_obj.get_object_Reference()]
     return object_equivalence_
Ejemplo n.º 2
0
 def from_dict(object_equivalence_dict):
     if not object_equivalence_dict:
         return None
     object_equivalence_ = ObjectEquivalence()
     object_equivalence_.id = object_equivalence_dict.get('id')
     object_equivalence_.object_references = [ObjectReference.from_dict(x) for x in object_equivalence_dict.get('object_references', [])]
     return object_equivalence_
Ejemplo n.º 3
0
 def from_obj(candidate_indc_comp_obj):
     if not candidate_indc_comp_obj:
         return None
     candidate_indicator_composition_ = CandidateIndicatorComposition()
     candidate_indicator_composition_.operator = candidate_indc_comp_obj.get_operator()
     if len(candidate_indc_comp_obj.get_Behavior_Reference()) > 0:
         for behavior_reference_obj in candidate_indc_comp_obj.get_Behavior_Reference():
             candidate_indicator_composition_.behavior_references.append(BehaviorReference.from_obj(behavior_reference_obj))
     if len(candidate_indc_comp_obj.get_Action_Reference()) > 0:
         for action_reference_obj in candidate_indc_comp_obj.get_Action_Reference():
             candidate_indicator_composition_.action_references.append(ActionReference.from_obj(action_reference_obj))
     if len(candidate_indc_comp_obj.get_Object_Reference()) > 0:
         for object_reference_obj in candidate_indc_comp_obj.get_Object_Reference():
             candidate_indicator_composition_.object_references.append(ObjectReference.from_obj(object_reference_obj))
     if len(candidate_indc_comp_obj.get_Sub_Composition()) > 0:
         for sub_composition_obj in candidate_indc_comp_obj.get_Sub_Composition():
             candidate_indicator_composition_.sub_compositions.append(CandidateIndicatorComposition.from_obj(sub_composition_obj))
     return candidate_indicator_composition_
Ejemplo n.º 4
0
 def from_dict(candidate_indc_comp_dict):
     if not candidate_indc_comp_dict:
         return None
     candidate_indicator_composition_ = CandidateIndicatorComposition()
     candidate_indicator_composition_.operator = candidate_indc_comp_dict.get('operator')
     if candidate_indc_comp_dict.get('behavior_references') is not None:
         for behavior_reference_dict in candidate_indc_comp_dict.get('behavior_references'):
             candidate_indicator_composition_.behavior_references.append(BehaviorReference.from_dict(behavior_reference_dict))
     if candidate_indc_comp_dict.get('action_references') is not None:
         for action_reference_dict in candidate_indc_comp_dict.get('action_references'):
             candidate_indicator_composition_.action_references.append(ActionReference.from_dict(action_reference_dict))
     if candidate_indc_comp_dict.get('object_references') is not None:
         for object_reference_dict in candidate_indc_comp_dict.get('object_references'):
             candidate_indicator_composition_.object_references.append(ObjectReference.from_dict(object_reference_dict))
     if candidate_indc_comp_dict.get('sub_compositions') is not None:
         for sub_composition_dict in candidate_indc_comp_dict.get('sub_compositions'):
             candidate_indicator_composition_.sub_compositions.append(CandidateIndicatorComposition.from_dict(sub_composition_dict))
     return candidate_indicator_composition_
 def createfindingbundlesmetaanalysisobjectequivalencereference(self,object_idref=None):
     #unresolved library bug
     reference = ObjectReference()
     reference.object_idref =object_idref
     return reference