| /***************************************************************************** |
| * Copyright (c) 2019 CEA LIST, and others. |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation |
| * |
| *****************************************************************************/ |
| |
| import org.eclipse.papyrus.uml.m2m.qvto.common.blackboxes.ecore.EcoreHelper; |
| import org.eclipse.papyrus.interoperability.sysml16.sysml14.blackboxes.sysml.SysMLBlackboxHelper; |
| import org.eclipse.papyrus.interoperability.sysml16.sysml14.SysMLUtils; |
| |
| modeltype UML "strict" uses 'http://www.eclipse.org/uml2/5.0.0/UML'; |
| modeltype ecore "strict" uses 'http://www.eclipse.org/emf/2002/Ecore'; |
| modeltype SysML14 "strict" uses 'http://www.eclipse.org/papyrus/sysml/1.4/SysML'; |
| modeltype SysML16 "strict" uses 'http://www.eclipse.org/papyrus/sysml/1.6/SysML'; |
| modeltype UMLPrimitivesTypes "strict" uses 'http://www.eclipse.org/uml2/5.0.0/Types'; |
| modeltype UMLProfileStandard "strict" uses 'http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard'; |
| |
| |
| transformation SysMLSemantic(in inS16Profile : SysML16, in primitiveTypes : UMLPrimitivesTypes, in sysMLStandardLibrary : SysML16, in QUDVStandardLibrary : SysML16, in umlProfileStandard : UMLProfileStandard, inout inOutModel : UML); |
| |
| // Declare needed constants |
| property sysML14URI:String = 'http://www.eclipse.org/papyrus/sysml/1.4/SysML'; |
| property standardProfileName:String = "StandardProfile"; |
| property librariesName:String = "Libraries"; |
| property qudvLibraryName:String = "QUDV"; |
| |
| property s14Profile:UML::Profile = inS16Profile.rootObjects()![UML::Profile]; |
| |
| main() { |
| var model:UML::Model := inOutModel.rootObjects()[uml::Model]->any(true); |
| |
| model.eAnnotations += model.createEAnnotationForVersioning(); |
| |
| // Apply SysML 1.6 profile with all sub profiles |
| inS16Profile.objectsOfType(UML::Profile)->forEach(profile) { |
| model.applyProfile(profile); |
| }; |
| |
| // Import UML Profile standard if not already present |
| var standardProfileApplied:UML::Profile; |
| model.getAppliedProfiles()->forEach(profile){ |
| if(standardProfileName = profile.name){ |
| standardProfileApplied := profile; |
| } |
| }; |
| if(standardProfileApplied.oclIsUndefined()){ |
| var profileStandard:UML::Profile := umlProfileStandard.objectsOfType(UML::Profile)->any(curr | curr.name = standardProfileName); |
| model.applyProfile(profileStandard); |
| }; |
| |
| // Make the transformation of all elements to SysML elements |
| inOutModel.objects()[ecore::EObject].map toSysML16Elements(model); |
| |
| // Manage the conjugated ports and conjugated interface block |
| inOutModel.objects()[UML::Port]->forEach(port){ |
| convertConjugatedInterfaceBlock(port, model); |
| }; |
| |
| // Manage all the qudv and sysml library references |
| var sysmlStandardLibraryElements := sysMLStandardLibrary.objectsOfKind(ecore::EObject); |
| var qudvLibraryElements := QUDVStandardLibrary.objectsOfKind(ecore::EObject); |
| inOutModel.objects()[ecore::EObject]->forEach(element) { |
| convertEObjectIfNeeded(element, sysmlStandardLibraryElements, qudvLibraryElements); |
| }; |
| |
| // Unapply and remove all sysml 1.4 profiles application |
| inOutModel.objectsOfType(ProfileApplication).map removeSysML14Profile(model); |
| |
| // Search about the QUDV library to determinate if the new QUDV must be imported or not |
| var sysml14QUDVLibraryPackageImport:UML::PackageImport := model.packageImport->any(curr | curr.importedPackage.name = qudvLibraryName); |
| |
| // Remove the old sysml14 standard library and QUDV library |
| model.packageImport := model.packageImport->select(curr | curr.importedPackage.name <> qudvLibraryName and curr.importedPackage.name <> librariesName); |
| |
| // Import uml basic primitives Types by default |
| primitiveTypes.objectsOfType(UML::Model)->forEach(package){ |
| var packageImport := object UML::PackageImport{ |
| importedPackage := package; |
| }; |
| model.packageImport+=packageImport; |
| }; |
| |
| // Import SysML librairies package by default |
| var librairies:UML::Package := sysMLStandardLibrary.objectsOfType(UML::Package)->any(curr | curr.name=librariesName); |
| var librairiesPackageImport := object UML::PackageImport{ |
| importedPackage := librairies; |
| }; |
| model.packageImport+=librairiesPackageImport; |
| |
| // Import the QUDV library if the old one was imported |
| if(not sysml14QUDVLibraryPackageImport.oclIsUndefined()){ |
| var qudvLibrary:UML::Package := QUDVStandardLibrary.objectsOfType(UML::Package)->any(curr | curr.name=qudvLibraryName); |
| var sysml16QUDVLibraryPackageImport := object UML::PackageImport{ |
| importedPackage := qudvLibrary; |
| }; |
| model.packageImport+=sysml16QUDVLibraryPackageImport; |
| }; |
| } |
| |
| mapping ecore::EObject::toSysML16Elements(model:UML::Model) : ecore::EObject disjuncts |
| ecore::EObject::toSysML16ActivitiesContinuous, |
| ecore::EObject::toSysML16ActivitiesControlOperator, |
| ecore::EObject::toSysML16ActivitiesDiscrete, |
| ecore::EObject::toSysML16ActivitiesNoBuffer, |
| ecore::EObject::toSysML16ActivitiesOptional, |
| ecore::EObject::toSysML16ActivitiesOverwrite, |
| ecore::EObject::toSysML16ActivitiesProbability, |
| ecore::EObject::toSysML16ActivitiesRate, |
| ecore::EObject::toSysML16AllocationsAllocate, |
| ecore::EObject::toSysML16AllocationsAllocateActivityPartition, |
| ecore::EObject::toSysML16BlocksAdjunctProperty, |
| ecore::EObject::toSysML16BlocksBindingConnector, |
| ecore::EObject::toSysML16BlocksBlock, |
| ecore::EObject::toSysML16BlocksBoundReference, |
| ecore::EObject::toSysML16BlocksClassifierBehaviorProperty, |
| ecore::EObject::toSysML16BlocksConnectorProperty, |
| ecore::EObject::toSysML16BlocksDistributedProperty, |
| ecore::EObject::toSysML16BlocksEndPathMultiplicity, |
| ecore::EObject::toSysML16BlocksNestedConnectorEnd, |
| ecore::EObject::toSysML16BlocksParticipantProperty, |
| ecore::EObject::toSysML16BlocksPropertySpecificType, |
| ecore::EObject::toSysML16BlocksValueType, |
| ecore::EObject::toSysML16ConstraintsConstaintBlock, |
| ecore::EObject::toSysML16DeprecatedElementsFlowPort, |
| ecore::EObject::toSysML16DeprecatedElementsFlowSpecification, |
| ecore::EObject::toSysML16ModelelementsConform, |
| ecore::EObject::toSysML16ModelelementsElementGroup, |
| ecore::EObject::toSysML16ModelelementsExpose, |
| ecore::EObject::toSysML16ModelelementsProblem, |
| ecore::EObject::toSysML16ModelelementsRationale, |
| ecore::EObject::toSysML16ModelelementsStakeholder, |
| ecore::EObject::toSysML16ModelelementsView, |
| ecore::EObject::toSysML16ModelelementsViewPoint, |
| ecore::EObject::toSysML16PortsAndFlowsAcceptChangeStructuralFeatureEventAction, |
| ecore::EObject::toSysML16PortsAndFlowsChangeStructuralFeatureEvent, |
| ecore::EObject::toSysML16PortsAndFlowsDirectedFeature, |
| ecore::EObject::toSysML16PortsAndFlowsFlowProperty, |
| ecore::EObject::toSysML16PortsAndFlowsFullPort, |
| ecore::EObject::toSysML16PortsAndFlowsInterfaceBlock, |
| ecore::EObject::toSysML16PortsAndFlowsInvocationOnNestedPortAction, |
| ecore::EObject::toSysML16PortsAndFlowsItemFlow, |
| ecore::EObject::toSysML16PortsAndFlowsProxyPort, |
| ecore::EObject::toSysML16PortsAndFlowsTriggerOnNestedPort, |
| ecore::EObject::toSysML16RequirementsCopy, |
| ecore::EObject::toSysML16RequirementsDeriveReqt, |
| ecore::EObject::toSysML16RequirementsRefine, |
| ecore::EObject::toSysML16RequirementsRequirement, |
| ecore::EObject::toSysML16RequirementsSatisfy, |
| ecore::EObject::toSysML16RequirementsTestCase, |
| ecore::EObject::toSysML16RequirementsTrace, |
| ecore::EObject::toSysML16RequirementsVerify |
| {} |
| |
| // Activities |
| mapping ecore::EObject::toSysML16ActivitiesContinuous(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::Continuous)} { |
| init { |
| var newContinuous:SysML16::activities::Continuous := object SysML16::activities::Continuous{ |
| var oldContinuous:SysML14::activities::Continuous := self.oclAsType(SysML14::activities::Continuous); |
| base_Parameter := oldContinuous.base_Parameter; |
| base_ActivityEdge := oldContinuous.base_ActivityEdge; |
| base_ObjectNode := oldContinuous.base_ObjectNode; |
| rate := oldContinuous.rate; |
| }; |
| result := newContinuous.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ActivitiesControlOperator(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::ControlOperator)} { |
| init { |
| var newControlOperator:SysML16::activities::ControlOperator := object SysML16::activities::ControlOperator{ |
| var oldControlOperator:SysML14::activities::ControlOperator := self.oclAsType(SysML14::activities::ControlOperator); |
| base_Operation := oldControlOperator.base_Operation; |
| base_Behavior := oldControlOperator.base_Behavior; |
| }; |
| result := newControlOperator.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ActivitiesDiscrete(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::Discrete)} { |
| init { |
| var newDiscrete:SysML16::activities::Discrete := object SysML16::activities::Discrete{ |
| var oldDiscrete:SysML14::activities::Discrete := self.oclAsType(SysML14::activities::Discrete); |
| base_Parameter := oldDiscrete.base_Parameter; |
| base_ActivityEdge := oldDiscrete.base_ActivityEdge; |
| base_ObjectNode := oldDiscrete.base_ObjectNode; |
| rate := oldDiscrete.rate; |
| }; |
| result := newDiscrete.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ActivitiesNoBuffer(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::NoBuffer)} { |
| init { |
| var newNoBuffer:SysML16::activities::NoBuffer := object SysML16::activities::NoBuffer{ |
| var oldNoBuffer:SysML14::activities::NoBuffer := self.oclAsType(SysML14::activities::NoBuffer); |
| base_ObjectNode := oldNoBuffer.base_ObjectNode; |
| }; |
| result := newNoBuffer.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ActivitiesOptional(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::Optional)} { |
| init { |
| var newOptional:SysML16::activities::Optional := object SysML16::activities::Optional{ |
| var oldOptional:SysML14::activities::Optional := self.oclAsType(SysML14::activities::Optional); |
| base_Parameter := oldOptional.base_Parameter; |
| }; |
| result := newOptional.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ActivitiesOverwrite(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::Overwrite)} { |
| init { |
| var newOverwrite:SysML16::activities::Overwrite := object SysML16::activities::Overwrite{ |
| var oldOverwrite:SysML14::activities::Overwrite := self.oclAsType(SysML14::activities::Overwrite); |
| base_ObjectNode := oldOverwrite.base_ObjectNode; |
| }; |
| result := newOverwrite.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ActivitiesProbability(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::Probability)} { |
| init { |
| var newProbability:SysML16::activities::Probability := object SysML16::activities::Probability{ |
| var oldProbability:SysML14::activities::Probability := self.oclAsType(SysML14::activities::Probability); |
| base_ActivityEdge := oldProbability.base_ActivityEdge; |
| base_ParameterSet := oldProbability.base_ParameterSet; |
| probability := oldProbability.probability; |
| }; |
| result := newProbability.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ActivitiesRate(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::activities::Rate)} { |
| init { |
| var newRate:SysML16::activities::Rate := object SysML16::activities::Rate{ |
| var oldRate:SysML14::activities::Rate := self.oclAsType(SysML14::activities::Rate); |
| base_Parameter := oldRate.base_Parameter; |
| base_ActivityEdge := oldRate.base_ActivityEdge; |
| base_ObjectNode := oldRate.base_ObjectNode; |
| rate := oldRate.rate; |
| }; |
| result := newRate.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| |
| // Allocations |
| mapping ecore::EObject::toSysML16AllocationsAllocate(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::allocations::Allocate)} { |
| init { |
| var newAllocate:SysML16::allocations::Allocate := object SysML16::allocations::Allocate{ |
| var oldAllocate:SysML14::allocations::Allocate := self.oclAsType(SysML14::allocations::Allocate); |
| base_DirectedRelationship := oldAllocate.base_Abstraction; |
| base_Abstraction := oldAllocate.base_Abstraction; |
| sourceContext := oldAllocate.sourceContext; |
| sourcePropertyPath := oldAllocate.sourcePropertyPath; |
| targetContext := oldAllocate.targetContext; |
| targetPropertyPath := oldAllocate.targetPropertyPath; |
| }; |
| result := newAllocate.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16AllocationsAllocateActivityPartition(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::allocations::AllocateActivityPartition)} { |
| init { |
| var newAllocateActivityPartition:SysML16::allocations::AllocateActivityPartition := object SysML16::allocations::AllocateActivityPartition{ |
| var oldAllocateActivityPartition:SysML14::allocations::AllocateActivityPartition := self.oclAsType(SysML14::allocations::AllocateActivityPartition); |
| base_ActivityPartition := oldAllocateActivityPartition.base_ActivityPartition; |
| }; |
| result := newAllocateActivityPartition.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| // Blocks |
| mapping ecore::EObject::toSysML16BlocksAdjunctProperty(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::AdjunctProperty)} { |
| init { |
| var newAdjunctProperty:SysML16::blocks::AdjunctProperty := object SysML16::blocks::AdjunctProperty{ |
| var oldAdjunctProperty:SysML14::blocks::AdjunctProperty := self.oclAsType(SysML14::blocks::AdjunctProperty); |
| base_Property := oldAdjunctProperty.base_Property; |
| principal := oldAdjunctProperty.principal; |
| }; |
| result := newAdjunctProperty.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksBindingConnector(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::BindingConnector)} { |
| init { |
| var newBindingConnector:SysML16::blocks::BindingConnector := object SysML16::blocks::BindingConnector{ |
| var oldBindingConnector:SysML14::blocks::BindingConnector := self.oclAsType(SysML14::blocks::BindingConnector); |
| base_Connector := oldBindingConnector.base_Connector; |
| }; |
| result := newBindingConnector.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksBlock(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::Block)} { |
| init { |
| var newBlock:SysML16::blocks::Block := object SysML16::blocks::Block{ |
| var oldBlock:SysML14::blocks::Block := self.oclAsType(SysML14::blocks::Block); |
| base_Class := oldBlock.base_Class; |
| isEncapsulated := oldBlock.isEncapsulated; |
| }; |
| result := newBlock.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksBoundReference(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::BoundReference)} { |
| init { |
| var newBoundReference:SysML16::blocks::BoundReference := object SysML16::blocks::BoundReference{ |
| var oldBoundReference:SysML14::blocks::BoundReference := self.oclAsType(SysML14::blocks::BoundReference); |
| base_Property := oldBoundReference.base_Property; |
| lower := oldBoundReference.lower; |
| upper := oldBoundReference.upper; |
| boundEnd := oldBoundReference.boundEnd; |
| }; |
| result := newBoundReference.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksClassifierBehaviorProperty(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::ClassifierBehaviorProperty)} { |
| init { |
| var newClassifierBehaviorProperty:SysML16::blocks::ClassifierBehaviorProperty := object SysML16::blocks::ClassifierBehaviorProperty{ |
| var oldClassifierBehaviorProperty:SysML14::blocks::ClassifierBehaviorProperty := self.oclAsType(SysML14::blocks::ClassifierBehaviorProperty); |
| base_Property := oldClassifierBehaviorProperty.base_Property; |
| }; |
| result := newClassifierBehaviorProperty.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksConnectorProperty(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::ConnectorProperty)} { |
| init { |
| var newConnectorProperty:SysML16::blocks::ConnectorProperty := object SysML16::blocks::ConnectorProperty{ |
| var oldConnectorProperty:SysML14::blocks::ConnectorProperty := self.oclAsType(SysML14::blocks::ConnectorProperty); |
| base_Property := oldConnectorProperty.base_Property; |
| connector := oldConnectorProperty.connector; |
| }; |
| result := newConnectorProperty.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksDistributedProperty(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::DistributedProperty)} { |
| init { |
| var newDistributedProperty:SysML16::blocks::DistributedProperty := object SysML16::blocks::DistributedProperty{ |
| var oldDistributedProperty:SysML14::blocks::DistributedProperty := self.oclAsType(SysML14::blocks::DistributedProperty); |
| base_Property := oldDistributedProperty.base_Property; |
| }; |
| result := newDistributedProperty.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksEndPathMultiplicity(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::EndPathMultiplicity)} { |
| init { |
| var newEndPathMultiplicity:SysML16::blocks::EndPathMultiplicity := object SysML16::blocks::EndPathMultiplicity{ |
| var oldEndPathMultiplicity:SysML14::blocks::EndPathMultiplicity := self.oclAsType(SysML14::blocks::EndPathMultiplicity); |
| base_Property := oldEndPathMultiplicity.base_Property; |
| lower := oldEndPathMultiplicity.lower; |
| upper := oldEndPathMultiplicity.upper; |
| }; |
| result := newEndPathMultiplicity.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksNestedConnectorEnd(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::NestedConnectorEnd)} { |
| init { |
| var newNestedConnectorEnd:SysML16::blocks::NestedConnectorEnd := object SysML16::blocks::NestedConnectorEnd{ |
| var oldNestedConnectorEnd:SysML14::blocks::NestedConnectorEnd := self.oclAsType(SysML14::blocks::NestedConnectorEnd); |
| base_ConnectorEnd := oldNestedConnectorEnd.base_ConnectorEnd; |
| base_Element := oldNestedConnectorEnd.base_Element; |
| propertyPath := oldNestedConnectorEnd.propertyPath; |
| }; |
| result := newNestedConnectorEnd.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksParticipantProperty(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::ParticipantProperty)} { |
| init { |
| var newParticipantProperty:SysML16::blocks::ParticipantProperty := object SysML16::blocks::ParticipantProperty{ |
| var oldParticipantProperty:SysML14::blocks::ParticipantProperty := self.oclAsType(SysML14::blocks::ParticipantProperty); |
| base_Property := oldParticipantProperty.base_Property; |
| _end := oldParticipantProperty._end; |
| }; |
| result := newParticipantProperty.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksPropertySpecificType(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::PropertySpecificType)} { |
| init { |
| var newPropertySpecificType:SysML16::blocks::PropertySpecificType := object SysML16::blocks::PropertySpecificType{ |
| var oldPropertySpecificType:SysML14::blocks::PropertySpecificType := self.oclAsType(SysML14::blocks::PropertySpecificType); |
| base_Classifier := oldPropertySpecificType.base_Classifier; |
| }; |
| result := newPropertySpecificType.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16BlocksValueType(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::blocks::ValueType)} { |
| init { |
| var newValueType:SysML16::blocks::ValueType := object SysML16::blocks::ValueType{ |
| var oldValueType:SysML14::blocks::ValueType := self.oclAsType(SysML14::blocks::ValueType); |
| base_DataType := oldValueType.base_DataType; |
| quantityKind := oldValueType.quantityKind; |
| unit := oldValueType.unit; |
| }; |
| result := newValueType.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| |
| // Constraints |
| mapping ecore::EObject::toSysML16ConstraintsConstaintBlock(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::constraintblocks::ConstraintBlock)} { |
| init { |
| var newConstraintBlock:SysML16::constraintblocks::ConstraintBlock := object SysML16::constraintblocks::ConstraintBlock{ |
| var oldConstraintBlock:SysML14::constraintblocks::ConstraintBlock := self.oclAsType(SysML14::constraintblocks::ConstraintBlock); |
| base_Class := oldConstraintBlock.base_Class; |
| isEncapsulated := oldConstraintBlock.isEncapsulated; |
| }; |
| result := newConstraintBlock.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| |
| // Deprecated elements |
| mapping ecore::EObject::toSysML16DeprecatedElementsFlowPort(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::deprecatedelements::FlowPort)} { |
| init { |
| var newFlowPort:SysML16::deprecatedelements::FlowPort := object SysML16::deprecatedelements::FlowPort{ |
| var oldFlowPort:SysML14::deprecatedelements::FlowPort := self.oclAsType(SysML14::deprecatedelements::FlowPort); |
| base_Port := oldFlowPort.base_Port; |
| direction := getDirection(oldFlowPort.direction); |
| }; |
| result := newFlowPort.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16DeprecatedElementsFlowSpecification(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::deprecatedelements::FlowSpecification)} { |
| init { |
| var newFlowSpecification:SysML16::deprecatedelements::FlowSpecification := object SysML16::deprecatedelements::FlowSpecification{ |
| var oldFlowSpecification:SysML14::deprecatedelements::FlowSpecification := self.oclAsType(SysML14::deprecatedelements::FlowSpecification); |
| base_Interface := oldFlowSpecification.base_Interface; |
| }; |
| result := newFlowSpecification.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| |
| // Model Elements |
| mapping ecore::EObject::toSysML16ModelelementsConform(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::Conform)} { |
| init { |
| var newConform:SysML16::modelelements::Conform := object SysML16::modelelements::Conform{ |
| var oldConform:SysML14::modelelements::Conform := self.oclAsType(SysML14::modelelements::Conform); |
| base_Generalization := oldConform.base_Generalization; |
| }; |
| result := newConform.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ModelelementsElementGroup(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::ElementGroup)} { |
| init { |
| var newElementGroup:SysML16::modelelements::ElementGroup := object SysML16::modelelements::ElementGroup{ |
| var oldElementGroup:SysML14::modelelements::ElementGroup := self.oclAsType(SysML14::modelelements::ElementGroup); |
| base_Comment := oldElementGroup.base_Comment; |
| name := oldElementGroup.name; |
| orderedMember := oldElementGroup.orderedMemeber; |
| }; |
| result := newElementGroup.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ModelelementsExpose(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::Expose)} { |
| init { |
| var newExpose:SysML16::modelelements::Expose := object SysML16::modelelements::Expose{ |
| var oldExpose:SysML14::modelelements::Expose := self.oclAsType(SysML14::modelelements::Expose); |
| base_Dependency := oldExpose.base_Dependency; |
| }; |
| result := newExpose.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ModelelementsProblem(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::Problem)} { |
| init { |
| var newProblem:SysML16::modelelements::Problem := object SysML16::modelelements::Problem{ |
| var oldProblem:SysML14::modelelements::Problem := self.oclAsType(SysML14::modelelements::Problem); |
| base_Comment := oldProblem.base_Comment; |
| }; |
| result := newProblem.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ModelelementsRationale(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::Rationale)} { |
| init { |
| var newRationale:SysML16::modelelements::Rationale := object SysML16::modelelements::Rationale{ |
| var oldRationale:SysML14::modelelements::Rationale := self.oclAsType(SysML14::modelelements::Rationale); |
| base_Comment := oldRationale.base_Comment; |
| }; |
| result := newRationale.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16ModelelementsStakeholder(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::Stakeholder)} { |
| init { |
| var newStakeholder:SysML16::modelelements::Stakeholder := object SysML16::modelelements::Stakeholder{ |
| var oldStakeholder:SysML14::modelelements::Stakeholder := self.oclAsType(SysML14::modelelements::Stakeholder); |
| base_Classifier := oldStakeholder.base_Classifier; |
| concernList := oldStakeholder.concernList; |
| }; |
| result := newStakeholder.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping SysML14::modelelements::Stakeholder::toSysML16ModelelementsStakeholder(model:UML::Model) : SysML16::modelelements::Stakeholder when {self.oclIsTypeOf(SysML14::modelelements::Stakeholder)} { |
| init { |
| var newStakeholder:SysML16::modelelements::Stakeholder := object SysML16::modelelements::Stakeholder{ |
| var oldStakeholder:SysML14::modelelements::Stakeholder := self.oclAsType(SysML14::modelelements::Stakeholder); |
| base_Classifier := oldStakeholder.base_Classifier; |
| concernList := oldStakeholder.concernList; |
| }; |
| result := newStakeholder; |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result.oclAsType(ecore::EObject)); |
| } |
| |
| mapping ecore::EObject::toSysML16ModelelementsView(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::View)} { |
| init { |
| var newView:SysML16::modelelements::View := object SysML16::modelelements::View{ |
| var oldView:SysML14::modelelements::View := self.oclAsType(SysML14::modelelements::View); |
| base_Class := oldView.base_Class; |
| }; |
| result := newView.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result.oclAsType(ecore::EObject)); |
| } |
| |
| mapping ecore::EObject::toSysML16ModelelementsViewPoint(inout model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::modelelements::Viewpoint)} { |
| init { |
| var newViewPoint:SysML16::modelelements::Viewpoint := object SysML16::modelelements::Viewpoint{ |
| var oldViewPoint:SysML14::modelelements::Viewpoint := self.oclAsType(SysML14::modelelements::Viewpoint); |
| base_Class := oldViewPoint.base_Class; |
| concernList := oldViewPoint.concernList; |
| language := oldViewPoint.language; |
| presentation := oldViewPoint.presentation; |
| purpose := oldViewPoint.purpose; |
| stakeholder := oldViewPoint.stakeholder.map toSysML16ModelelementsStakeholder(model); |
| }; |
| result := newViewPoint.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| |
| // Port and flows |
| mapping ecore::EObject::toSysML16PortsAndFlowsAcceptChangeStructuralFeatureEventAction(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::AcceptChangeStructuralFeatureEventAction)} { |
| init { |
| var newAcceptChangeStructuralFeatureEventAction:SysML16::portsandflows::AcceptChangeStructuralFeatureEventAction := object SysML16::portsandflows::AcceptChangeStructuralFeatureEventAction{ |
| var oldAcceptChangeStructuralFeatureEventAction:SysML14::portsandflows::AcceptChangeStructuralFeatureEventAction := self.oclAsType(SysML14::portsandflows::AcceptChangeStructuralFeatureEventAction); |
| base_AcceptEventAction := oldAcceptChangeStructuralFeatureEventAction.base_AcceptEventAction; |
| }; |
| result := newAcceptChangeStructuralFeatureEventAction.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsChangeStructuralFeatureEvent(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::ChangeStructuralFeatureEvent)} { |
| init { |
| var newChangeStructuralFeatureEvent:SysML16::portsandflows::ChangeStructuralFeatureEvent := object SysML16::portsandflows::ChangeStructuralFeatureEvent{ |
| var oldChangeStructuralFeatureEvent:SysML14::portsandflows::ChangeStructuralFeatureEvent := self.oclAsType(SysML14::portsandflows::ChangeStructuralFeatureEvent); |
| base_ChangeEvent := oldChangeStructuralFeatureEvent.base_ChangeEvent; |
| structuralFeature := oldChangeStructuralFeatureEvent.structuralFeature; |
| }; |
| result := newChangeStructuralFeatureEvent.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsDirectedFeature(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::DirectedFeature)} { |
| init { |
| var newDirectedFeature:SysML16::portsandflows::DirectedFeature := object SysML16::portsandflows::DirectedFeature{ |
| var oldDirectedFeature:SysML14::portsandflows::DirectedFeature := self.oclAsType(SysML14::portsandflows::DirectedFeature); |
| base_Feature := oldDirectedFeature.base_Feature; |
| featureDirection := getDirection(oldDirectedFeature.featureDirection); |
| }; |
| result := newDirectedFeature.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsFlowProperty(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::FlowProperty)} { |
| init { |
| var newFlowProperty:SysML16::portsandflows::FlowProperty := object SysML16::portsandflows::FlowProperty{ |
| var oldFlowProperty:SysML14::portsandflows::FlowProperty := self.oclAsType(SysML14::portsandflows::FlowProperty); |
| base_Property := oldFlowProperty.base_Property; |
| direction := getDirection(oldFlowProperty.direction); |
| }; |
| result := newFlowProperty.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsFullPort(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::FullPort)} { |
| init { |
| var newFullPort:SysML16::portsandflows::FullPort := object SysML16::portsandflows::FullPort{ |
| var oldFullPort:SysML14::portsandflows::FullPort := self.oclAsType(SysML14::portsandflows::FullPort); |
| base_Port := oldFullPort.base_Port; |
| }; |
| result := newFullPort.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsInterfaceBlock(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::InterfaceBlock)} { |
| init { |
| var newInterfaceBlock:SysML16::portsandflows::InterfaceBlock := object SysML16::portsandflows::InterfaceBlock{ |
| var oldInterfaceBlock:SysML14::portsandflows::InterfaceBlock := self.oclAsType(SysML14::portsandflows::InterfaceBlock); |
| base_Class := oldInterfaceBlock.base_Class; |
| isEncapsulated := oldInterfaceBlock.isEncapsulated; |
| }; |
| result := newInterfaceBlock.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsInvocationOnNestedPortAction(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::InvocationOnNestedPortAction)} { |
| init { |
| var newInvocationOnNestedPortAction:SysML16::portsandflows::InvocationOnNestedPortAction := object SysML16::portsandflows::InvocationOnNestedPortAction{ |
| var oldInvocationOnNestedPortAction:SysML14::portsandflows::InvocationOnNestedPortAction := self.oclAsType(SysML14::portsandflows::InvocationOnNestedPortAction); |
| base_InvocationAction := oldInvocationOnNestedPortAction.base_InvocationAction; |
| base_Element := oldInvocationOnNestedPortAction.base_Element; |
| onNestedPort := oldInvocationOnNestedPortAction.onNestedPort; |
| propertyPath := oldInvocationOnNestedPortAction.propertyPath; |
| }; |
| result := newInvocationOnNestedPortAction.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsItemFlow(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::ItemFlow)} { |
| init { |
| var newItemFlow:SysML16::portsandflows::ItemFlow := object SysML16::portsandflows::ItemFlow{ |
| var oldItemFlow:SysML14::portsandflows::ItemFlow := self.oclAsType(SysML14::portsandflows::ItemFlow); |
| base_InformationFlow := oldItemFlow.base_InformationFlow; |
| itemProperty := oldItemFlow.itemProperty; |
| }; |
| result := newItemFlow.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsProxyPort(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::ProxyPort)} { |
| init { |
| var newProxyPort:SysML16::portsandflows::ProxyPort := object SysML16::portsandflows::ProxyPort{ |
| var oldProxyPort:SysML14::portsandflows::ProxyPort := self.oclAsType(SysML14::portsandflows::ProxyPort); |
| base_Port := oldProxyPort.base_Port; |
| }; |
| result := newProxyPort.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16PortsAndFlowsTriggerOnNestedPort(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::portsandflows::TriggerOnNestedPort)} { |
| init { |
| var newTriggerOnNestedPort:SysML16::portsandflows::TriggerOnNestedPort := object SysML16::portsandflows::TriggerOnNestedPort{ |
| var oldTriggerOnNestedPort:SysML14::portsandflows::TriggerOnNestedPort := self.oclAsType(SysML14::portsandflows::TriggerOnNestedPort); |
| base_Element := oldTriggerOnNestedPort.base_Element; |
| base_Trigger := oldTriggerOnNestedPort.base_Trigger; |
| propertyPath := oldTriggerOnNestedPort.propertyPath; |
| onNestedPort := oldTriggerOnNestedPort.onNestedPort; |
| }; |
| result := newTriggerOnNestedPort.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| |
| // Requirements |
| mapping ecore::EObject::toSysML16RequirementsCopy(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::Copy)} { |
| init { |
| var newCopy:SysML16::requirements::Copy := object SysML16::requirements::Copy{ |
| var oldCopy:SysML14::requirements::Copy := self.oclAsType(SysML14::requirements::Copy); |
| base_DirectedRelationship := oldCopy.base_DirectedRelationship; |
| base_Abstraction := oldCopy.base_Abstraction; |
| sourceContext := oldCopy.sourceContext; |
| sourcePropertyPath := oldCopy.sourcePropertyPath; |
| targetContext := oldCopy.targetContext; |
| targetPropertyPath := oldCopy.targetPropertyPath; |
| }; |
| result := newCopy.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16RequirementsDeriveReqt(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::DeriveReqt)} { |
| init { |
| var newDeriveReqT:SysML16::requirements::DeriveReqt := object SysML16::requirements::DeriveReqt{ |
| var oldDeriveReqT:SysML14::requirements::DeriveReqt := self.oclAsType(SysML14::requirements::DeriveReqt); |
| base_DirectedRelationship := oldDeriveReqT.base_DirectedRelationship; |
| base_Abstraction := oldDeriveReqT.base_Abstraction; |
| sourceContext := oldDeriveReqT.sourceContext; |
| sourcePropertyPath := oldDeriveReqT.sourcePropertyPath; |
| targetContext := oldDeriveReqT.targetContext; |
| targetPropertyPath := oldDeriveReqT.targetPropertyPath; |
| }; |
| result := newDeriveReqT.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16RequirementsRequirement(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::Requirement)} { |
| init { |
| var newRequirement:SysML16::requirements::Requirement := object SysML16::requirements::Requirement{ |
| var oldRequirement:SysML14::requirements::Requirement := self.oclAsType(SysML14::requirements::Requirement); |
| base_Class := oldRequirement.base_Class; |
| id := oldRequirement.id; |
| text := oldRequirement.text; |
| }; |
| result := newRequirement.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16RequirementsRefine(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::Refine)} { |
| init { |
| var newRefine:SysML16::requirements::Refine := object SysML16::requirements::Refine{ |
| var oldRefine:SysML14::requirements::Refine := self.oclAsType(SysML14::requirements::Refine); |
| base_DirectedRelationship := oldRefine.base_DirectedRelationship; |
| base_Abstraction := oldRefine.base_Abstraction; |
| sourceContext := oldRefine.sourceContext; |
| sourcePropertyPath := oldRefine.sourcePropertyPath; |
| targetContext := oldRefine.targetContext; |
| targetPropertyPath := oldRefine.targetPropertyPath; |
| }; |
| result := newRefine.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16RequirementsSatisfy(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::Satisfy)} { |
| init { |
| var newSatisfy:SysML16::requirements::Satisfy := object SysML16::requirements::Satisfy{ |
| var oldSatisfy:SysML14::requirements::Satisfy := self.oclAsType(SysML14::requirements::Satisfy); |
| base_DirectedRelationship := oldSatisfy.base_DirectedRelationship; |
| base_Abstraction := oldSatisfy.base_Abstraction; |
| sourceContext := oldSatisfy.sourceContext; |
| sourcePropertyPath := oldSatisfy.sourcePropertyPath; |
| targetContext := oldSatisfy.targetContext; |
| targetPropertyPath := oldSatisfy.targetPropertyPath; |
| }; |
| result := newSatisfy.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16RequirementsTestCase(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::TestCase)} { |
| init { |
| var newTestCase:SysML16::requirements::TestCase := object SysML16::requirements::TestCase{ |
| var oldTestCase:SysML14::requirements::TestCase := self.oclAsType(SysML14::requirements::TestCase); |
| base_Behavior := oldTestCase.base_Behavior; |
| base_Operation := oldTestCase.base_Operation; |
| }; |
| result := newTestCase.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16RequirementsTrace(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::Trace)} { |
| init { |
| var newTrace:SysML16::requirements::Trace := object SysML16::requirements::Trace{ |
| var oldTrace:SysML14::requirements::Trace := self.oclAsType(SysML14::requirements::Trace); |
| base_DirectedRelationship := oldTrace.base_DirectedRelationship; |
| base_Abstraction := oldTrace.base_Abstraction; |
| sourceContext := oldTrace.sourceContext; |
| sourcePropertyPath := oldTrace.sourcePropertyPath; |
| targetContext := oldTrace.targetContext; |
| targetPropertyPath := oldTrace.targetPropertyPath; |
| }; |
| result := newTrace.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| mapping ecore::EObject::toSysML16RequirementsVerify(model:UML::Model) : ecore::EObject when {self.oclIsTypeOf(SysML14::requirements::Verify)} { |
| init { |
| var newVerify:SysML16::requirements::Verify := object SysML16::requirements::Verify{ |
| var oldVerify:SysML14::requirements::Verify := self.oclAsType(SysML14::requirements::Verify); |
| base_DirectedRelationship := oldVerify.base_DirectedRelationship; |
| base_Abstraction := oldVerify.base_Abstraction; |
| sourceContext := oldVerify.sourceContext; |
| sourcePropertyPath := oldVerify.sourcePropertyPath; |
| targetContext := oldVerify.targetContext; |
| targetPropertyPath := oldVerify.targetPropertyPath; |
| }; |
| result := newVerify.oclAsType(ecore::EObject); |
| } |
| addToResourceContent(model.oclAsType(ecore::EObject), result); |
| } |
| |
| |
| // Utility to remove all SysML 1.4 Profiles |
| mapping ProfileApplication::removeSysML14Profile(model:UML::Model) when { isSysML14Profile(self); }{ |
| model.unapplyProfile(self.appliedProfile); |
| } |