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_
示例#2
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_