def from_obj(capability_obj): if not capability_obj: return None capability_ = Capability() if capability_obj.get_id(): capability_.id_ = capability_obj.get_id() capability_.name = capability_obj.get_name() capability_.description = capability_obj.get_Description() if capability_obj.get_Property(): capability_.property = [CapabilityProperty.from_obj(x) for x in capability_obj.get_Property()] if capability_obj.get_Strategic_Objective(): capability_.strategic_objective = [ CapabilityObjective.from_obj(x) for x in capability_obj.get_Strategic_Objective() ] if capability_obj.get_Tactical_Objective(): capability_.tactical_objective = [ CapabilityObjective.from_obj(x) for x in capability_obj.get_Tactical_Objective() ] if capability_obj.get_Behavior_Reference(): capability_.behavior_reference = [ BehaviorReference.from_obj(x) for x in capability_obj.get_Behavior_Reference() ] if capability_obj.get_Relationship(): capability_.relationship = [CapabilityRelationship.from_obj(x) for x in capability_obj.get_Relationship()] return capability_
def from_obj(capability_objective_obj): if not capability_objective_obj: return None capability_objective_ = CapabilityObjective() if capability_objective_obj.get_id(): capability_objective_.id_ = capability_objective_obj.get_id() capability_objective_.name = VocabString.from_obj(capability_objective_obj.get_Name()) capability_objective_.description = capability_objective_obj.get_Description() if capability_objective_obj.get_Property(): capability_objective_.property = [CapabilityProperty.from_obj(x) for x in capability_objective_obj.get_Property()] if capability_objective_obj.get_Behavior_Reference(): capability_objective_.behavior_reference = [BehaviorReference.from_obj(x) for x in capability_objective_obj.get_Behavior_Reference()] if capability_objective_obj.get_Relationship(): capability_objective_.relationship = [CapabilityObjectiveRelationship.from_obj(x) for x in capability_objective_obj.get_Relationship()] return capability_objective_
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_