Initial refactoring of the Façade for UML-RT capsules and protocols as a generated model with, of course, much hand-coding of the derivations of façade properties. The UML-RT metamodel and Papyrus-RT Core test suites pass. Change-Id: I84bad762f5c4331537d22b66de00aae73c7ee5f3
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml index 439773b..f884ad5 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml
@@ -1,80 +1,80 @@ <?xml version="1.0" encoding="UTF-8"?> <uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_1h74oEeVEeO0lv5O1DTHOQ" name="UMLRealTime" URI="http://www.eclipse.org/papyrus/umlrt" metaclassReference="_0Mm20GDjEeOesvHnEWH_sQ _922ukGDjEeOesvHnEWH_sQ _923VoGDjEeOesvHnEWH_sQ _923VoWDjEeOesvHnEWH_sQ _NoL5UGDkEeOesvHnEWH_sQ _bmzwUGDkEeOesvHnEWH_sQ _bmzwUWDkEeOesvHnEWH_sQ _IJTCAAbYEeSFB8mUNT_s_w _vk_NoAb2EeSFB8mUNT_s_w"> - <elementImport xmi:type="uml:ElementImport" xmi:id="_0Mm20GDjEeOesvHnEWH_sQ" alias="Class"> + <elementImport xmi:id="_0Mm20GDjEeOesvHnEWH_sQ" alias="Class"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_922ukGDjEeOesvHnEWH_sQ" alias="Property"> + <elementImport xmi:id="_922ukGDjEeOesvHnEWH_sQ" alias="Property"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_923VoGDjEeOesvHnEWH_sQ" alias="Port"> + <elementImport xmi:id="_923VoGDjEeOesvHnEWH_sQ" alias="Port"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Port"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_923VoWDjEeOesvHnEWH_sQ" alias="Connector"> + <elementImport xmi:id="_923VoWDjEeOesvHnEWH_sQ" alias="Connector"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_NoL5UGDkEeOesvHnEWH_sQ" alias="RedefinableElement"> + <elementImport xmi:id="_NoL5UGDkEeOesvHnEWH_sQ" alias="RedefinableElement"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#RedefinableElement"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_bmzwUGDkEeOesvHnEWH_sQ" alias="Package"> + <elementImport xmi:id="_bmzwUGDkEeOesvHnEWH_sQ" alias="Package"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_bmzwUWDkEeOesvHnEWH_sQ" alias="Interface"> + <elementImport xmi:id="_bmzwUWDkEeOesvHnEWH_sQ" alias="Interface"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Interface"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_IJTCAAbYEeSFB8mUNT_s_w" alias="Collaboration"> + <elementImport xmi:id="_IJTCAAbYEeSFB8mUNT_s_w" alias="Collaboration"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Collaboration"/> </elementImport> - <elementImport xmi:type="uml:ElementImport" xmi:id="_vk_NoAb2EeSFB8mUNT_s_w" alias="CallEvent"> + <elementImport xmi:id="_vk_NoAb2EeSFB8mUNT_s_w" alias="CallEvent"> <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#CallEvent"/> </elementImport> - <packageImport xmi:type="uml:PackageImport" xmi:id="_1h74okeVEeO0lv5O1DTHOQ"> + <packageImport xmi:id="_1h74okeVEeO0lv5O1DTHOQ"> <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> </packageImport> <packagedElement xmi:type="uml:Stereotype" xmi:id="_hcMIwEhNEeO0lv5O1DTHOQ" name="Capsule"> - <ownedRule xmi:type="uml:Constraint" xmi:id="_-g8psEhTEeO0lv5O1DTHOQ" name="Capsules are always active classifiers" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_-g8psEhTEeO0lv5O1DTHOQ" name="Capsules are always active classifiers" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_TF_bEEhUEeO0lv5O1DTHOQ"> <language>OCL</language> <body>base_Class.isActive</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_t6v3AEhUEeO0lv5O1DTHOQ" name="A capsule cannot have Reception features" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_t6v3AEhUEeO0lv5O1DTHOQ" name="A capsule cannot have Reception features" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_4YNUYEhUEeO0lv5O1DTHOQ"> <language>OCL</language> <body>base_Class.ownedReception->isEmpty()</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_8k0ewEhUEeO0lv5O1DTHOQ" name="A capsule class can always be subclassed" constrainedElement="_1h74oEeVEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_8k0ewEhUEeO0lv5O1DTHOQ" name="A capsule class can always be subclassed" constrainedElement="_1h74oEeVEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_GFmRcEhVEeO0lv5O1DTHOQ"> <language>OCL</language> <body>not(base_Class.isFinalSpecialization)</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_I1oJEEhVEeO0lv5O1DTHOQ" name="A capsule can have at most one superclass" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_I1oJEEhVEeO0lv5O1DTHOQ" name="A capsule can have at most one superclass" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_U-Hk4EhVEeO0lv5O1DTHOQ"> <language>OCL</language> <body>(base_Class.generalization->size()) <= 1</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_fuuAsEhVEeO0lv5O1DTHOQ" name="Capsule classes are always substitutable" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_fuuAsEhVEeO0lv5O1DTHOQ" name="Capsule classes are always substitutable" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_zj-68EhVEeO0lv5O1DTHOQ"> <language>OCL</language> <body>(base_Class.generalization->notEmpty()) implies (base_Class.generalization->forAll (g | g.isSubstitutable))</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_7I_kgEhVEeO0lv5O1DTHOQ" name="All attributes of a capsule class can have at most one type" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_7I_kgEhVEeO0lv5O1DTHOQ" name="All attributes of a capsule class can have at most one type" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_KrqoMEhWEeO0lv5O1DTHOQ"> <language>OCL</language> <body>base_Class.ownedAttribute->forAll(at | at.type->size() <= 1)</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_EBz7IEhdEeO0lv5O1DTHOQ" name="All operations of a capsule are guarded" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_EBz7IEhdEeO0lv5O1DTHOQ" name="All operations of a capsule are guarded" constrainedElement="_hcMIwEhNEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_YhzNYEhdEeO0lv5O1DTHOQ"> <language>OCL</language> <body>base_Class.ownedOperation->notEmpty() implies 
 (base_Class.ownedOperation->forAll(op | op.concurrency = UML::CallConcurrencyKind::guarded))</body> </specification> </ownedRule> - <ownedAttribute xmi:type="uml:Property" xmi:id="_wWou0EhNEeO0lv5O1DTHOQ" name="base_Class" association="_wWu1cEhNEeO0lv5O1DTHOQ"> + <ownedAttribute xmi:id="_wWou0EhNEeO0lv5O1DTHOQ" name="base_Class" association="_wWu1cEhNEeO0lv5O1DTHOQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> </ownedAttribute> </packagedElement> @@ -82,25 +82,25 @@ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_wWu1cUhNEeO0lv5O1DTHOQ" name="extension_Capsule" type="_hcMIwEhNEeO0lv5O1DTHOQ" aggregation="composite" association="_wWu1cEhNEeO0lv5O1DTHOQ"/> </packagedElement> <packagedElement xmi:type="uml:Stereotype" xmi:id="_EQwT4EhOEeO0lv5O1DTHOQ" name="CapsulePart"> - <ownedRule xmi:type="uml:Constraint" xmi:id="__uQvcJ3KEeW6VrvIZUJreg" name="Fixed capsule parts cannot have variable multiplicity" constrainedElement="_EQwT4EhOEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="__uQvcJ3KEeW6VrvIZUJreg" name="Fixed capsule parts cannot have variable multiplicity" constrainedElement="_EQwT4EhOEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_YDt3YJ3LEeW6VrvIZUJreg" name=""> <language>OCL</language> <body>(base_Property.aggregation = UML::AggregationKind::composite and base_Property.lower > 0) implies (base_Property.upper = base_Property.lower)</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_wTG4YOQ8EeW10dPuv-Yr7w" name="Plugin capsule parts must have a lower multiplicity of zero" constrainedElement="_EQwT4EhOEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_wTG4YOQ8EeW10dPuv-Yr7w" name="Plugin capsule parts must have a lower multiplicity of zero" constrainedElement="_EQwT4EhOEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_cwk3cOQ9EeW10dPuv-Yr7w"> <language>OCL</language> <body>(base_Property.aggregation = UML::AggregationKind::shared) implies (base_Property.lower = 0)</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_9-2JgOEkEeWW8tvNzax4PA" name="Capsule parts must have aggregation" constrainedElement="_EQwT4EhOEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_9-2JgOEkEeWW8tvNzax4PA" name="Capsule parts must have aggregation" constrainedElement="_EQwT4EhOEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_9-2JgeEkEeWW8tvNzax4PA" name=""> <language>OCL</language> <body>base_Property.aggregation <> UML::AggregationKind::none</body> </specification> </ownedRule> - <ownedAttribute xmi:type="uml:Property" xmi:id="_HcX7UEhOEeO0lv5O1DTHOQ" name="base_Property" association="_HcX7UUhOEeO0lv5O1DTHOQ"> + <ownedAttribute xmi:id="_HcX7UEhOEeO0lv5O1DTHOQ" name="base_Property" association="_HcX7UUhOEeO0lv5O1DTHOQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/> </ownedAttribute> </packagedElement> @@ -108,24 +108,24 @@ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HcX7UkhOEeO0lv5O1DTHOQ" name="extension_CapsulePart" type="_EQwT4EhOEeO0lv5O1DTHOQ" aggregation="composite" association="_HcX7UUhOEeO0lv5O1DTHOQ"/> </packagedElement> <packagedElement xmi:type="uml:Stereotype" xmi:id="_8GLpsEhOEeO0lv5O1DTHOQ" name="Protocol"> - <ownedRule xmi:type="uml:Constraint" xmi:id="_IQKCgAbZEeSFB8mUNT_s_w" name="Protocols can have at most one generalization" constrainedElement="_8GLpsEhOEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_IQKCgAbZEeSFB8mUNT_s_w" name="Protocols can have at most one generalization" constrainedElement="_8GLpsEhOEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_vPY3QAbZEeSFB8mUNT_s_w"> <language>OCL</language> <body>base_Collaboration.generalization->size() <= 1</body> </specification> </ownedRule> - <ownedAttribute xmi:type="uml:Property" xmi:id="_RQX6AGF-EeOesvHnEWH_sQ" name="base_Collaboration" association="_RQYhEGF-EeOesvHnEWH_sQ"> + <ownedAttribute xmi:id="_RQX6AGF-EeOesvHnEWH_sQ" name="base_Collaboration" association="_RQYhEGF-EeOesvHnEWH_sQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Collaboration"/> </ownedAttribute> </packagedElement> <packagedElement xmi:type="uml:Stereotype" xmi:id="_GR86IEhPEeO0lv5O1DTHOQ" name="RTPort"> - <ownedRule xmi:type="uml:Constraint" xmi:id="_1UM30GfEEeO447LqwGjc0A" name="Only SPPs can publish their name" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_1UM30GfEEeO447LqwGjc0A" name="Only SPPs can publish their name" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_M-gxAGfFEeO447LqwGjc0A"> <language>OCL</language> <body>isPublish = (base_Port.isService and not isWired)</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_2UsEcGfEEeO447LqwGjc0A" name="All service ports must have public visibility and protected otherwise" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_2UsEcGfEEeO447LqwGjc0A" name="All service ports must have public visibility and protected otherwise" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_DVDG8GfGEeO447LqwGjc0A"> <language>OCL</language> <body>if (base_Port.isService) then
 @@ -135,42 +135,42 @@ endif</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_3Xp9UGfEEeO447LqwGjc0A" name="All unwired ports (SAPs and SPPs) must be behavior ports" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_3Xp9UGfEEeO447LqwGjc0A" name="All unwired ports (SAPs and SPPs) must be behavior ports" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_u6mmkGfGEeO447LqwGjc0A" name="All unwired ports (SAPs and SPPs) must be behavior ports"> <language>OCL</language> <body>(not isWired) implies (base_Port.isBehavior)</body> </specification> </ownedRule> - <ownedRule xmi:type="uml:Constraint" xmi:id="_QJC94GfGEeO447LqwGjc0A" name="A relay port must be a service port" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_QJC94GfGEeO447LqwGjc0A" name="A relay port must be a service port" constrainedElement="_GR86IEhPEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_K9NVsGfHEeO447LqwGjc0A" name="A relay port must be a service port"> <language>OCL</language> <body>(isWired and not base_Port.isBehavior) implies (base_Port.isService)</body> </specification> </ownedRule> - <ownedAttribute xmi:type="uml:Property" xmi:id="_PV8DIEhPEeO0lv5O1DTHOQ" name="isNotification"> + <ownedAttribute xmi:id="_PV8DIEhPEeO0lv5O1DTHOQ" name="isNotification"> <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="_S5T74EhSEeO0lv5O1DTHOQ"/> </ownedAttribute> - <ownedAttribute xmi:type="uml:Property" xmi:id="_Q9f20EhPEeO0lv5O1DTHOQ" name="isPublish"> + <ownedAttribute xmi:id="_Q9f20EhPEeO0lv5O1DTHOQ" name="isPublish"> <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="_U3AXoEhSEeO0lv5O1DTHOQ"/> </ownedAttribute> - <ownedAttribute xmi:type="uml:Property" xmi:id="_ScT-MEhPEeO0lv5O1DTHOQ" name="isWired"> + <ownedAttribute xmi:id="_ScT-MEhPEeO0lv5O1DTHOQ" name="isWired"> <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="_W-rOwEhSEeO0lv5O1DTHOQ" value="true"/> </ownedAttribute> - <ownedAttribute xmi:type="uml:Property" xmi:id="_T2bLwEhPEeO0lv5O1DTHOQ" name="registration" type="_t8sxEEhPEeO0lv5O1DTHOQ"> + <ownedAttribute xmi:id="_T2bLwEhPEeO0lv5O1DTHOQ" name="registration" type="_t8sxEEhPEeO0lv5O1DTHOQ"> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_I3PE4EhQEeO0lv5O1DTHOQ"/> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_I3VLgEhQEeO0lv5O1DTHOQ" value="1"/> <defaultValue xmi:type="uml:Expression" xmi:id="_wsXU8EhSEeO0lv5O1DTHOQ" type="_t8sxEEhPEeO0lv5O1DTHOQ"> <operand xmi:type="uml:InstanceValue" xmi:id="_wsXU8UhSEeO0lv5O1DTHOQ" instance="_xZXFMEhPEeO0lv5O1DTHOQ"/> </defaultValue> </ownedAttribute> - <ownedAttribute xmi:type="uml:Property" xmi:id="_U-tpgEhPEeO0lv5O1DTHOQ" name="registrationOverride"> + <ownedAttribute xmi:id="_U-tpgEhPEeO0lv5O1DTHOQ" name="registrationOverride"> <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> <defaultValue xmi:type="uml:LiteralString" xmi:id="_iTD3oEhTEeO0lv5O1DTHOQ" value=""/> </ownedAttribute> - <ownedAttribute xmi:type="uml:Property" xmi:id="_Vn6XgEhPEeO0lv5O1DTHOQ" name="base_Port" association="_Vn6XgUhPEeO0lv5O1DTHOQ"> + <ownedAttribute xmi:id="_Vn6XgEhPEeO0lv5O1DTHOQ" name="base_Port" association="_Vn6XgUhPEeO0lv5O1DTHOQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Port"/> </ownedAttribute> </packagedElement> @@ -178,18 +178,18 @@ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Vn6XgkhPEeO0lv5O1DTHOQ" name="extension_RTPort" type="_GR86IEhPEeO0lv5O1DTHOQ" aggregation="composite" association="_Vn6XgUhPEeO0lv5O1DTHOQ"/> </packagedElement> <packagedElement xmi:type="uml:Enumeration" xmi:id="_t8sxEEhPEeO0lv5O1DTHOQ" name="PortRegistrationType"> - <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_xZXFMEhPEeO0lv5O1DTHOQ" name="Automatic"/> - <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_yiLHYEhPEeO0lv5O1DTHOQ" name="Application"/> - <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_0DSU0EhPEeO0lv5O1DTHOQ" name="AutomaticLocked"/> + <ownedLiteral xmi:id="_xZXFMEhPEeO0lv5O1DTHOQ" name="Automatic"/> + <ownedLiteral xmi:id="_yiLHYEhPEeO0lv5O1DTHOQ" name="Application"/> + <ownedLiteral xmi:id="_0DSU0EhPEeO0lv5O1DTHOQ" name="AutomaticLocked"/> </packagedElement> <packagedElement xmi:type="uml:Stereotype" xmi:id="_Tv_-MEhQEeO0lv5O1DTHOQ" name="RTConnector"> - <ownedRule xmi:type="uml:Constraint" xmi:id="_CIqywEheEeO0lv5O1DTHOQ" name="Only binary connectors are allowed" constrainedElement="_Tv_-MEhQEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_CIqywEheEeO0lv5O1DTHOQ" name="Only binary connectors are allowed" constrainedElement="_Tv_-MEhQEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_P3D1YEheEeO0lv5O1DTHOQ"> <language>OCL</language> <body>base_Connector.end->size() = 2</body> </specification> </ownedRule> - <ownedAttribute xmi:type="uml:Property" xmi:id="_VSnAcEhQEeO0lv5O1DTHOQ" name="base_Connector" association="_VSnAcUhQEeO0lv5O1DTHOQ"> + <ownedAttribute xmi:id="_VSnAcEhQEeO0lv5O1DTHOQ" name="base_Connector" association="_VSnAcUhQEeO0lv5O1DTHOQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/> </ownedAttribute> </packagedElement> @@ -197,7 +197,7 @@ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_VSnAckhQEeO0lv5O1DTHOQ" name="extension_RTConnector" type="_Tv_-MEhQEeO0lv5O1DTHOQ" aggregation="composite" association="_VSnAcUhQEeO0lv5O1DTHOQ"/> </packagedElement> <packagedElement xmi:type="uml:Stereotype" xmi:id="_hSaaUEhQEeO0lv5O1DTHOQ" name="ProtocolContainer"> - <ownedAttribute xmi:type="uml:Property" xmi:id="_lAOv4EhQEeO0lv5O1DTHOQ" name="base_Package" association="_lAU2gEhQEeO0lv5O1DTHOQ"> + <ownedAttribute xmi:id="_lAOv4EhQEeO0lv5O1DTHOQ" name="base_Package" association="_lAU2gEhQEeO0lv5O1DTHOQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/> </ownedAttribute> </packagedElement> @@ -205,7 +205,7 @@ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_lAU2gUhQEeO0lv5O1DTHOQ" name="extension_ProtocolContainer" type="_hSaaUEhQEeO0lv5O1DTHOQ" aggregation="composite" association="_lAU2gEhQEeO0lv5O1DTHOQ"/> </packagedElement> <packagedElement xmi:type="uml:Stereotype" xmi:id="_qJOC8EhQEeO0lv5O1DTHOQ" name="RTRedefinedElement"> - <ownedRule xmi:type="uml:Constraint" xmi:id="_Cvp-EGfKEeO447LqwGjc0A" name="Exclusion can only be applied to some UML-RT model elements" constrainedElement="_qJOC8EhQEeO0lv5O1DTHOQ"> + <ownedRule xmi:id="_Cvp-EGfKEeO447LqwGjc0A" name="Exclusion can only be applied to some UML-RT model elements" constrainedElement="_qJOC8EhQEeO0lv5O1DTHOQ"> <specification xmi:type="uml:OpaqueExpression" xmi:id="_ufO8YGfKEeO447LqwGjc0A"> <language>OCL</language> <body>let el = base_RedefinableElement in
 @@ -219,10 +219,10 @@ el.oclIsKindOf(UML::Transition))</body> </specification> </ownedRule> - <ownedAttribute xmi:type="uml:Property" xmi:id="_tCAN8EhQEeO0lv5O1DTHOQ" name="base_RedefinableElement" association="_tCAN8UhQEeO0lv5O1DTHOQ"> + <ownedAttribute xmi:id="_tCAN8EhQEeO0lv5O1DTHOQ" name="base_RedefinableElement" association="_tCAN8UhQEeO0lv5O1DTHOQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#RedefinableElement"/> </ownedAttribute> - <ownedAttribute xmi:type="uml:Property" xmi:id="_jdLp4FqeEeS6ZrwKK5dCsw" name="rootFragment"> + <ownedAttribute xmi:id="_jdLp4FqeEeS6ZrwKK5dCsw" name="rootFragment"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#RedefinableElement"/> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_9KkOEFqeEeS6ZrwKK5dCsw"/> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_9KlcMFqeEeS6ZrwKK5dCsw" value="1"/> @@ -232,10 +232,10 @@ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_tCAN8khQEeO0lv5O1DTHOQ" name="extension_RTRedefinedElement" type="_qJOC8EhQEeO0lv5O1DTHOQ" aggregation="composite" association="_tCAN8UhQEeO0lv5O1DTHOQ"/> </packagedElement> <packagedElement xmi:type="uml:Stereotype" xmi:id="_g6khEGDFEeOesvHnEWH_sQ" name="RTMessageSet"> - <ownedAttribute xmi:type="uml:Property" xmi:id="_iwFRMGDFEeOesvHnEWH_sQ" name="base_Interface" association="_iwFRMWDFEeOesvHnEWH_sQ"> + <ownedAttribute xmi:id="_iwFRMGDFEeOesvHnEWH_sQ" name="base_Interface" association="_iwFRMWDFEeOesvHnEWH_sQ"> <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Interface"/> </ownedAttribute> - <ownedAttribute xmi:type="uml:Property" xmi:id="_qA0ykGDTEeOesvHnEWH_sQ" name="rtMsgKind" type="_UXMMIGDdEeOesvHnEWH_sQ"> + <ownedAttribute xmi:id="_qA0ykGDTEeOesvHnEWH_sQ" name="rtMsgKind" type="_UXMMIGDdEeOesvHnEWH_sQ"> <defaultValue xmi:type="uml:InstanceValue" xmi:id="_iOirMKe7EeSgBP-Giw6LYQ" instance="_W7oe0GDdEeOesvHnEWH_sQ"/> </ownedAttribute> </packagedElement> @@ -243,9 +243,9 @@ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_iwFRMmDFEeOesvHnEWH_sQ" name="extension_RTMessageSet" type="_g6khEGDFEeOesvHnEWH_sQ" aggregation="composite" association="_iwFRMWDFEeOesvHnEWH_sQ"/> </packagedElement> <packagedElement xmi:type="uml:Enumeration" xmi:id="_UXMMIGDdEeOesvHnEWH_sQ" name="RTMessageKind"> - <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_W7oe0GDdEeOesvHnEWH_sQ" name="in"/> - <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_X2AcYGDdEeOesvHnEWH_sQ" name="out"/> - <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_YcsB4GDdEeOesvHnEWH_sQ" name="inOut"/> + <ownedLiteral xmi:id="_W7oe0GDdEeOesvHnEWH_sQ" name="in"/> + <ownedLiteral xmi:id="_X2AcYGDdEeOesvHnEWH_sQ" name="out"/> + <ownedLiteral xmi:id="_YcsB4GDdEeOesvHnEWH_sQ" name="inOut"/> </packagedElement> <packagedElement xmi:type="uml:Extension" xmi:id="_RQYhEGF-EeOesvHnEWH_sQ" name="E_Protocol_Collaboration1" memberEnd="_RQYhEWF-EeOesvHnEWH_sQ _RQX6AGF-EeOesvHnEWH_sQ"> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_RQYhEWF-EeOesvHnEWH_sQ" name="extension_Protocol" type="_8GLpsEhOEeO0lv5O1DTHOQ" aggregation="composite" association="_RQYhEGF-EeOesvHnEWH_sQ"/>
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.checkstyle b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.checkstyle index f479982..05f0079 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.checkstyle +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.checkstyle
@@ -4,4 +4,8 @@ <fileset name="all" enabled="true" check-config-name="Papyrus-RT" local="false"> <file-match-pattern match-pattern="." include-pattern="true"/> </fileset> + <filter name="FilesFromPackage" enabled="true"> + <filter-data value="src-gen"/> + <filter-data value="src-facade"/> + </filter> </fileset-config>
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.classpath b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.classpath index 6ac0226..d9054a1 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.classpath +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/.classpath
@@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="src" path="src-facade"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> <accessrules>
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/META-INF/MANIFEST.MF b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/META-INF/MANIFEST.MF index f8c0c63..8d53d76 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/META-INF/MANIFEST.MF +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/META-INF/MANIFEST.MF
@@ -17,6 +17,8 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.papyrusrt.umlrt.uml, + org.eclipse.papyrusrt.umlrt.uml.internal.facade;x-internal:=true, + org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl;x-internal:=true, org.eclipse.papyrusrt.umlrt.uml.internal.impl;x-internal:=true, org.eclipse.papyrusrt.umlrt.uml.internal.operations;x-internal:=true, org.eclipse.papyrusrt.umlrt.uml.internal.umlext;x-internal:=true,
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/build.properties b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/build.properties index ac23175..6043cd2 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/build.properties +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/build.properties
@@ -17,7 +17,8 @@ plugin.xml,\ model/ jars.compile.order = . -source.. = src-gen/,\ +source.. = src-facade/,\ + src-gen/,\ src/ output.. = bin/ src.includes = about.html
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.genmodel b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.genmodel new file mode 100644 index 0000000..f22e4cd --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.genmodel
@@ -0,0 +1,338 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel" + copyrightText="Copyright (c) 2017 Christian W. Damus and others.

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html

Contributors:
 Christian W. Damus - initial API and implementation
" + modelDirectory="/org.eclipse.papyrusrt.umlrt.uml/src-facade" editDirectory="/org.eclipse.papyrusrt.umlrt.uml.edit/src-facade" + editorDirectory="/org.eclipse.papyrusrt.umlrt.uml.editor/src-facade" modelPluginID="org.eclipse.papyrusrt.umlrt.uml" + modelName="UMLRT" nonNLSMarkers="true" rootExtendsInterface="org.eclipse.papyrusrt.umlrt.uml.FacadeObject" + rootExtendsClass="org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.FacadeObjectImpl" + suppressEMFTypes="true" suppressEMFModelTags="true" featureMapWrapperClass="" + codeFormatting="true" commentFormatting="true" testsDirectory="/org.eclipse.papyrusrt.umlrt.uml.tests/src-facade" + booleanFlagsField="fFlags" importerID="org.eclipse.uml2.uml.ecore.importer" complianceLevel="8.0" + copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.genmodel#//UMLRealTime" + interfaceNamePattern="UMLRT{0}" classNamePattern="UMLRT{0}Impl" importOrganizing="true" + cleanup="true" factoryMethods="true" pluralizedGetters="true" cacheAdapterSupport="true"> + <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer"> + <details key="OPPOSITE_ROLE_NAMES" value="PROCESS"/> + <details key="DUPLICATE_FEATURES" value="PROCESS"/> + <details key="ANNOTATION_DETAILS" value="PROCESS"/> + <details key="PROPERTY_DEFAULT_EXPRESSIONS" value="PROCESS"/> + <details key="DUPLICATE_FEATURE_INHERITANCE" value="PROCESS"/> + <details key="COMMENTS" value="PROCESS"/> + <details key="DERIVED_FEATURES" value="PROCESS"/> + <details key="SUPER_CLASS_ORDER" value="PROCESS"/> + <details key="DUPLICATE_OPERATION_INHERITANCE" value="PROCESS"/> + <details key="REDEFINING_OPERATIONS" value="PROCESS"/> + <details key="INVARIANT_CONSTRAINTS" value="PROCESS"/> + <details key="UNION_PROPERTIES" value="PROCESS"/> + <details key="DUPLICATE_OPERATIONS" value="PROCESS"/> + <details key="NON_API_INVARIANTS" value="PROCESS"/> + <details key="CAMEL_CASE_NAMES" value="IGNORE"/> + <details key="SUBSETTING_PROPERTIES" value="PROCESS"/> + <details key="OPERATION_BODIES" value="PROCESS"/> + <details key="ECORE_TAGGED_VALUES" value="PROCESS"/> + <details key="UNTYPED_PROPERTIES" value="PROCESS"/> + <details key="REDEFINING_PROPERTIES" value="PROCESS"/> + <details key="INVOCATION_DELEGATES" value="PROCESS"/> + <details key="VALIDATION_DELEGATES" value="PROCESS"/> + </genAnnotations> + <foreignModel>umlrt-facade.uml</foreignModel> + <genPackages xsi:type="genmodel:GenPackage" prefix="UMLRT" basePackage="org.eclipse.papyrusrt" + disposableProviderFactory="true" interfacePackageSuffix="uml" metaDataPackageSuffix="uml.internal.facade" + classPackageSuffix="uml.internal.facade.impl" utilityPackageSuffix="uml.util" + providerPackageSuffix="uml.provider" presentationPackageSuffix="uml.presentation" + testsPackageSuffix="uml.tests" generateExampleClass="false" ecorePackage="umlrt.ecore#/"> + <genEnums xsi:type="genmodel:GenEnum" typeSafeEnumCompatible="false" ecoreEnum="umlrt.ecore#//UMLRTInheritanceKind"> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTInheritanceKind/inherited"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTInheritanceKind/redefined"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTInheritanceKind/excluded"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTInheritanceKind/none"/> + </genEnums> + <genEnums xsi:type="genmodel:GenEnum" typeSafeEnumCompatible="false" ecoreEnum="umlrt.ecore#//UMLRTPortKind"> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTPortKind/externalBehavior"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTPortKind/internalBehavior"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTPortKind/relay"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTPortKind/SAP"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTPortKind/SPP"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTPortKind/null"/> + </genEnums> + <genEnums xsi:type="genmodel:GenEnum" typeSafeEnumCompatible="false" ecoreEnum="umlrt.ecore#//UMLRTCapsulePartKind"> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTCapsulePartKind/fixed"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTCapsulePartKind/optional"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTCapsulePartKind/plug_in"/> + <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umlrt.ecore#//UMLRTCapsulePartKind/null"/> + </genEnums> + <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="umlrt.ecore#//Model"/> + <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="umlrt.ecore#//List"> + <genTypeParameters ecoreTypeParameter="umlrt.ecore#//List/E"/> + </genDataTypes> + <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="umlrt.ecore#//Stream"> + <genTypeParameters ecoreTypeParameter="umlrt.ecore#//Stream/E"/> + </genDataTypes> + <genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umlrt.ecore#//NamedElement"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//NamedElement/model"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//NamedElement/inheritanceKind"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//NamedElement/name" + key="true"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//NamedElement/isInherited"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//NamedElement/isVirtualRedefinition"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//NamedElement/isRedefinition"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//NamedElement/isExcluded"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//NamedElement/redefinedElement"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//NamedElement/redefinitionContext"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//NamedElement/redefinableElement"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//NamedElement/inheritedElement"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//NamedElement/rootDefinition"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//NamedElement/excludedElement"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/toUML"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/redefines"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//NamedElement/redefines/element"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/getRedefinitionOf"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//NamedElement/getRedefinitionOf/element"/> + <genTypeParameters ecoreTypeParameter="umlrt.ecore#//NamedElement/getRedefinitionOf/T"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/getRedefinitionChain"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/getExcludedElement"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//NamedElement/getExcludedElement/name"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//NamedElement/getExcludedElement/type"/> + <genTypeParameters ecoreTypeParameter="umlrt.ecore#//NamedElement/getExcludedElement/T"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/exclude"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/reinherit"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/reify"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//NamedElement/destroy"/> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="umlrt.ecore#//Package"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Package/nestedPackage"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Package/nestingPackage"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Package/capsule"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Package/protocol"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Package/toUML"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Package/createNestedPackage"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Package/createNestedPackage/name"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Package/createCapsule"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Package/createCapsule/name"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Package/createProtocol"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Package/createProtocol/name"/> + </genOperations> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="umlrt.ecore#//Capsule"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Capsule/superclass"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Capsule/subclass"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Capsule/port"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Capsule/capsulePart"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Capsule/connector"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//Capsule/hierarchy"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Capsule/package"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/toUML"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/getAncestry"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/getPorts"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/getPorts/withExclusions"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/getCapsuleParts"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/getCapsuleParts/withExclusions"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/getConnectors"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/getConnectors/withExclusions"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/createPort"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createPort/type"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/createPort.1"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createPort.1/type"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createPort.1/kind"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/createCapsulePart"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createCapsulePart/type"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Capsule/createConnector"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createConnector/name"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createConnector/source"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createConnector/sourcePartWithPort"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createConnector/target"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Capsule/createConnector/targetPartWithPort"/> + </genOperations> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umlrt.ecore#//Classifier"> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference umlrt.ecore#//Classifier/general"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Classifier/specific"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Classifier/toUML"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Classifier/getPackage"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Classifier/getAncestry"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Classifier/getHierarchy"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Classifier/isSuperTypeOf"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Classifier/isSuperTypeOf/classifier"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Classifier/setGeneral"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Classifier/setGeneral/general"/> + </genOperations> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="umlrt.ecore#//Port"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/kind"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Port/redefinedPort"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Port/type"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference umlrt.ecore#//Port/partsWithPort" + pluralizationException="true"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/service"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/behavior"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/conjugated"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/wired"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/publish"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/notification"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/registration"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/registrationOverride"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/isConnected"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/isConnectedInside"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//Port/isConnectedOutside"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Port/connector"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Port/insideConnector"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Port/outsideConnector"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Port/capsule"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Port/toUML"/> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umlrt.ecore#//ReplicatedElement"> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//ReplicatedElement/replicationFactor"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//ReplicatedElement/symbolicReplicationFactor"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//ReplicatedElement/toUML"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//ReplicatedElement/getCapsule"/> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="umlrt.ecore#//Protocol"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/package"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/superProtocol"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/subProtocol"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/message"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/inMessage"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/outMessage"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/inOutMessage"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//Protocol/isConjugate"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EReference umlrt.ecore#//Protocol/conjugate"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//Protocol/hierarchy"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/toUML"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/getAnyReceiveEvent"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/getAncestry"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/getMessages"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/getMessages/kind"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/getMessages.1"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/getMessages.1/kind"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/getMessages.1/withExclusions"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/getMessages.2"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/getMessages.2/withExclusions"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/createMessage"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage/kind"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage/name"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/createMessage.1"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage.1/kind"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage.1/name"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage.1/dataType"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Protocol/createMessage.2"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage.2/kind"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage.2/name"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage.2/parameterName"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//Protocol/createMessage.2/parameterType"/> + </genOperations> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="umlrt.ecore#//ProtocolMessage"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//ProtocolMessage/kind"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//ProtocolMessage/redefinedMessage"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//ProtocolMessage/parameter"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//ProtocolMessage/isConjugate"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//ProtocolMessage/conjugate"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference umlrt.ecore#//ProtocolMessage/protocol"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//ProtocolMessage/toUML"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//ProtocolMessage/toReceiveEvent"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//ProtocolMessage/createParameter"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//ProtocolMessage/createParameter/name"/> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//ProtocolMessage/createParameter/type"/> + </genOperations> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="umlrt.ecore#//CapsulePart"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false" + ecoreFeature="ecore:EAttribute umlrt.ecore#//CapsulePart/kind"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//CapsulePart/optional"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//CapsulePart/redefinedPart"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//CapsulePart/capsule"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//CapsulePart/type"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//CapsulePart/getConnectorsOf"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umlrt.ecore#//CapsulePart/getConnectorsOf/port"/> + </genOperations> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//CapsulePart/getConnectorsOfPorts"/> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="umlrt.ecore#//Connector"> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Connector/redefinedConnector"/> + <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false" + createChild="false" ecoreFeature="ecore:EReference umlrt.ecore#//Connector/capsule"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference umlrt.ecore#//Connector/source"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference umlrt.ecore#//Connector/sourcePartWithPort"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Connector/sourceReplicationFactor"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference umlrt.ecore#//Connector/target"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference umlrt.ecore#//Connector/targetPartWithPort"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umlrt.ecore#//Connector/targetReplicationFactor"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umlrt.ecore#//Connector/toUML"/> + </genClasses> + </genPackages> +</genmodel:GenModel>
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.properties b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.properties new file mode 100644 index 0000000..263091d --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.properties
@@ -0,0 +1,13 @@ +# +# Copyright (c) 2016 Christian W. Damus and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christian W. Damus - initial API and implementation +# + +_label_umlrt: UML Real Time Façade
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.uml b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.uml new file mode 100644 index 0000000..fd77216 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt-facade.uml
@@ -0,0 +1,871 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:standard="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"> + <uml:Model xmi:id="_0" name="umlrt" URI="http://www.eclipse.org/papyrusrt/2017/UML-RT"> + <elementImport xmi:id="_elementImport.0" alias=""> + <importedElement xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_UXMMIGDdEeOesvHnEWH_sQ"/> + </elementImport> + <packagedElement xmi:type="uml:PrimitiveType" xmi:id="Model" name="Model"/> + <packagedElement xmi:type="uml:Class" xmi:id="NamedElement" name="NamedElement" isAbstract="true"> + <ownedAttribute xmi:id="NamedElement-model" name="model" type="Model" isReadOnly="true" isDerived="true"/> + <ownedAttribute xmi:id="NamedElement-inheritanceKind" name="inheritanceKind" type="InheritanceKind" isReadOnly="true" isDerived="true"/> + <ownedAttribute xmi:id="NamedElement-name" name="name" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-name-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-isInherited" name="isInherited" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-isVirtualRedefinition" name="isVirtualRedefinition" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-isRedefinition" name="isRedefinition" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-isExcluded" name="isExcluded" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-redefinedElement" name="redefinedElement" type="NamedElement" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="_packagedElement.2"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-redefinedElement-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-redefinitionContext" name="redefinitionContext" type="NamedElement" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="_packagedElement.3"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-redefinitionContext-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-redefinableElement" name="redefinableElement" type="NamedElement" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="_packagedElement.3"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-redefinableElement-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-redefinableElement-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-inheritedElement" name="inheritedElement" type="NamedElement" isReadOnly="true" isDerived="true" association="_packagedElement.4"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-inheritedElement-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-rootDefinition" name="rootDefinition" type="NamedElement" isReadOnly="true" isDerived="true" association="_packagedElement.6"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-rootDefinition-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="NamedElement-excludedElement" name="excludedElement" type="NamedElement" isReadOnly="true" isDerived="true" association="_packagedElement.5"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-excludedElement-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-excludedElement-_upperValue" value="*"/> + </ownedAttribute> + <ownedOperation xmi:id="NamedElement-toUML" name="toUML" isQuery="true"> + <ownedParameter xmi:id="NamedElement-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="NamedElement-redefines" name="redefines" isQuery="true"> + <ownedParameter xmi:id="NamedElement-redefines-element" name="element" type="NamedElement" effect="read"/> + <ownedParameter xmi:id="NamedElement-redefines-_ownedParameter.1" direction="return" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="NamedElement-getRedefinitionOf" name="getRedefinitionOf" isQuery="true"> + <ownedParameter xmi:id="NamedElement-getRedefinitionOf-element" name="element" type="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" effect="read"/> + <ownedParameter xmi:id="NamedElement-getRedefinitionOf-_ownedParameter.1" type="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-getRedefinitionOf-_ownedParameter.1-_lowerValue"/> + </ownedParameter> + <ownedTemplateSignature xmi:id="NamedElement-getRedefinitionOf-_ownedTemplateSignature" parameter="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0"> + <ownedParameter xmi:type="uml:ClassifierTemplateParameter" xmi:id="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0" default="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" parameteredElement="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" constrainingClassifier="NamedElement"> + <ownedDefault xmi:type="uml:Class" xmi:id="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" name="T" templateParameter="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0"/> + </ownedParameter> + </ownedTemplateSignature> + </ownedOperation> + <ownedOperation xmi:id="NamedElement-getRedefinitionChain" name="getRedefinitionChain" isQuery="true"> + <ownedParameter xmi:id="NamedElement-getRedefinitionChain-_ownedParameter.0" type="NamedElement" direction="return" effect="read"> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-getRedefinitionChain-_ownedParameter.0-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="NamedElement-getExcludedElement" name="getExcludedElement" isQuery="true"> + <ownedParameter xmi:id="NamedElement-getExcludedElement-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-getExcludedElement-name-_lowerValue"/> + </ownedParameter> + <ownedParameter xmi:id="NamedElement-getExcludedElement-type" name="type" type="NamedElement-Class_T" effect="read"/> + <ownedParameter xmi:id="NamedElement-getExcludedElement-_ownedParameter.2" type="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-getExcludedElement-_ownedParameter.2-_lowerValue"/> + </ownedParameter> + <ownedTemplateSignature xmi:id="NamedElement-getExcludedElement-_ownedTemplateSignature" parameter="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0"> + <ownedParameter xmi:type="uml:ClassifierTemplateParameter" xmi:id="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0" default="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" parameteredElement="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" constrainingClassifier="NamedElement"> + <ownedDefault xmi:type="uml:Class" xmi:id="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" name="T" templateParameter="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0"/> + </ownedParameter> + </ownedTemplateSignature> + </ownedOperation> + <ownedOperation xmi:id="NamedElement-exclude" name="exclude"> + <ownedParameter xmi:id="NamedElement-exclude-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="NamedElement-reinherit" name="reinherit"> + <ownedParameter xmi:id="NamedElement-reinherit-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="NamedElement-reify" name="reify"/> + <ownedOperation xmi:id="NamedElement-destroy" name="destroy"/> + <nestedClassifier xmi:type="uml:Class" xmi:id="NamedElement-Class_T" name="Class_T" visibility="private"> + <templateBinding xmi:id="NamedElement-Class_T-_templateBinding.0"> + <parameterSubstitution xmi:id="NamedElement-Class_T-_templateBinding.0-_parameterSubstitution.0" actual="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault"> + <formal xmi:type="uml:ClassifierTemplateParameter" href="pathmap://UML_METAMODELS/Ecore.metamodel.uml#EJavaClass-_ownedTemplateSignature-_ownedParameter.0"/> + </parameterSubstitution> + <signature xmi:type="uml:RedefinableTemplateSignature" href="pathmap://UML_METAMODELS/Ecore.metamodel.uml#EJavaClass-_ownedTemplateSignature"/> + </templateBinding> + </nestedClassifier> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.2" visibility="private" memberEnd="NamedElement-redefinedElement _packagedElement.2-redefiningElement"> + <ownedEnd xmi:id="_packagedElement.2-redefiningElement" name="redefiningElement" type="NamedElement" association="_packagedElement.2"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.2-redefiningElement-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.2-redefiningElement-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.3" visibility="private" memberEnd="NamedElement-redefinitionContext NamedElement-redefinableElement"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.4" visibility="private" memberEnd="NamedElement-inheritedElement _packagedElement.4-inheritingElement"> + <ownedEnd xmi:id="_packagedElement.4-inheritingElement" name="inheritingElement" type="NamedElement" association="_packagedElement.4"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.4-inheritingElement-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.4-inheritingElement-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.5" visibility="private" memberEnd="NamedElement-excludedElement _packagedElement.5-excludingElement"> + <ownedEnd xmi:id="_packagedElement.5-excludingElement" name="excludingElement" type="NamedElement" association="_packagedElement.5"/> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.6" visibility="private" memberEnd="NamedElement-rootDefinition _packagedElement.6-redefinitionTree"> + <ownedEnd xmi:id="_packagedElement.6-redefinitionTree" name="redefinitionTree" type="NamedElement" association="_packagedElement.6"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.6-redefinitionTree-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.6-redefinitionTree-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Enumeration" xmi:id="InheritanceKind" name="InheritanceKind"> + <ownedLiteral xmi:id="InheritanceKind-inherited" name="inherited"/> + <ownedLiteral xmi:id="InheritanceKind-redefined" name="redefined"/> + <ownedLiteral xmi:id="InheritanceKind-excluded" name="excluded"/> + <ownedLiteral xmi:id="InheritanceKind-none" name="none"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="Package" name="Package"> + <generalization xmi:id="Package-_generalization.0" general="NamedElement"/> + <ownedAttribute xmi:id="Package-nestedPackage" name="nestedPackage" type="Package" aggregation="composite" isDerived="true" association="_packagedElement.9"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Package-nestedPackage-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Package-nestedPackage-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Package-nestingPackage" name="nestingPackage" type="Package" isReadOnly="true" isDerived="true" association="_packagedElement.9"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Package-nestingPackage-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Package-nestingPackage-_upperValue" value="1"/> + </ownedAttribute> + <ownedAttribute xmi:id="Package-capsule" name="capsule" type="Capsule" aggregation="composite" isDerived="true" association="_packagedElement.10"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Package-capsule-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Package-capsule-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Package-protocol" name="protocol" type="Protocol" aggregation="composite" isDerived="true" association="_packagedElement.11"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Package-protocol-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Package-protocol-_upperValue" value="*"/> + </ownedAttribute> + <ownedOperation xmi:id="Package-toUML" name="toUML" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="Package-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Package-createNestedPackage" name="createNestedPackage"> + <ownedParameter xmi:id="Package-createNestedPackage-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="Package-createNestedPackage-_ownedParameter.1" type="Package" direction="return"/> + </ownedOperation> + <ownedOperation xmi:id="Package-createCapsule" name="createCapsule"> + <ownedParameter xmi:id="Package-createCapsule-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="Package-createCapsule-_ownedParameter.1" type="Capsule" direction="return"/> + </ownedOperation> + <ownedOperation xmi:id="Package-createProtocol" name="createProtocol"> + <ownedParameter xmi:id="Package-createProtocol-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="Package-createProtocol-_ownedParameter.1" type="Protocol" direction="return"/> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.9" visibility="private" memberEnd="Package-nestedPackage Package-nestingPackage"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.10" visibility="private" memberEnd="Package-capsule Capsule-package"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.11" visibility="private" memberEnd="Package-protocol Protocol-package"/> + <packagedElement xmi:type="uml:Class" xmi:id="Classifier" name="Classifier" isAbstract="true"> + <generalization xmi:id="Classifier-_generalization.0" general="NamedElement"/> + <ownedAttribute xmi:id="Classifier-general" name="general" type="Classifier" isDerived="true" isDerivedUnion="true" association="_packagedElement.13"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Classifier-general-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Classifier-specific" name="specific" type="Classifier" isDerived="true" isDerivedUnion="true" association="_packagedElement.13"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Classifier-specific-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Classifier-specific-_upperValue" value="*"/> + </ownedAttribute> + <ownedOperation xmi:id="Classifier-toUML" name="toUML" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="Classifier-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Classifier-getPackage" name="getPackage" isAbstract="true" isQuery="true"> + <ownedParameter xmi:id="Classifier-getPackage-_ownedParameter.0" type="Package" direction="return" effect="read"/> + </ownedOperation> + <ownedOperation xmi:id="Classifier-getAncestry" name="getAncestry" isQuery="true"> + <ownedParameter xmi:id="Classifier-getAncestry-_ownedParameter.0" name="" type="Classifier-List3C3F20extends20Classifier3E" direction="return" effect="read"/> + </ownedOperation> + <ownedOperation xmi:id="Classifier-getHierarchy" name="getHierarchy" isQuery="true"> + <ownedParameter xmi:id="Classifier-getHierarchy-_ownedParameter.0" name="" type="Classifier-Stream3C3F20extends20Classifier3E" direction="return" effect="read"/> + </ownedOperation> + <ownedOperation xmi:id="Classifier-isSuperTypeOf" name="isSuperTypeOf" isQuery="true"> + <ownedParameter xmi:id="Classifier-isSuperTypeOf-classifier" name="classifier" type="Classifier" effect="read"/> + <ownedParameter xmi:id="Classifier-isSuperTypeOf-_ownedParameter.1" direction="return" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Classifier-setGeneral" name="setGeneral"> + <ownedParameter xmi:id="Classifier-setGeneral-general" name="general" type="Classifier" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Classifier-setGeneral-general-_lowerValue"/> + </ownedParameter> + </ownedOperation> + <nestedClassifier xmi:type="uml:Class" xmi:id="Classifier-_3F20extends20Classifier" name="? extends Classifier" visibility="private"/> + <nestedClassifier xmi:type="uml:PrimitiveType" xmi:id="Classifier-List3C3F20extends20Classifier3E" name="List<? extends Classifier>" visibility="private"> + <templateBinding xmi:id="Classifier-List3C3F20extends20Classifier3E-_templateBinding.0" signature="List-_ownedTemplateSignature"> + <parameterSubstitution xmi:id="Classifier-List3C3F20extends20Classifier3E-_templateBinding.0-_parameterSubstitution.0" actual="Classifier-_3F20extends20Classifier" formal="List-_ownedTemplateSignature-_ownedParameter.0"/> + </templateBinding> + </nestedClassifier> + <nestedClassifier xmi:type="uml:PrimitiveType" xmi:id="Classifier-Stream3C3F20extends20Classifier3E" name="Stream<? extends Classifier>" visibility="private"> + <templateBinding xmi:id="Classifier-Stream3C3F20extends20Classifier3E-_templateBinding.0" signature="Stream-_ownedTemplateSignature"> + <parameterSubstitution xmi:id="Classifier-Stream3C3F20extends20Classifier3E-_templateBinding.0-_parameterSubstitution.0" actual="Classifier-_3F20extends20Classifier" formal="Stream-_ownedTemplateSignature-_ownedParameter.0"/> + </templateBinding> + </nestedClassifier> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.13" visibility="private" memberEnd="Classifier-general Classifier-specific"/> + <packagedElement xmi:type="uml:Class" xmi:id="Capsule" name="Capsule"> + <generalization xmi:id="Capsule-_generalization.0" general="Classifier"/> + <ownedAttribute xmi:id="Capsule-package" name="package" type="Package" isReadOnly="true" isDerived="true" association="_packagedElement.10"/> + <ownedAttribute xmi:id="Capsule-superclass" name="superclass" type="Capsule" isDerived="true" subsettedProperty="Classifier-general" association="_packagedElement.15"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-superclass-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Capsule-subclass" name="subclass" type="Capsule" isReadOnly="true" isDerived="true" subsettedProperty="Classifier-specific" association="_packagedElement.15"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-subclass-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-subclass-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Capsule-port" name="port" type="Port" isReadOnly="true" aggregation="composite" isDerived="true" subsettedProperty="NamedElement-redefinableElement" association="_packagedElement.16"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-port-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-port-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Capsule-capsulePart" name="capsulePart" type="CapsulePart" isReadOnly="true" aggregation="composite" isDerived="true" subsettedProperty="NamedElement-redefinableElement" association="_packagedElement.17"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-capsulePart-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-capsulePart-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Capsule-connector" name="connector" type="Connector" isReadOnly="true" aggregation="composite" isDerived="true" subsettedProperty="NamedElement-redefinableElement" association="_packagedElement.18"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-connector-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-connector-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Capsule-hierarchy" name="hierarchy" type="Capsule-Stream3CCapsule3E" isReadOnly="true" aggregation="composite" isDerived="true"/> + <ownedOperation xmi:id="Capsule-toUML" name="toUML" isQuery="true" redefinedOperation="Classifier-toUML"> + <ownedParameter xmi:id="Capsule-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Capsule-getAncestry" name="getAncestry" isQuery="true" redefinedOperation="Classifier-getAncestry"> + <ownedParameter xmi:id="Capsule-getAncestry-_ownedParameter.0" name="" type="Capsule" direction="return" effect="read"> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-getAncestry-_ownedParameter.0-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Capsule-getPorts" name="getPorts" isQuery="true"> + <ownedParameter xmi:id="Capsule-getPorts-withExclusions" name="withExclusions"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + <ownedParameter xmi:id="Capsule-getPorts-_ownedParameter.1" type="Port" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-getPorts-_ownedParameter.1-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-getPorts-_ownedParameter.1-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Capsule-getCapsuleParts" name="getCapsuleParts" isQuery="true"> + <ownedParameter xmi:id="Capsule-getCapsuleParts-withExclusions" name="withExclusions"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + <ownedParameter xmi:id="Capsule-getCapsuleParts-_ownedParameter.1" type="CapsulePart" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-getCapsuleParts-_ownedParameter.1-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-getCapsuleParts-_ownedParameter.1-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Capsule-getConnectors" name="getConnectors" isQuery="true"> + <ownedParameter xmi:id="Capsule-getConnectors-withExclusions" name="withExclusions"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + <ownedParameter xmi:id="Capsule-getConnectors-_ownedParameter.1" type="Connector" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-getConnectors-_ownedParameter.1-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Capsule-getConnectors-_ownedParameter.1-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Capsule-createPort" name="createPort"> + <ownedParameter xmi:id="Capsule-createPort-type" name="type" type="Protocol" effect="read"/> + <ownedParameter xmi:id="Capsule-createPort-_ownedParameter.1" type="Port" direction="return"/> + </ownedOperation> + <ownedOperation xmi:id="Capsule-createPort.1" name="createPort"> + <ownedParameter xmi:id="Capsule-createPort.1-type" name="type" type="Protocol" effect="read"/> + <ownedParameter xmi:id="Capsule-createPort.1-kind" name="kind" type="PortKind" effect="read"/> + <ownedParameter xmi:id="Capsule-createPort.1-_ownedParameter.2" type="Port" direction="return"/> + </ownedOperation> + <ownedOperation xmi:id="Capsule-createCapsulePart" name="createCapsulePart"> + <ownedParameter xmi:id="Capsule-createCapsulePart-type" name="type" type="Capsule" effect="read"/> + <ownedParameter xmi:id="Capsule-createCapsulePart-_ownedParameter.1" type="CapsulePart" direction="return"/> + </ownedOperation> + <ownedOperation xmi:id="Capsule-createConnector" name="createConnector"> + <ownedParameter xmi:id="Capsule-createConnector-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="Capsule-createConnector-source" name="source" type="Port"/> + <ownedParameter xmi:id="Capsule-createConnector-sourcePartWithPort" name="sourcePartWithPort" type="CapsulePart"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-createConnector-sourcePartWithPort-_lowerValue"/> + </ownedParameter> + <ownedParameter xmi:id="Capsule-createConnector-target" name="target" type="Port"/> + <ownedParameter xmi:id="Capsule-createConnector-targetPartWithPort" name="targetPartWithPort" type="CapsulePart"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Capsule-createConnector-targetPartWithPort-_lowerValue"/> + </ownedParameter> + <ownedParameter xmi:id="Capsule-createConnector-_ownedParameter.5" type="Connector" direction="return"/> + </ownedOperation> + <nestedClassifier xmi:type="uml:PrimitiveType" xmi:id="Capsule-Stream3CCapsule3E" name="Stream<Capsule>" visibility="private"> + <templateBinding xmi:id="Capsule-Stream3CCapsule3E-_templateBinding.0" signature="Stream-_ownedTemplateSignature"> + <parameterSubstitution xmi:id="Capsule-Stream3CCapsule3E-_templateBinding.0-_parameterSubstitution.0" actual="Capsule" formal="Stream-_ownedTemplateSignature-_ownedParameter.0"/> + </templateBinding> + </nestedClassifier> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.15" visibility="private" memberEnd="Capsule-superclass Capsule-subclass"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.16" visibility="private" memberEnd="Capsule-port Port-capsule"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.17" visibility="private" memberEnd="Capsule-capsulePart CapsulePart-capsule"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.18" visibility="private" memberEnd="Capsule-connector Connector-capsule"/> + <packagedElement xmi:type="uml:Class" xmi:id="ReplicatedElement" name="ReplicatedElement" isAbstract="true"> + <generalization xmi:id="ReplicatedElement-_generalization.0" general="NamedElement"/> + <ownedAttribute xmi:id="ReplicatedElement-replicationFactor" name="replicationFactor" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/> + </ownedAttribute> + <ownedAttribute xmi:id="ReplicatedElement-isSymbolicReplicationFactor" name="isSymbolicReplicationFactor" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedOperation xmi:id="ReplicatedElement-toUML" name="toUML" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="ReplicatedElement-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="ReplicatedElement-getCapsule" name="getCapsule" isAbstract="true" isQuery="true"> + <ownedParameter xmi:id="ReplicatedElement-getCapsule-_ownedParameter.0" type="Capsule" direction="return" effect="read"/> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="Port" name="Port"> + <generalization xmi:id="Port-_generalization.0" general="ReplicatedElement"/> + <ownedAttribute xmi:id="Port-kind" name="kind" type="PortKind" isDerived="true"/> + <ownedAttribute xmi:id="Port-redefinedPort" name="redefinedPort" type="Port" isReadOnly="true" isDerived="true" subsettedProperty="NamedElement-redefinedElement" association="_packagedElement.21"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Port-redefinedPort-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-capsule" name="capsule" type="Capsule" isReadOnly="true" isDerived="true" subsettedProperty="NamedElement-redefinitionContext" association="_packagedElement.16"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Port-capsule-_lowerValue" value="1"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-type" name="type" type="Protocol" isDerived="true" association="_packagedElement.22"/> + <ownedAttribute xmi:id="Port-partWithPort" name="partWithPort" type="CapsulePart" isDerived="true" association="_packagedElement.25"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Port-partWithPort-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Port-partWithPort-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isService" name="isService" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isBehavior" name="isBehavior" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isConjugated" name="isConjugated" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isWired" name="isWired" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isPublish" name="isPublish" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isNotification" name="isNotification" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-registration" name="registration" isDerived="true"> + <type xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_t8sxEEhPEeO0lv5O1DTHOQ"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-registrationOverride" name="registrationOverride" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Port-registrationOverride-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isConnected" name="isConnected" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isConnectedInside" name="isConnectedInside" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-isConnectedOutside" name="isConnectedOutside" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-connector" name="connector" type="Connector" isReadOnly="true" isDerived="true" isDerivedUnion="true"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Port-connector-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Port-connector-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-insideConnector" name="insideConnector" type="Connector" isReadOnly="true" isDerived="true" subsettedProperty="Port-connector" association="_packagedElement.23"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Port-insideConnector-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Port-insideConnector-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Port-outsideConnector" name="outsideConnector" type="Connector" isReadOnly="true" isDerived="true" subsettedProperty="Port-connector" association="_packagedElement.24"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Port-outsideConnector-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Port-outsideConnector-_upperValue" value="*"/> + </ownedAttribute> + <ownedOperation xmi:id="Port-toUML" name="toUML" isQuery="true" redefinedOperation="ReplicatedElement-toUML"> + <ownedParameter xmi:id="Port-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Port"/> + </ownedParameter> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.21" visibility="private" memberEnd="Port-redefinedPort _packagedElement.21-redefiningPort"> + <ownedEnd xmi:id="_packagedElement.21-redefiningPort" name="redefiningPort" type="Port" isReadOnly="true" isDerived="true" subsettedProperty="_packagedElement.2-redefiningElement" association="_packagedElement.21"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.21-redefiningPort-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.21-redefiningPort-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.22" visibility="private" memberEnd="Port-type _packagedElement.22-_ownedEnd.0"> + <ownedEnd xmi:id="_packagedElement.22-_ownedEnd.0" type="Port" association="_packagedElement.22"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.22-_ownedEnd.0-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.22-_ownedEnd.0-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.23" visibility="private" memberEnd="Port-insideConnector _packagedElement.23-inside"> + <ownedEnd xmi:id="_packagedElement.23-inside" name="inside" type="Port" association="_packagedElement.23"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.23-inside-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.23-inside-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.24" visibility="private" memberEnd="Port-outsideConnector _packagedElement.24-outside"> + <ownedEnd xmi:id="_packagedElement.24-outside" name="outside" type="Port" association="_packagedElement.24"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.24-outside-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.24-outside-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.25" visibility="private" memberEnd="Port-partWithPort _packagedElement.25-portOnPart"> + <ownedEnd xmi:id="_packagedElement.25-portOnPart" name="portOnPart" type="Port" association="_packagedElement.25"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.25-portOnPart-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.25-portOnPart-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Enumeration" xmi:id="PortKind" name="PortKind"> + <ownedLiteral xmi:id="PortKind-externalBehavior" name="externalBehavior"/> + <ownedLiteral xmi:id="PortKind-internalBehavior" name="internalBehavior"/> + <ownedLiteral xmi:id="PortKind-relay" name="relay"/> + <ownedLiteral xmi:id="PortKind-SAP" name="SAP"/> + <ownedLiteral xmi:id="PortKind-SPP" name="SPP"/> + <ownedLiteral xmi:id="PortKind-null" name="null"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="CapsulePart" name="CapsulePart"> + <generalization xmi:id="CapsulePart-_generalization.0" general="ReplicatedElement"/> + <ownedAttribute xmi:id="CapsulePart-kind" name="kind" type="CapsulePartKind" isDerived="true"/> + <ownedAttribute xmi:id="CapsulePart-isOptional" name="isOptional" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="CapsulePart-redefinedPart" name="redefinedPart" type="CapsulePart" isReadOnly="true" isDerived="true" subsettedProperty="NamedElement-redefinedElement" association="_packagedElement.28"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="CapsulePart-redefinedPart-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="CapsulePart-capsule" name="capsule" type="Capsule" isReadOnly="true" isDerived="true" subsettedProperty="NamedElement-redefinitionContext" association="_packagedElement.17"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="CapsulePart-capsule-_lowerValue" value="1"/> + </ownedAttribute> + <ownedAttribute xmi:id="CapsulePart-type" name="type" type="Capsule" isDerived="true" association="_packagedElement.29"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="CapsulePart-type-_lowerValue" value="1"/> + </ownedAttribute> + <ownedOperation xmi:id="CapsulePart-getConnectorsOf" name="getConnectorsOf" isQuery="true"> + <ownedParameter xmi:id="CapsulePart-getConnectorsOf-port" name="port" type="Port" effect="read"/> + <ownedParameter xmi:id="CapsulePart-getConnectorsOf-_ownedParameter.1" type="Connector" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="CapsulePart-getConnectorsOf-_ownedParameter.1-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="CapsulePart-getConnectorsOf-_ownedParameter.1-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="CapsulePart-getConnectorsOfPorts" name="getConnectorsOfPorts" isQuery="true"> + <ownedParameter xmi:id="CapsulePart-getConnectorsOfPorts-_ownedParameter.0" type="Connector" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="CapsulePart-getConnectorsOfPorts-_ownedParameter.0-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="CapsulePart-getConnectorsOfPorts-_ownedParameter.0-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.28" visibility="private" memberEnd="CapsulePart-redefinedPart _packagedElement.28-redefiningPart"> + <ownedEnd xmi:id="_packagedElement.28-redefiningPart" name="redefiningPart" type="CapsulePart" isReadOnly="true" isDerived="true" subsettedProperty="_packagedElement.2-redefiningElement" association="_packagedElement.28"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.28-redefiningPart-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.28-redefiningPart-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.29" visibility="private" memberEnd="CapsulePart-type _packagedElement.29-_ownedEnd.0"> + <ownedEnd xmi:id="_packagedElement.29-_ownedEnd.0" type="CapsulePart" association="_packagedElement.29"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.29-_ownedEnd.0-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.29-_ownedEnd.0-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Enumeration" xmi:id="CapsulePartKind" name="CapsulePartKind"> + <ownedLiteral xmi:id="CapsulePartKind-fixed" name="fixed"/> + <ownedLiteral xmi:id="CapsulePartKind-optional" name="optional"/> + <ownedLiteral xmi:id="CapsulePartKind-plug-in" name="plug-in"/> + <ownedLiteral xmi:id="CapsulePartKind-null" name="null"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="Connector" name="Connector"> + <generalization xmi:id="Connector-_generalization.0" general="NamedElement"/> + <ownedAttribute xmi:id="Connector-redefinedConnector" name="redefinedConnector" type="Connector" isReadOnly="true" isDerived="true" subsettedProperty="NamedElement-redefinedElement" association="_packagedElement.32"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Connector-redefinedConnector-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Connector-capsule" name="capsule" type="Capsule" isReadOnly="true" isDerived="true" subsettedProperty="NamedElement-redefinitionContext" association="_packagedElement.18"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Connector-capsule-_lowerValue" value="1"/> + </ownedAttribute> + <ownedAttribute xmi:id="Connector-source" name="source" type="Port" isDerived="true" association="_packagedElement.33"/> + <ownedAttribute xmi:id="Connector-sourcePartWithPort" name="sourcePartWithPort" type="CapsulePart" isDerived="true" association="_packagedElement.34"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Connector-sourcePartWithPort-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Connector-sourceReplicationFactor" name="sourceReplicationFactor" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/> + </ownedAttribute> + <ownedAttribute xmi:id="Connector-target" name="target" type="Port" isDerived="true" association="_packagedElement.35"/> + <ownedAttribute xmi:id="Connector-targetPartWithPort" name="targetPartWithPort" type="CapsulePart" isDerived="true" association="_packagedElement.36"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Connector-targetPartWithPort-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Connector-targetReplicationFactor" name="targetReplicationFactor" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/> + </ownedAttribute> + <ownedOperation xmi:id="Connector-toUML" name="toUML" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="Connector-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/> + </ownedParameter> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.32" visibility="private" memberEnd="Connector-redefinedConnector _packagedElement.32-redefiningConnector"> + <ownedEnd xmi:id="_packagedElement.32-redefiningConnector" name="redefiningConnector" type="Connector" isReadOnly="true" isDerived="true" subsettedProperty="_packagedElement.2-redefiningElement" association="_packagedElement.32"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.32-redefiningConnector-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.32-redefiningConnector-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.33" visibility="private" memberEnd="Connector-source _packagedElement.33-sourceOf"> + <ownedEnd xmi:id="_packagedElement.33-sourceOf" name="sourceOf" type="Connector" association="_packagedElement.33"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.33-sourceOf-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.33-sourceOf-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.34" visibility="private" memberEnd="Connector-sourcePartWithPort _packagedElement.34-sourceOf"> + <ownedEnd xmi:id="_packagedElement.34-sourceOf" name="sourceOf" type="Connector" association="_packagedElement.34"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.34-sourceOf-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.34-sourceOf-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.35" visibility="private" memberEnd="Connector-target _packagedElement.35-targetOf"> + <ownedEnd xmi:id="_packagedElement.35-targetOf" name="targetOf" type="Connector" association="_packagedElement.35"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.35-targetOf-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.35-targetOf-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.36" visibility="private" memberEnd="Connector-targetPartWithPort _packagedElement.36-targetOf"> + <ownedEnd xmi:id="_packagedElement.36-targetOf" name="targetOf" type="Connector" association="_packagedElement.36"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.36-targetOf-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.36-targetOf-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="Protocol" name="Protocol"> + <generalization xmi:id="Protocol-_generalization.0" general="Classifier"/> + <ownedAttribute xmi:id="Protocol-package" name="package" type="Package" isReadOnly="true" isDerived="true" association="_packagedElement.11"/> + <ownedAttribute xmi:id="Protocol-superProtocol" name="superProtocol" type="Protocol" isDerived="true" subsettedProperty="Classifier-general" association="_packagedElement.38"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-superProtocol-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="Protocol-subProtocol" name="subProtocol" type="Protocol" isReadOnly="true" isDerived="true" subsettedProperty="Classifier-specific" association="_packagedElement.38"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-subProtocol-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-subProtocol-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Protocol-message" name="message" type="ProtocolMessage" isReadOnly="true" aggregation="composite" isDerived="true" isDerivedUnion="true" subsettedProperty="NamedElement-redefinableElement" association="_packagedElement.39"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-message-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-message-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Protocol-inMessage" name="inMessage" type="ProtocolMessage" isReadOnly="true" aggregation="composite" isDerived="true" subsettedProperty="Protocol-message" association="_packagedElement.40"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-inMessage-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-inMessage-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Protocol-outMessage" name="outMessage" type="ProtocolMessage" isReadOnly="true" aggregation="composite" isDerived="true" subsettedProperty="Protocol-message" association="_packagedElement.41"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-outMessage-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-outMessage-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Protocol-inOutMessage" name="inOutMessage" type="ProtocolMessage" isReadOnly="true" aggregation="composite" isDerived="true" subsettedProperty="Protocol-message" association="_packagedElement.42"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-inOutMessage-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-inOutMessage-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="Protocol-isConjugate" name="isConjugate" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="Protocol-conjugate" name="conjugate" type="Protocol" isReadOnly="true" isDerived="true" association="_packagedElement.43"/> + <ownedAttribute xmi:id="Protocol-hierarchy" name="hierarchy" type="Protocol-Stream3CProtocol3E" isReadOnly="true" aggregation="composite" isDerived="true"/> + <ownedOperation xmi:id="Protocol-toUML" name="toUML" isQuery="true" redefinedOperation="Classifier-toUML"> + <ownedParameter xmi:id="Protocol-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Collaboration"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Protocol-getAnyReceiveEvent" name="getAnyReceiveEvent" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="Protocol-getAnyReceiveEvent-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#AnyReceiveEvent"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Protocol-getAncestry" name="getAncestry" isQuery="true" redefinedOperation="Classifier-getAncestry"> + <ownedParameter xmi:id="Protocol-getAncestry-_ownedParameter.0" name="" type="Protocol" direction="return" effect="read"> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-getAncestry-_ownedParameter.0-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Protocol-getMessages" name="getMessages" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="Protocol-getMessages-kind" name="kind" effect="read"> + <type xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_UXMMIGDdEeOesvHnEWH_sQ"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-getMessages-_ownedParameter.1" type="ProtocolMessage" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-getMessages-_ownedParameter.1-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-getMessages-_ownedParameter.1-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Protocol-getMessages.1" name="getMessages" isQuery="true"> + <ownedParameter xmi:id="Protocol-getMessages.1-kind" name="kind" effect="read"> + <type xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_UXMMIGDdEeOesvHnEWH_sQ"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-getMessages.1-withExclusions" name="withExclusions"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-getMessages.1-_ownedParameter.2" type="ProtocolMessage" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-getMessages.1-_ownedParameter.2-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-getMessages.1-_ownedParameter.2-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Protocol-getMessages.2" name="getMessages" isQuery="true"> + <ownedParameter xmi:id="Protocol-getMessages.2-withExclusions" name="withExclusions"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-getMessages.2-_ownedParameter.1" type="ProtocolMessage" direction="return" effect="read"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-getMessages.2-_ownedParameter.1-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-getMessages.2-_ownedParameter.1-_upperValue" value="*"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="Protocol-createMessage" name="createMessage"> + <ownedParameter xmi:id="Protocol-createMessage-kind" name="kind" effect="read"> + <type xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_UXMMIGDdEeOesvHnEWH_sQ"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage-_ownedParameter.2" type="ProtocolMessage" direction="return"/> + </ownedOperation> + <ownedOperation xmi:id="Protocol-createMessage.1" name="createMessage"> + <ownedParameter xmi:id="Protocol-createMessage.1-kind" name="kind" effect="read"> + <type xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_UXMMIGDdEeOesvHnEWH_sQ"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage.1-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage.1-dataType" name="dataType" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Type"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage.1-_ownedParameter.3" type="ProtocolMessage" direction="return"/> + </ownedOperation> + <ownedOperation xmi:id="Protocol-createMessage.2" name="createMessage"> + <ownedParameter xmi:id="Protocol-createMessage.2-kind" name="kind" effect="read"> + <type xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_UXMMIGDdEeOesvHnEWH_sQ"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage.2-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage.2-parameterName" name="parameterName" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-createMessage.2-parameterName-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-createMessage.2-parameterName-_upperValue" value="*"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage.2-parameterType" name="parameterType" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Type"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Protocol-createMessage.2-parameterType-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Protocol-createMessage.2-parameterType-_upperValue" value="*"/> + </ownedParameter> + <ownedParameter xmi:id="Protocol-createMessage.2-_ownedParameter.4" type="ProtocolMessage" direction="return"/> + </ownedOperation> + <nestedClassifier xmi:type="uml:PrimitiveType" xmi:id="Protocol-Stream3CProtocol3E" name="Stream<Protocol>" visibility="private"> + <templateBinding xmi:id="Protocol-Stream3CProtocol3E-_templateBinding.0" signature="Stream-_ownedTemplateSignature"> + <parameterSubstitution xmi:id="Protocol-Stream3CProtocol3E-_templateBinding.0-_parameterSubstitution.0" actual="Protocol" formal="Stream-_ownedTemplateSignature-_ownedParameter.0"/> + </templateBinding> + </nestedClassifier> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.38" visibility="private" memberEnd="Protocol-superProtocol Protocol-subProtocol"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.39" visibility="private" memberEnd="Protocol-message ProtocolMessage-protocol"/> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.40" visibility="private" memberEnd="Protocol-inMessage _packagedElement.40-inProtocol"> + <ownedEnd xmi:id="_packagedElement.40-inProtocol" name="inProtocol" type="Protocol" association="_packagedElement.40"/> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.41" visibility="private" memberEnd="Protocol-outMessage _packagedElement.41-outProtocol"> + <ownedEnd xmi:id="_packagedElement.41-outProtocol" name="outProtocol" type="Protocol" association="_packagedElement.41"/> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.42" visibility="private" memberEnd="Protocol-inOutMessage _packagedElement.42-inOutProtocol"> + <ownedEnd xmi:id="_packagedElement.42-inOutProtocol" name="inOutProtocol" type="Protocol" association="_packagedElement.42"/> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.43" visibility="private" memberEnd="Protocol-conjugate _packagedElement.43-base"> + <ownedEnd xmi:id="_packagedElement.43-base" name="base" type="Protocol" isReadOnly="true" isDerived="true" association="_packagedElement.43"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="ProtocolMessage" name="ProtocolMessage"> + <generalization xmi:id="ProtocolMessage-_generalization.0" general="NamedElement"/> + <ownedAttribute xmi:id="ProtocolMessage-kind" name="kind" isDerived="true"> + <type xmi:type="uml:Enumeration" href="../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_UXMMIGDdEeOesvHnEWH_sQ"/> + </ownedAttribute> + <ownedAttribute xmi:id="ProtocolMessage-redefinedMessage" name="redefinedMessage" type="ProtocolMessage" isReadOnly="true" isDerived="true" subsettedProperty="NamedElement-redefinedElement" association="_packagedElement.45"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="ProtocolMessage-redefinedMessage-_lowerValue"/> + </ownedAttribute> + <ownedAttribute xmi:id="ProtocolMessage-protocol" name="protocol" type="Protocol" isReadOnly="true" subsettedProperty="NamedElement-redefinitionContext" association="_packagedElement.39"/> + <ownedAttribute xmi:id="ProtocolMessage-parameter" name="parameter" isReadOnly="true" aggregation="shared" isDerived="true" association="_packagedElement.46"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Parameter"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="ProtocolMessage-parameter-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="ProtocolMessage-parameter-_upperValue" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:id="ProtocolMessage-isConjugate" name="isConjugate" isReadOnly="true" isDerived="true"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedAttribute> + <ownedAttribute xmi:id="ProtocolMessage-conjugate" name="conjugate" type="ProtocolMessage" isReadOnly="true" isDerived="true" association="_packagedElement.47"/> + <ownedOperation xmi:id="ProtocolMessage-toUML" name="toUML" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="ProtocolMessage-toUML-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="ProtocolMessage-toReceiveEvent" name="toReceiveEvent" isQuery="true" redefinedOperation="NamedElement-toUML"> + <ownedParameter xmi:id="ProtocolMessage-toReceiveEvent-_ownedParameter.0" direction="return" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#CallEvent"/> + </ownedParameter> + </ownedOperation> + <ownedOperation xmi:id="ProtocolMessage-createParameter" name="createParameter"> + <ownedParameter xmi:id="ProtocolMessage-createParameter-name" name="name" effect="read"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedParameter> + <ownedParameter xmi:id="ProtocolMessage-createParameter-type" name="type" effect="read"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Type"/> + </ownedParameter> + <ownedParameter xmi:id="ProtocolMessage-createParameter-_ownedParameter.2" direction="return"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Parameter"/> + </ownedParameter> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.45" visibility="private" memberEnd="ProtocolMessage-redefinedMessage _packagedElement.45-redefiningMessage"> + <ownedEnd xmi:id="_packagedElement.45-redefiningMessage" name="redefiningMessage" type="ProtocolMessage" isReadOnly="true" isDerived="true" subsettedProperty="_packagedElement.2-redefiningElement" association="_packagedElement.45"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_packagedElement.45-redefiningMessage-_lowerValue"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_packagedElement.45-redefiningMessage-_upperValue" value="*"/> + </ownedEnd> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.46" visibility="private" memberEnd="ProtocolMessage-parameter _packagedElement.46-message"> + <ownedEnd xmi:id="_packagedElement.46-message" name="message" type="ProtocolMessage" association="_packagedElement.46"/> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.47" visibility="private" memberEnd="ProtocolMessage-conjugate _packagedElement.47-base"> + <ownedEnd xmi:id="_packagedElement.47-base" name="base" type="ProtocolMessage" isReadOnly="true" isDerived="true" association="_packagedElement.47"/> + </packagedElement> + <packagedElement xmi:type="uml:PrimitiveType" xmi:id="List" name="List"> + <ownedTemplateSignature xmi:type="uml:RedefinableTemplateSignature" xmi:id="List-_ownedTemplateSignature" parameter="List-_ownedTemplateSignature-_ownedParameter.0"> + <ownedParameter xmi:type="uml:ClassifierTemplateParameter" xmi:id="List-_ownedTemplateSignature-_ownedParameter.0" parameteredElement="List-_ownedTemplateSignature-_ownedParameter.0-_ownedParameteredElement"> + <ownedParameteredElement xmi:type="uml:Class" xmi:id="List-_ownedTemplateSignature-_ownedParameter.0-_ownedParameteredElement" name="E" templateParameter="List-_ownedTemplateSignature-_ownedParameter.0"/> + </ownedParameter> + </ownedTemplateSignature> + </packagedElement> + <packagedElement xmi:type="uml:PrimitiveType" xmi:id="Stream" name="Stream"> + <ownedTemplateSignature xmi:type="uml:RedefinableTemplateSignature" xmi:id="Stream-_ownedTemplateSignature" parameter="Stream-_ownedTemplateSignature-_ownedParameter.0"> + <ownedParameter xmi:type="uml:ClassifierTemplateParameter" xmi:id="Stream-_ownedTemplateSignature-_ownedParameter.0" parameteredElement="Stream-_ownedTemplateSignature-_ownedParameter.0-_ownedParameteredElement"> + <ownedParameteredElement xmi:type="uml:Class" xmi:id="Stream-_ownedTemplateSignature-_ownedParameter.0-_ownedParameteredElement" name="E" templateParameter="Stream-_ownedTemplateSignature-_ownedParameter.0"/> + </ownedParameter> + </ownedTemplateSignature> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_packagedElement.50" visibility="private"/> + <profileApplication xmi:id="_profileApplication.0"> + <eAnnotations xmi:id="_profileApplication.0-_http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/> + </eAnnotations> + <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/> + </profileApplication> + <profileApplication xmi:id="_profileApplication.1"> + <eAnnotations xmi:id="_profileApplication.1-_http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/> + </eAnnotations> + <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/> + </profileApplication> + </uml:Model> + <Ecore:EPackage xmi:id="_UfhCkN_oEeaN6rz53IjevQ" base_Package="_0" basePackage="org.eclipse.papyrusrt"/> + <standard:Metamodel xmi:id="_6eFrkN_oEeaN6rz53IjevQ" base_Model="_0"/> + <standard:Metaclass xmi:id="_6eG5sN_oEeaN6rz53IjevQ" base_Class="NamedElement"/> + <standard:Metaclass xmi:id="_6eG5sd_oEeaN6rz53IjevQ" base_Class="Package"/> + <standard:Metaclass xmi:id="_6eG5st_oEeaN6rz53IjevQ" base_Class="Capsule"/> + <standard:Metaclass xmi:id="_6eHgwN_oEeaN6rz53IjevQ" base_Class="ReplicatedElement"/> + <standard:Metaclass xmi:id="_6eHgwd_oEeaN6rz53IjevQ" base_Class="Port"/> + <standard:Metaclass xmi:id="_6eHgwt_oEeaN6rz53IjevQ" base_Class="CapsulePart"/> + <standard:Metaclass xmi:id="_6eIH0N_oEeaN6rz53IjevQ" base_Class="Connector"/> + <standard:Metaclass xmi:id="_6eIH0d_oEeaN6rz53IjevQ" base_Class="Protocol"/> + <standard:Metaclass xmi:id="_6eIH0t_oEeaN6rz53IjevQ" base_Class="ProtocolMessage"/> + <standard:Metaclass xmi:id="_5dkNRN_pEeaN6rz53IjevQ" base_Class="Classifier"/> + <Ecore:EEnum xmi:id="_5UZKsOALEeaN6rz53IjevQ" base_Enumeration="InheritanceKind" enumName="UMLRTInheritanceKind"/> + <Ecore:EEnum xmi:id="_9s4N4OALEeaN6rz53IjevQ" base_Enumeration="PortKind" enumName="UMLRTPortKind"/> + <Ecore:EEnum xmi:id="_AgioUOAMEeaN6rz53IjevQ" base_Enumeration="CapsulePartKind" enumName="UMLRTCapsulePartKind"/> + <Ecore:EDataType xmi:id="_pILrsOAUEeaN6rz53IjevQ" instanceClassName="org.eclipse.papyrusrt.umlrt.uml.UMLRTModel" base_PrimitiveType="Model"/> + <Ecore:EReference xmi:id="_HMch0OAbEeaN6rz53IjevQ" isTransient="true" base_Property="Package-capsule" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_SCHq4OAbEeaN6rz53IjevQ" isTransient="true" base_Property="Package-nestingPackage" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_UWux0OAbEeaN6rz53IjevQ" isTransient="true" base_Property="Package-nestedPackage" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_ZqcHIOAbEeaN6rz53IjevQ" isTransient="true" base_Property="Package-protocol" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_iDHpUOAbEeaN6rz53IjevQ" isTransient="true" base_Property="Capsule-package" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_nl58cOAbEeaN6rz53IjevQ" isTransient="true" base_Property="Protocol-package" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_yR7k0eAcEeaN6rz53IjevQ" isTransient="true" base_Property="Capsule-superclass" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_4lB6kOAcEeaN6rz53IjevQ" isTransient="true" base_Property="Capsule-subclass" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_BAf0leApEeaN6rz53IjevQ" isTransient="true" base_Property="Protocol-superProtocol" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_BAf0luApEeaN6rz53IjevQ" isTransient="true" base_Property="Protocol-subProtocol" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_t1lM8-AqEeaN6rz53IjevQ" isTransient="true" base_Property="Capsule-port" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_yNiEoOAqEeaN6rz53IjevQ" isTransient="true" base_Property="Capsule-capsulePart" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_H6L28OAuEeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Protocol-message" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_VAko8-AvEeaN6rz53IjevQ" isTransient="true" base_Property="ProtocolMessage-parameter" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_B4O0MOAxEeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Port-redefinedPort" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_QUCWcOAxEeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Port-capsule" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_Zs2f8OAxEeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Port-type" isResolveProxies="false"/> + <Ecore:EAttribute xmi:id="_hRShwOAxEeaN6rz53IjevQ" isVolatile="true" base_Property="Port-isService" attributeName="service"/> + <Ecore:EAttribute xmi:id="_iXkNUOAxEeaN6rz53IjevQ" isVolatile="true" base_Property="Port-isBehavior" attributeName="behavior"/> + <Ecore:EAttribute xmi:id="_ihhakeAxEeaN6rz53IjevQ" isVolatile="true" base_Property="Port-isConjugated" attributeName="conjugated"/> + <Ecore:EAttribute xmi:id="_ipE0EeAxEeaN6rz53IjevQ" isVolatile="true" base_Property="Port-isWired" attributeName="wired"/> + <Ecore:EAttribute xmi:id="_iwGpIeAxEeaN6rz53IjevQ" isVolatile="true" base_Property="Port-isPublish" attributeName="publish"/> + <Ecore:EAttribute xmi:id="_i7_wEOAxEeaN6rz53IjevQ" isVolatile="true" base_Property="Port-isNotification" attributeName="notification"/> + <Ecore:EAttribute xmi:id="_XkDyAeAyEeaN6rz53IjevQ" isVolatile="true" base_Property="ReplicatedElement-isSymbolicReplicationFactor" attributeName="symbolicReplicationFactor"/> + <Ecore:EReference xmi:id="_uHPrEuAyEeaN6rz53IjevQ" isVolatile="true" base_Property="Protocol-conjugate" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_H9jhweAzEeaN6rz53IjevQ" isVolatile="true" base_Property="_packagedElement.43-base" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_Y8vxUuA0EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Port-connector" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_hOK08-A0EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Port-insideConnector" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_k8dro-A0EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Port-outsideConnector" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_3Keew-A1EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Capsule-connector" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_AcHpQuA2EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Connector-capsule" isResolveProxies="false"/> + <Ecore:EAttribute xmi:id="_Js9QkeA4EeaN6rz53IjevQ" isVolatile="true" base_Property="CapsulePart-isOptional" attributeName="optional"/> + <Ecore:EAttribute xmi:id="_vjdit-A4EeaN6rz53IjevQ" isVolatile="true" attributeName="publish"/> + <Ecore:EAttribute xmi:id="_vjdiuOA4EeaN6rz53IjevQ" isVolatile="true" attributeName="notification"/> + <Ecore:EReference xmi:id="_aUP9gOA5EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="NamedElement-redefinedElement" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_eI_acOA5EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="NamedElement-redefinitionContext" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_81YPQOA5EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="NamedElement-redefinableElement" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_CoUo0OA7EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="ProtocolMessage-redefinedMessage" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_GUmtUOA7EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="ProtocolMessage-protocol" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_QifoM-A8EeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="NamedElement-inheritedElement" isResolveProxies="false"/> + <standard:Metaclass xmi:id="_bFiTsOA9EeaN6rz53IjevQ" base_Class="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault"/> + <Ecore:EGenericType xmi:id="_m5MvAOA9EeaN6rz53IjevQ" base_Class="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" upperBound="NamedElement"/> + <Ecore:EEnumLiteral xmi:id="_8SQKsOBSEeaN6rz53IjevQ" xmlName="" base_EnumerationLiteral="CapsulePartKind-plug-in" enumLiteralName="plug_in" literal="plug-in"/> + <Ecore:EGenericType xmi:id="_fs7BoOBVEeaN6rz53IjevQ" upperBound="NamedElement"/> + <standard:Metaclass xmi:id="_jAJF4OBVEeaN6rz53IjevQ"/> + <Ecore:ETypeParameter xmi:id="_ISeegOBXEeaN6rz53IjevQ" base_TemplateParameter="NamedElement-getRedefinitionOf-_ownedTemplateSignature-_ownedParameter.0" bounds="NamedElement"/> + <Ecore:EReference xmi:id="_fnTP5uBXEeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="NamedElement-excludedElement" isResolveProxies="false"/> + <Ecore:ETypeParameter xmi:id="_NAcNB-BYEeaN6rz53IjevQ" base_TemplateParameter="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0" bounds="NamedElement"/> + <standard:Metaclass xmi:id="_NAc0EOBYEeaN6rz53IjevQ" base_Class="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault"/> + <Ecore:EGenericType xmi:id="_NAc0EeBYEeaN6rz53IjevQ" base_Class="NamedElement-getExcludedElement-_ownedTemplateSignature-_ownedParameter.0-_ownedDefault" upperBound="NamedElement"/> + <standard:Metaclass xmi:id="_zetpwOBYEeaN6rz53IjevQ" base_Class="NamedElement-Class_T"/> + <Ecore:EGenericType xmi:id="_8NFIEOBYEeaN6rz53IjevQ" base_Class="NamedElement-Class_T"/> + <Ecore:EDataType xmi:id="_3MNZwOBZEeaN6rz53IjevQ" xmlName="" instanceClassName="java.util.stream.Stream"/> + <Ecore:EGenericType xmi:id="_nmBSkOBaEeaN6rz53IjevQ" base_Class="Classifier-_3F20extends20Classifier" upperBound="Classifier"/> + <standard:Metaclass xmi:id="_xqzxQOBaEeaN6rz53IjevQ" base_Class="Classifier-_3F20extends20Classifier"/> + <standard:Metaclass xmi:id="_xq1mcOBaEeaN6rz53IjevQ"/> + <Ecore:ETypeParameter xmi:id="_M_m_MOBbEeaN6rz53IjevQ"/> + <Ecore:EGenericType xmi:id="_erjxoOBdEeaN6rz53IjevQ" base_DataType="Classifier-List3C3F20extends20Classifier3E"/> + <Ecore:EDataType xmi:id="_bflIYOBeEeaN6rz53IjevQ" instanceClassName="java.util.List" base_PrimitiveType="List"/> + <standard:Metaclass xmi:id="_bflIYeBeEeaN6rz53IjevQ" base_Class="List-_ownedTemplateSignature-_ownedParameter.0-_ownedParameteredElement"/> + <Ecore:EDataType xmi:id="_jdHmtOBeEeaN6rz53IjevQ" instanceClassName="java.util.stream.Stream" base_PrimitiveType="Stream"/> + <standard:Metaclass xmi:id="_jdHmteBeEeaN6rz53IjevQ" base_Class="Stream-_ownedTemplateSignature-_ownedParameter.0-_ownedParameteredElement"/> + <Ecore:EGenericType xmi:id="_Fm_PAOBfEeaN6rz53IjevQ" base_DataType="Classifier-Stream3C3F20extends20Classifier3E"/> + <Ecore:EGenericType xmi:id="_UMwlk-BfEeaN6rz53IjevQ" base_DataType="Capsule-Stream3CCapsule3E"/> + <Ecore:EGenericType xmi:id="_gEVQheBfEeaN6rz53IjevQ" base_DataType="Protocol-Stream3CProtocol3E"/> + <Ecore:EOperation xmi:id="_FwoBQOBhEeaN6rz53IjevQ"/> + <Ecore:EAttribute xmi:id="_ZOuYsOBhEeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Capsule-hierarchy"/> + <Ecore:EAttribute xmi:id="_p_p_QOBhEeaN6rz53IjevQ" isTransient="true" isVolatile="true" base_Property="Protocol-hierarchy"/> + <Ecore:EReference xmi:id="_G4o-IOChEeaJZvIYnDpAHQ" isTransient="true" isVolatile="true" base_Property="NamedElement-rootDefinition" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_JzmzEOCkEeaJZvIYnDpAHQ" isTransient="true" isVolatile="true" base_Property="Classifier-general" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_pRadwOCkEeaJZvIYnDpAHQ" isTransient="true" isVolatile="true" base_Property="Classifier-specific" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_CeDEsOD6EeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Port-partWithPort" referenceName="partsWithPort" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_bvbaoOEAEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="CapsulePart-redefinedPart" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_5JMJ8OEAEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="CapsulePart-capsule" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_8qUHUOEAEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="CapsulePart-type" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_bEMEQOELEeanBvJuK4W-DA" isVolatile="true" base_Property="ProtocolMessage-conjugate" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_bEMEQeELEeanBvJuK4W-DA" isVolatile="true" base_Property="_packagedElement.47-base" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_I9sRkOEOEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Connector-redefinedConnector" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_NHf_kOEOEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Connector-source" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_RR7_sOEOEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Connector-sourcePartWithPort" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_U04iAOEOEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Connector-sourceReplicationFactor" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_XoNlQOEOEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Connector-target" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_awb6cOEOEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Connector-targetPartWithPort" isResolveProxies="false"/> + <Ecore:EReference xmi:id="__Q7fFOESEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Protocol-inMessage" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_Ka9uleETEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Protocol-outMessage" isResolveProxies="false"/> + <Ecore:EReference xmi:id="_KmxV8OETEeanBvJuK4W-DA" isTransient="true" isVolatile="true" base_Property="Protocol-inOutMessage" isResolveProxies="false"/> +</xmi:XMI>
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt.ecore b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt.ecore new file mode 100644 index 0000000..99e6311 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/model/umlrt.ecore
@@ -0,0 +1,616 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="umlrt" nsURI="http://www.eclipse.org/papyrusrt/2017/UML-RT" + nsPrefix="umlrt"> + <eClassifiers xsi:type="ecore:EDataType" name="Model" instanceClassName="org.eclipse.papyrusrt.umlrt.uml.UMLRTModel"/> + <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"/> + <eOperations name="redefines" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"> + <eParameters name="element" ordered="false" lowerBound="1" eType="#//NamedElement"/> + </eOperations> + <eOperations name="getRedefinitionOf" ordered="false"> + <eGenericType eTypeParameter="#//NamedElement/getRedefinitionOf/T"/> + <eTypeParameters name="T"> + <eBounds eClassifier="#//NamedElement"/> + </eTypeParameters> + <eParameters name="element" ordered="false" lowerBound="1"> + <eGenericType eTypeParameter="#//NamedElement/getRedefinitionOf/T"/> + </eParameters> + </eOperations> + <eOperations name="getRedefinitionChain" ordered="false" lowerBound="1" upperBound="-1" + eType="#//NamedElement"/> + <eOperations name="getExcludedElement" ordered="false"> + <eGenericType eTypeParameter="#//NamedElement/getExcludedElement/T"/> + <eTypeParameters name="T"> + <eBounds eClassifier="#//NamedElement"/> + </eTypeParameters> + <eParameters name="name" ordered="false" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eParameters name="type" ordered="false" lowerBound="1"> + <eGenericType eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass"> + <eTypeArguments eTypeParameter="#//NamedElement/getExcludedElement/T"/> + </eGenericType> + </eParameters> + </eOperations> + <eOperations name="exclude" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + <eOperations name="reinherit" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + <eOperations name="reify" ordered="false" lowerBound="1"/> + <eOperations name="destroy" ordered="false" lowerBound="1"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="model" ordered="false" + lowerBound="1" eType="#//Model" changeable="false" volatile="true" transient="true" + derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="inheritanceKind" ordered="false" + lowerBound="1" eType="#//UMLRTInheritanceKind" changeable="false" volatile="true" + transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isInherited" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isVirtualRedefinition" + ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isRedefinition" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isExcluded" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="redefinedElement" ordered="false" + eType="#//NamedElement" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="redefiningElement"/> + </eAnnotations> + <eAnnotations source="union"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="redefinitionContext" ordered="false" + eType="#//NamedElement" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//NamedElement/redefinableElement"> + <eAnnotations source="union"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="redefinableElement" ordered="false" + upperBound="-1" eType="#//NamedElement" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false" eOpposite="#//NamedElement/redefinitionContext"> + <eAnnotations source="union"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="inheritedElement" ordered="false" + eType="#//NamedElement" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="inheritingElement"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="rootDefinition" ordered="false" + eType="#//NamedElement" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="redefinitionTree"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="excludedElement" ordered="false" + upperBound="-1" eType="#//NamedElement" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="excludingElement"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="UMLRTInheritanceKind"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="InheritanceKind"/> + </eAnnotations> + <eLiterals name="inherited"/> + <eLiterals name="redefined" value="1"/> + <eLiterals name="excluded" value="2"/> + <eLiterals name="none" value="3"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Package" eSuperTypes="#//NamedElement"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Package"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + </eOperations> + <eOperations name="createNestedPackage" ordered="false" lowerBound="1" eType="#//Package"> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + </eOperations> + <eOperations name="createCapsule" ordered="false" lowerBound="1" eType="#//Capsule"> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + </eOperations> + <eOperations name="createProtocol" ordered="false" lowerBound="1" eType="#//Protocol"> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EReference" name="nestedPackage" ordered="false" + upperBound="-1" eType="#//Package" volatile="true" transient="true" derived="true" + resolveProxies="false" eOpposite="#//Package/nestingPackage"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="nestingPackage" ordered="false" + eType="#//Package" changeable="false" volatile="true" transient="true" derived="true" + resolveProxies="false" eOpposite="#//Package/nestedPackage"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="capsule" ordered="false" + upperBound="-1" eType="#//Capsule" volatile="true" transient="true" derived="true" + resolveProxies="false" eOpposite="#//Capsule/package"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="protocol" ordered="false" + upperBound="-1" eType="#//Protocol" volatile="true" transient="true" derived="true" + resolveProxies="false" eOpposite="#//Protocol/package"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Capsule" eSuperTypes="#//Classifier"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Class"> + <eAnnotations source="redefines" references="#//Classifier/toUML"/> + </eOperations> + <eOperations name="getAncestry" ordered="false" lowerBound="1" upperBound="-1" + eType="#//Capsule"> + <eAnnotations source="redefines" references="#//Classifier/getAncestry"/> + </eOperations> + <eOperations name="getPorts" ordered="false" upperBound="-1" eType="#//Port"> + <eParameters name="withExclusions" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + </eOperations> + <eOperations name="getCapsuleParts" ordered="false" upperBound="-1" eType="#//CapsulePart"> + <eParameters name="withExclusions" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + </eOperations> + <eOperations name="getConnectors" ordered="false" upperBound="-1" eType="#//Connector"> + <eParameters name="withExclusions" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + </eOperations> + <eOperations name="createPort" ordered="false" lowerBound="1" eType="#//Port"> + <eParameters name="type" ordered="false" lowerBound="1" eType="#//Protocol"/> + </eOperations> + <eOperations name="createPort" ordered="false" lowerBound="1" eType="#//Port"> + <eParameters name="type" ordered="false" lowerBound="1" eType="#//Protocol"/> + <eParameters name="kind" ordered="false" lowerBound="1" eType="#//UMLRTPortKind"/> + </eOperations> + <eOperations name="createCapsulePart" ordered="false" lowerBound="1" eType="#//CapsulePart"> + <eParameters name="type" ordered="false" lowerBound="1" eType="#//Capsule"/> + </eOperations> + <eOperations name="createConnector" ordered="false" lowerBound="1" eType="#//Connector"> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eParameters name="source" ordered="false" lowerBound="1" eType="#//Port"/> + <eParameters name="sourcePartWithPort" ordered="false" eType="#//CapsulePart"/> + <eParameters name="target" ordered="false" lowerBound="1" eType="#//Port"/> + <eParameters name="targetPartWithPort" ordered="false" eType="#//CapsulePart"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EReference" name="superclass" ordered="false" + eType="#//Capsule" volatile="true" transient="true" derived="true" resolveProxies="false" + eOpposite="#//Capsule/subclass"> + <eAnnotations source="subsets" references="#//Classifier/general"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="subclass" ordered="false" + upperBound="-1" eType="#//Capsule" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Capsule/superclass"> + <eAnnotations source="subsets" references="#//Classifier/specific"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="port" ordered="false" upperBound="-1" + eType="#//Port" changeable="false" volatile="true" transient="true" derived="true" + resolveProxies="false" eOpposite="#//Port/capsule"> + <eAnnotations source="subsets" references="#//NamedElement/redefinableElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="capsulePart" ordered="false" + upperBound="-1" eType="#//CapsulePart" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false" eOpposite="#//CapsulePart/capsule"> + <eAnnotations source="subsets" references="#//NamedElement/redefinableElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="connector" ordered="false" + upperBound="-1" eType="#//Connector" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Connector/capsule"> + <eAnnotations source="subsets" references="#//NamedElement/redefinableElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="hierarchy" ordered="false" + lowerBound="1" changeable="false" volatile="true" transient="true" derived="true"> + <eGenericType eClassifier="#//Stream"> + <eTypeArguments eClassifier="#//Capsule"/> + </eGenericType> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="package" ordered="false" + lowerBound="1" eType="#//Package" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Package/capsule"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Classifier" abstract="true" eSuperTypes="#//NamedElement"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Classifier"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + </eOperations> + <eOperations name="getPackage" ordered="false" lowerBound="1" eType="#//Package"/> + <eOperations name="getAncestry" ordered="false" lowerBound="1"> + <eGenericType eClassifier="#//List"> + <eTypeArguments> + <eUpperBound eClassifier="#//Classifier"/> + </eTypeArguments> + </eGenericType> + </eOperations> + <eOperations name="getHierarchy" ordered="false" lowerBound="1"> + <eGenericType eClassifier="#//Stream"> + <eTypeArguments> + <eUpperBound eClassifier="#//Classifier"/> + </eTypeArguments> + </eGenericType> + </eOperations> + <eOperations name="isSuperTypeOf" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"> + <eParameters name="classifier" ordered="false" lowerBound="1" eType="#//Classifier"/> + </eOperations> + <eOperations name="setGeneral" ordered="false" lowerBound="1"> + <eParameters name="general" ordered="false" eType="#//Classifier"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EReference" name="general" ordered="false" + eType="#//Classifier" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Classifier/specific"> + <eAnnotations source="union"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="specific" ordered="false" + upperBound="-1" eType="#//Classifier" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Classifier/general"> + <eAnnotations source="union"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EDataType" name="List" instanceClassName="java.util.List"> + <eTypeParameters name="E"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EDataType" name="Stream" instanceClassName="java.util.stream.Stream"> + <eTypeParameters name="E"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Port" eSuperTypes="#//ReplicatedElement"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Port"> + <eAnnotations source="redefines" references="#//ReplicatedElement/toUML"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" ordered="false" lowerBound="1" + eType="#//UMLRTPortKind" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="redefinedPort" ordered="false" + eType="#//Port" changeable="false" volatile="true" transient="true" derived="true" + resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="redefiningPort"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//NamedElement/redefinedElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="type" ordered="false" lowerBound="1" + eType="#//Protocol" volatile="true" transient="true" derived="true" resolveProxies="false"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="partsWithPort" ordered="false" + upperBound="-1" eType="#//CapsulePart" volatile="true" transient="true" derived="true" + resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="portOnPart"/> + </eAnnotations> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="partWithPort"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="service" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isService"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="behavior" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isBehavior"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="conjugated" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isConjugated"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="wired" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isWired"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="publish" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isPublish"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="notification" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isNotification"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="registration" ordered="false" + lowerBound="1" eType="ecore:EEnum ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/UMLRealTime.ecore#//PortRegistrationType" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="registrationOverride" ordered="false" + eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isConnected" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isConnectedInside" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isConnectedOutside" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="connector" ordered="false" + upperBound="-1" eType="#//Connector" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="union"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="insideConnector" ordered="false" + upperBound="-1" eType="#//Connector" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="inside"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//Port/connector"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="outsideConnector" ordered="false" + upperBound="-1" eType="#//Connector" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="outside"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//Port/connector"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="capsule" ordered="false" + lowerBound="1" eType="#//Capsule" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Capsule/port"> + <eAnnotations source="subsets" references="#//NamedElement/redefinitionContext"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ReplicatedElement" abstract="true" eSuperTypes="#//NamedElement"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Property"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + </eOperations> + <eOperations name="getCapsule" ordered="false" lowerBound="1" eType="#//Capsule"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="replicationFactor" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Integer" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="symbolicReplicationFactor" + ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isSymbolicReplicationFactor"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="UMLRTPortKind"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="PortKind"/> + </eAnnotations> + <eLiterals name="externalBehavior"/> + <eLiterals name="internalBehavior" value="1"/> + <eLiterals name="relay" value="2"/> + <eLiterals name="SAP" value="3"/> + <eLiterals name="SPP" value="4"/> + <eLiterals name="null" value="5"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Protocol" eSuperTypes="#//Classifier"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Collaboration"> + <eAnnotations source="redefines" references="#//Classifier/toUML"/> + </eOperations> + <eOperations name="getAnyReceiveEvent" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//AnyReceiveEvent"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + </eOperations> + <eOperations name="getAncestry" ordered="false" lowerBound="1" upperBound="-1" + eType="#//Protocol"> + <eAnnotations source="redefines" references="#//Classifier/getAncestry"/> + </eOperations> + <eOperations name="getMessages" ordered="false" upperBound="-1" eType="#//ProtocolMessage"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + <eParameters name="kind" ordered="false" lowerBound="1" eType="ecore:EEnum ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/UMLRealTime.ecore#//RTMessageKind"/> + </eOperations> + <eOperations name="getMessages" ordered="false" upperBound="-1" eType="#//ProtocolMessage"> + <eParameters name="kind" ordered="false" lowerBound="1" eType="ecore:EEnum ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/UMLRealTime.ecore#//RTMessageKind"/> + <eParameters name="withExclusions" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + </eOperations> + <eOperations name="getMessages" ordered="false" upperBound="-1" eType="#//ProtocolMessage"> + <eParameters name="withExclusions" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + </eOperations> + <eOperations name="createMessage" ordered="false" lowerBound="1" eType="#//ProtocolMessage"> + <eParameters name="kind" ordered="false" lowerBound="1" eType="ecore:EEnum ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/UMLRealTime.ecore#//RTMessageKind"/> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + </eOperations> + <eOperations name="createMessage" ordered="false" lowerBound="1" eType="#//ProtocolMessage"> + <eParameters name="kind" ordered="false" lowerBound="1" eType="ecore:EEnum ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/UMLRealTime.ecore#//RTMessageKind"/> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eParameters name="dataType" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Type"/> + </eOperations> + <eOperations name="createMessage" ordered="false" lowerBound="1" eType="#//ProtocolMessage"> + <eParameters name="kind" ordered="false" lowerBound="1" eType="ecore:EEnum ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/UMLRealTime.ecore#//RTMessageKind"/> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eParameters name="parameterName" ordered="false" upperBound="-1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eParameters name="parameterType" ordered="false" upperBound="-1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Type"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EReference" name="package" ordered="false" + lowerBound="1" eType="#//Package" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Package/protocol"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="superProtocol" ordered="false" + eType="#//Protocol" volatile="true" transient="true" derived="true" resolveProxies="false" + eOpposite="#//Protocol/subProtocol"> + <eAnnotations source="subsets" references="#//Classifier/general"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="subProtocol" ordered="false" + upperBound="-1" eType="#//Protocol" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Protocol/superProtocol"> + <eAnnotations source="subsets" references="#//Classifier/specific"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="message" ordered="false" + upperBound="-1" eType="#//ProtocolMessage" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false" eOpposite="#//ProtocolMessage/protocol"> + <eAnnotations source="union"/> + <eAnnotations source="subsets" references="#//NamedElement/redefinableElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="inMessage" ordered="false" + upperBound="-1" eType="#//ProtocolMessage" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="inProtocol"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//Protocol/message"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="outMessage" ordered="false" + upperBound="-1" eType="#//ProtocolMessage" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="outProtocol"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//Protocol/message"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="inOutMessage" ordered="false" + upperBound="-1" eType="#//ProtocolMessage" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="inOutProtocol"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//Protocol/message"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isConjugate" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="conjugate" ordered="false" + lowerBound="1" eType="#//Protocol" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="base"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="hierarchy" ordered="false" + lowerBound="1" changeable="false" volatile="true" transient="true" derived="true"> + <eGenericType eClassifier="#//Stream"> + <eTypeArguments eClassifier="#//Protocol"/> + </eGenericType> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ProtocolMessage" eSuperTypes="#//NamedElement"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Operation"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + </eOperations> + <eOperations name="toReceiveEvent" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//CallEvent"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + </eOperations> + <eOperations name="createParameter" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Parameter"> + <eParameters name="name" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eParameters name="type" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Type"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" ordered="false" lowerBound="1" + eType="ecore:EEnum ../../org.eclipse.papyrusrt.umlrt.profile/umlProfile/UMLRealTime.ecore#//RTMessageKind" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="redefinedMessage" ordered="false" + eType="#//ProtocolMessage" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="redefiningMessage"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//NamedElement/redefinedElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="parameter" ordered="false" + upperBound="-1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Parameter" + changeable="false" volatile="true" transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="message"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isConjugate" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + changeable="false" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="conjugate" ordered="false" + lowerBound="1" eType="#//ProtocolMessage" changeable="false" volatile="true" + transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="base"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="protocol" ordered="false" + lowerBound="1" eType="#//Protocol" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Protocol/message"> + <eAnnotations source="subsets" references="#//NamedElement/redefinitionContext"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="CapsulePart" eSuperTypes="#//ReplicatedElement"> + <eOperations name="getConnectorsOf" ordered="false" upperBound="-1" eType="#//Connector"> + <eParameters name="port" ordered="false" lowerBound="1" eType="#//Port"/> + </eOperations> + <eOperations name="getConnectorsOfPorts" ordered="false" upperBound="-1" eType="#//Connector"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" ordered="false" lowerBound="1" + eType="#//UMLRTCapsulePartKind" volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="optional" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="isOptional"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="redefinedPart" ordered="false" + eType="#//CapsulePart" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="redefiningPart"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//NamedElement/redefinedElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="capsule" ordered="false" + lowerBound="1" eType="#//Capsule" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Capsule/capsulePart"> + <eAnnotations source="subsets" references="#//NamedElement/redefinitionContext"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="type" ordered="false" lowerBound="1" + eType="#//Capsule" volatile="true" transient="true" derived="true" resolveProxies="false"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="UMLRTCapsulePartKind"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="CapsulePartKind"/> + </eAnnotations> + <eLiterals name="fixed"/> + <eLiterals name="optional" value="1"/> + <eLiterals name="plug_in" value="2" literal="plug-in"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="plugin"/> + </eAnnotations> + </eLiterals> + <eLiterals name="null" value="3"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Connector" eSuperTypes="#//NamedElement"> + <eOperations name="toUML" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Connector"> + <eAnnotations source="redefines" references="#//NamedElement/toUML"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EReference" name="redefinedConnector" ordered="false" + eType="#//Connector" changeable="false" volatile="true" transient="true" derived="true" + resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="redefiningConnector"/> + </eAnnotations> + <eAnnotations source="subsets" references="#//NamedElement/redefinedElement"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="capsule" ordered="false" + lowerBound="1" eType="#//Capsule" changeable="false" volatile="true" transient="true" + derived="true" resolveProxies="false" eOpposite="#//Capsule/connector"> + <eAnnotations source="subsets" references="#//NamedElement/redefinitionContext"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="source" ordered="false" + lowerBound="1" eType="#//Port" volatile="true" transient="true" derived="true" + resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="sourceOf"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="sourcePartWithPort" ordered="false" + eType="#//CapsulePart" volatile="true" transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="sourceOf"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceReplicationFactor" + ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Integer" + volatile="true" transient="true" derived="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="target" ordered="false" + lowerBound="1" eType="#//Port" volatile="true" transient="true" derived="true" + resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="targetOf"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="targetPartWithPort" ordered="false" + eType="#//CapsulePart" volatile="true" transient="true" derived="true" resolveProxies="false"> + <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"> + <details key="body" value="targetOf"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetReplicationFactor" + ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Integer" + volatile="true" transient="true" derived="true"/> + </eClassifiers> +</ecore:EPackage>
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/plugin.xml b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/plugin.xml index 3a38d8e..766e206 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/plugin.xml +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/plugin.xml
@@ -24,19 +24,12 @@ genModel="model/uml-ext.genmodel"/> </extension> - <extension - point="org.eclipse.emf.ecore.uri_mapping"> - <mapping - source="pathmap://UML_RT_UML/" - target="platform:/plugin/org.eclipse.papyrusrt.umlrt.uml/model/"> - </mapping> - </extension> - <extension - point="org.eclipse.uml2.uml.generated_package"> - <profile - location="pathmap://UML_RT_UML/uml-ext.metamodel.uml#_0" - uri="http://www.eclipse.org/papyrus/umlrt/uml-ext"> - </profile> + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated umlrt-facade --> + <package + uri="http://www.eclipse.org/papyrusrt/2017/UML-RT" + class="org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage" + genModel="model/umlrt-facade.genmodel"/> </extension> </plugin>
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsule.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsule.java new file mode 100644 index 0000000..d310bd3 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsule.java
@@ -0,0 +1,421 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; + +import java.util.stream.Stream; + +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl; +import org.eclipse.uml2.uml.Class; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Capsule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSuperclass <em>Superclass</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSubclasses <em>Subclass</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPorts <em>Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getCapsuleParts <em>Capsule Part</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getConnectors <em>Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getHierarchy <em>Hierarchy</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPackage <em>Package</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule() + * @generated + */ +public interface UMLRTCapsule extends UMLRTClassifier { + /** + * Obtains the canonical instance of the capsule façade for a class. + * + * @param class_ + * a class in the UML model + * + * @return its capsule façade, or {@code null} if the class is not a valid capsule + */ + public static UMLRTCapsule getInstance(Class class_) { + return UMLRTCapsuleImpl.getInstance(class_); + } + + /** + * Returns the value of the '<em><b>Superclass</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSubclasses <em>Subclass</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getGeneral() <em>General</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Superclass</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Superclass</em>' reference. + * @see #setSuperclass(UMLRTCapsule) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule_Superclass() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSubclasses + * @generated + */ + UMLRTCapsule getSuperclass(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSuperclass <em>Superclass</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Superclass</em>' reference. + * @see #getSuperclass() + * @generated + */ + void setSuperclass(UMLRTCapsule value); + + /** + * Returns the value of the '<em><b>Subclass</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSuperclass <em>Superclass</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getSpecifics() <em>Specific</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Subclass</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Subclass</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule_Subclass() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSuperclass + * @generated + */ + List<UMLRTCapsule> getSubclasses(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>' from the '<em><b>Subclass</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getSubclasses() + * @generated + */ + UMLRTCapsule getSubclass(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>' from the '<em><b>Subclass</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getSubclasses() + * @generated + */ + UMLRTCapsule getSubclass(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Port</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getCapsule <em>Capsule</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements() <em>Redefinable Element</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Port</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Port</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule_Port() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getCapsule + * @generated + */ + List<UMLRTPort> getPorts(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort} with the specified '<em><b>Name</b></em>' from the '<em><b>Port</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getPorts() + * @generated + */ + UMLRTPort getPort(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort} with the specified '<em><b>Name</b></em>' from the '<em><b>Port</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getPorts() + * @generated + */ + UMLRTPort getPort(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Connector</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getCapsule <em>Capsule</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements() <em>Redefinable Element</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Connector</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Connector</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule_Connector() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getCapsule + * @generated + */ + List<UMLRTConnector> getConnectors(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getConnectors() + * @generated + */ + UMLRTConnector getConnector(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getConnectors() + * @generated + */ + UMLRTConnector getConnector(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Capsule Part</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getCapsule <em>Capsule</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements() <em>Redefinable Element</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Capsule Part</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Capsule Part</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule_CapsulePart() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getCapsule + * @generated + */ + List<UMLRTCapsulePart> getCapsuleParts(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>' from the '<em><b>Capsule Part</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getCapsuleParts() + * @generated + */ + UMLRTCapsulePart getCapsulePart(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>' from the '<em><b>Capsule Part</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getCapsuleParts() + * @generated + */ + UMLRTCapsulePart getCapsulePart(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Hierarchy</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Hierarchy</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Hierarchy</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule_Hierarchy() + * @generated + */ + @Override + Stream<UMLRTCapsule> getHierarchy(); + + /** + * Returns the value of the '<em><b>Package</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getCapsules <em>Capsule</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Package</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Package</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsule_Package() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getCapsules + * @generated + */ + @Override + UMLRTPackage getPackage(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + org.eclipse.uml2.uml.Class toUML(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getAncestry() <em>Get Ancestry</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + List<UMLRTCapsule> getAncestry(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTPort> getPorts(boolean withExclusions); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTCapsulePart> getCapsuleParts(boolean withExclusions); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTConnector> getConnectors(boolean withExclusions); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTPort createPort(UMLRTProtocol type); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTPort createPort(UMLRTProtocol type, UMLRTPortKind kind); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTCapsulePart createCapsulePart(UMLRTCapsule type); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTConnector createConnector(String name, UMLRTPort source, UMLRTCapsulePart sourcePartWithPort, UMLRTPort target, UMLRTCapsulePart targetPartWithPort); + +} // UMLRTCapsule
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePart.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePart.java new file mode 100644 index 0000000..84fafac --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePart.java
@@ -0,0 +1,201 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; + +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl; +import org.eclipse.uml2.uml.Property; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Capsule Part</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getKind <em>Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#isOptional <em>Optional</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getRedefinedPart <em>Redefined Part</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getCapsule <em>Capsule</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getType <em>Type</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsulePart() + * @generated + */ +public interface UMLRTCapsulePart extends UMLRTReplicatedElement { + + /** + * Obtains the canonical instance of the capsule-part façade for a property. + * + * @param part + * a property in the UML model + * + * @return its capsule-part façade, or {@code null} if the property is not a valid capsule-part + */ + public static UMLRTCapsulePart getInstance(Property part) { + return UMLRTCapsulePartImpl.getInstance(part); + } + + /** + * Returns the value of the '<em><b>Kind</b></em>' attribute. + * The literals are from the enumeration {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Kind</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Kind</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind + * @see #setKind(UMLRTCapsulePartKind) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsulePart_Kind() + * @generated + */ + UMLRTCapsulePartKind getKind(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getKind <em>Kind</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Kind</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind + * @see #getKind() + * @generated + */ + void setKind(UMLRTCapsulePartKind value); + + /** + * Returns the value of the '<em><b>Optional</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Optional</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Optional</em>' attribute. + * @see #setOptional(boolean) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsulePart_Optional() + * @generated + */ + boolean isOptional(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#isOptional <em>Optional</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Optional</em>' attribute. + * @see #isOptional() + * @generated + */ + void setOptional(boolean value); + + /** + * Returns the value of the '<em><b>Redefined Part</b></em>' reference. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinedElement() <em>Redefined Element</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Redefined Part</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Redefined Part</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsulePart_RedefinedPart() + * @generated + */ + UMLRTCapsulePart getRedefinedPart(); + + /** + * Returns the value of the '<em><b>Type</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Type</em>' reference. + * @see #setType(UMLRTCapsule) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsulePart_Type() + * @generated + */ + UMLRTCapsule getType(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getType <em>Type</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Type</em>' reference. + * @see #getType() + * @generated + */ + void setType(UMLRTCapsule value); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTConnector> getConnectorsOf(UMLRTPort port); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTConnector> getConnectorsOfPorts(); + + /** + * Returns the value of the '<em><b>Capsule</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getCapsuleParts <em>Capsule Part</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext() <em>Redefinition Context</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Capsule</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Capsule</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getCapsulePart_Capsule() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getCapsuleParts + * @generated + */ + @Override + UMLRTCapsule getCapsule(); + +} // UMLRTCapsulePart
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePartKind.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePartKind.java new file mode 100644 index 0000000..4d0ed4f --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePartKind.java
@@ -0,0 +1,330 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Capsule Part Kind</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getUMLRTCapsulePartKind() + * @generated + */ +public enum UMLRTCapsulePartKind implements Enumerator { + /** + * The '<em><b>Fixed</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #FIXED_VALUE + * @generated + * @ordered + */ + FIXED(0, "fixed", "fixed"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Optional</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #OPTIONAL_VALUE + * @generated + * @ordered + */ + OPTIONAL(1, "optional", "optional"), + /** + * The '<em><b>Plug in</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #PLUG_IN_VALUE + * @generated + * @ordered + */ + PLUG_IN(2, "plug_in", "plug-in"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Null</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #NULL_VALUE + * @generated + * @ordered + */ + NULL(3, "null", "null"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Fixed</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Fixed</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #FIXED + * @generated + * @ordered + */ + public static final int FIXED_VALUE = 0; + + /** + * The '<em><b>Optional</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Optional</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #OPTIONAL + * @generated + * @ordered + */ + public static final int OPTIONAL_VALUE = 1; + + /** + * The '<em><b>Plug in</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Plug in</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #PLUG_IN + * @generated + * @ordered + */ + public static final int PLUG_IN_VALUE = 2; + + /** + * The '<em><b>Null</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Null</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #NULL + * @generated + * @ordered + */ + public static final int NULL_VALUE = 3; + + /** + * An array of all the '<em><b>Capsule Part Kind</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private static final UMLRTCapsulePartKind[] VALUES_ARRAY = new UMLRTCapsulePartKind[] { + FIXED, + OPTIONAL, + PLUG_IN, + NULL, + }; + + /** + * A public read-only list of all the '<em><b>Capsule Part Kind</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static final List<UMLRTCapsulePartKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Capsule Part Kind</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param literal + * the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTCapsulePartKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UMLRTCapsulePartKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Capsule Part Kind</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTCapsulePartKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UMLRTCapsulePartKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Capsule Part Kind</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTCapsulePartKind get(int value) { + switch (value) { + case FIXED_VALUE: + return FIXED; + case OPTIONAL_VALUE: + return OPTIONAL; + case PLUG_IN_VALUE: + return PLUG_IN; + case NULL_VALUE: + return NULL; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private UMLRTCapsulePartKind(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Queries whether I am the {@link #NULL} object. + * + * @return whether I am the null value + */ + public boolean isNull() { + return this == NULL; + } + + /** + * Queries whether I am a kind of required capsule-part. + * + * @return whether capsule-parts of my kind are required + */ + public boolean isRequired() { + return (this == FIXED); + } + + /** + * Queries whether I am a kind of composite capsule-part. + * + * @return whether capsule-parts of my kind are composite + */ + public boolean isComposite() { + return (this == FIXED) || (this == OPTIONAL); + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // UMLRTCapsulePartKind
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTClassifier.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTClassifier.java new file mode 100644 index 0000000..710cb95 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTClassifier.java
@@ -0,0 +1,159 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; +import java.util.stream.Stream; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.uml2.uml.Classifier; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Classifier</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getGeneral <em>General</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getSpecifics <em>Specific</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getClassifier() + * @generated + */ +public interface UMLRTClassifier extends UMLRTNamedElement { + /** + * Returns the value of the '<em><b>General</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getSpecifics <em>Specific</em>}'. + * This feature is a derived union. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>General</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>General</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getClassifier_General() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getSpecifics + * @generated + */ + UMLRTClassifier getGeneral(); + + /** + * Returns the value of the '<em><b>Specific</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getGeneral <em>General</em>}'. + * This feature is a derived union. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Specific</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Specific</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getClassifier_Specific() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getGeneral + * @generated + */ + List<UMLRTClassifier> getSpecifics(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier} with the specified '<em><b>Name</b></em>' from the '<em><b>Specific</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getSpecifics() + * @generated + */ + UMLRTClassifier getSpecific(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier} with the specified '<em><b>Name</b></em>' from the '<em><b>Specific</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @param eClass + * The Ecore class of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getSpecifics() + * @generated + */ + UMLRTClassifier getSpecific(String name, boolean ignoreCase, EClass eClass); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + Classifier toUML(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTPackage getPackage(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<? extends UMLRTClassifier> getAncestry(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + Stream<? extends UMLRTClassifier> getHierarchy(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + boolean isSuperTypeOf(UMLRTClassifier classifier); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + void setGeneral(UMLRTClassifier general); + +} // UMLRTClassifier
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTConnector.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTConnector.java new file mode 100644 index 0000000..9d30a72 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTConnector.java
@@ -0,0 +1,281 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl; +import org.eclipse.uml2.uml.Connector; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Connector</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getRedefinedConnector <em>Redefined Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getCapsule <em>Capsule</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSource <em>Source</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourcePartWithPort <em>Source Part With Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourceReplicationFactor <em>Source Replication Factor</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTarget <em>Target</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetPartWithPort <em>Target Part With Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetReplicationFactor <em>Target Replication Factor</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector() + * @generated + */ +public interface UMLRTConnector extends UMLRTNamedElement { + + /** + * Returns the value of the '<em><b>Redefined Connector</b></em>' reference. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinedElement() <em>Redefined Element</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Redefined Connector</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Redefined Connector</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_RedefinedConnector() + * @generated + */ + UMLRTConnector getRedefinedConnector(); + + /** + * Returns the value of the '<em><b>Capsule</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getConnectors <em>Connector</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext() <em>Redefinition Context</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Capsule</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Capsule</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_Capsule() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getConnectors + * @generated + */ + UMLRTCapsule getCapsule(); + + /** + * Returns the value of the '<em><b>Source</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Source</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Source</em>' reference. + * @see #setSource(UMLRTPort) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_Source() + * @generated + */ + UMLRTPort getSource(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSource <em>Source</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Source</em>' reference. + * @see #getSource() + * @generated + */ + void setSource(UMLRTPort value); + + /** + * Returns the value of the '<em><b>Source Part With Port</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Source Part With Port</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Source Part With Port</em>' reference. + * @see #setSourcePartWithPort(UMLRTCapsulePart) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_SourcePartWithPort() + * @generated + */ + UMLRTCapsulePart getSourcePartWithPort(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourcePartWithPort <em>Source Part With Port</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Source Part With Port</em>' reference. + * @see #getSourcePartWithPort() + * @generated + */ + void setSourcePartWithPort(UMLRTCapsulePart value); + + /** + * Returns the value of the '<em><b>Source Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Source Replication Factor</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Source Replication Factor</em>' attribute. + * @see #setSourceReplicationFactor(int) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_SourceReplicationFactor() + * @generated + */ + int getSourceReplicationFactor(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourceReplicationFactor <em>Source Replication Factor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Source Replication Factor</em>' attribute. + * @see #getSourceReplicationFactor() + * @generated + */ + void setSourceReplicationFactor(int value); + + /** + * Returns the value of the '<em><b>Target</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Target</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Target</em>' reference. + * @see #setTarget(UMLRTPort) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_Target() + * @generated + */ + UMLRTPort getTarget(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTarget <em>Target</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Target</em>' reference. + * @see #getTarget() + * @generated + */ + void setTarget(UMLRTPort value); + + /** + * Returns the value of the '<em><b>Target Part With Port</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Target Part With Port</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Target Part With Port</em>' reference. + * @see #setTargetPartWithPort(UMLRTCapsulePart) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_TargetPartWithPort() + * @generated + */ + UMLRTCapsulePart getTargetPartWithPort(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetPartWithPort <em>Target Part With Port</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Target Part With Port</em>' reference. + * @see #getTargetPartWithPort() + * @generated + */ + void setTargetPartWithPort(UMLRTCapsulePart value); + + /** + * Returns the value of the '<em><b>Target Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Target Replication Factor</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Target Replication Factor</em>' attribute. + * @see #setTargetReplicationFactor(int) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getConnector_TargetReplicationFactor() + * @generated + */ + int getTargetReplicationFactor(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetReplicationFactor <em>Target Replication Factor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Target Replication Factor</em>' attribute. + * @see #getTargetReplicationFactor() + * @generated + */ + void setTargetReplicationFactor(int value); + + /** + * Obtains the canonical instance of the connector façade for a connector. + * + * @param connector + * a connector in the UML model + * + * @return its connector façade, or {@code null} if the connector is not a valid UML-RT connector + */ + public static UMLRTConnector getInstance(Connector connector) { + return UMLRTConnectorImpl.getInstance(connector); + } + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + Connector toUML(); + +} // UMLRTConnector
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTInheritanceKind.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTInheritanceKind.java new file mode 100644 index 0000000..eecc9c9 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTInheritanceKind.java
@@ -0,0 +1,426 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.function.ToIntFunction; + +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; +import org.eclipse.papyrusrt.umlrt.uml.util.UMLRTExtensionUtil; +import org.eclipse.uml2.uml.Element; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Inheritance Kind</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getUMLRTInheritanceKind() + * @generated + */ +public enum UMLRTInheritanceKind implements Enumerator { + /** + * The '<em><b>Inherited</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #INHERITED_VALUE + * @generated + * @ordered + */ + INHERITED(0, "inherited", "inherited"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Redefined</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #REDEFINED_VALUE + * @generated + * @ordered + */ + REDEFINED(1, "redefined", "redefined"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Excluded</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #EXCLUDED_VALUE + * @generated + * @ordered + */ + EXCLUDED(2, "excluded", "excluded"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>None</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #NONE_VALUE + * @generated + * @ordered + */ + NONE(3, "none", "none"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Inherited</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Inherited</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #INHERITED + * @generated + * @ordered + */ + public static final int INHERITED_VALUE = 0; + + /** + * The '<em><b>Redefined</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Redefined</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #REDEFINED + * @generated + * @ordered + */ + public static final int REDEFINED_VALUE = 1; + + /** + * The '<em><b>Excluded</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Excluded</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #EXCLUDED + * @generated + * @ordered + */ + public static final int EXCLUDED_VALUE = 2; + + /** + * The '<em><b>None</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>None</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #NONE + * @generated + * @ordered + */ + public static final int NONE_VALUE = 3; + + /** + * An array of all the '<em><b>Inheritance Kind</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private static final UMLRTInheritanceKind[] VALUES_ARRAY = new UMLRTInheritanceKind[] { + INHERITED, + REDEFINED, + EXCLUDED, + NONE, + }; + + /** + * A public read-only list of all the '<em><b>Inheritance Kind</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static final List<UMLRTInheritanceKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Inheritance Kind</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param literal + * the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTInheritanceKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UMLRTInheritanceKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Inheritance Kind</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTInheritanceKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UMLRTInheritanceKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Inheritance Kind</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTInheritanceKind get(int value) { + switch (value) { + case INHERITED_VALUE: + return INHERITED; + case REDEFINED_VALUE: + return REDEFINED; + case EXCLUDED_VALUE: + return EXCLUDED; + case NONE_VALUE: + return NONE; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private UMLRTInheritanceKind(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Queries the inheritance kind of an {@link element}. + * + * @param element + * an element in the UML-RT model + * + * @return its inheritance kind: never {@code null}, but maybe {@link #NONE} + */ + public static UMLRTInheritanceKind of(Element element) { + UMLRTInheritanceKind result = NONE; + + if (UMLRTExtensionUtil.isInherited(element)) { + if (UMLRTExtensionUtil.isVirtualElement(element)) { + result = INHERITED; + } else if (UMLRTExtensionUtil.isExcluded(element)) { + result = EXCLUDED; + } else { + result = REDEFINED; + } + } + + return result; + } + + /** + * Queries the inheritance kind of an {@link element}. + * + * @param element + * an element in the UML-RT model + * + * @return its inheritance kind: never {@code null}, but maybe {@link #NONE} + */ + public static UMLRTInheritanceKind of(UMLRTNamedElement element) { + return nullSafe(element.getInheritanceKind()); + } + + static UMLRTInheritanceKind nullSafe(UMLRTInheritanceKind kind) { + return (kind == null) ? NONE : kind; + } + + /** + * Obtains a comparator that sorts model elements by inheritance kind, + * in the order of the kind values, and then (for + * {@linkplain #INHERITED inherited} elements only) by depth of + * of inheritance from farthest (highest) to nearest (lowest) supertype. + * + * @return an inheritance-based comparator + */ + public static Comparator<Element> comparator() { + Comparator<Element> firstStage = Comparator.comparing(UMLRTInheritanceKind::of); + return firstStage.thenComparing(byInheritanceDepth()); + } + + /** + * Obtains a comparator that sorts model elements by inheritance kind, + * in the order of the kind values, and then (for + * {@linkplain #INHERITED inherited} elements only) by depth of + * of inheritance from farthest (highest) to nearest (lowest) supertype. + * + * @return an inheritance-based comparator + */ + public static Comparator<UMLRTNamedElement> facadeComparator() { + return Comparator.comparing(UMLRTNamedElement::toUML, comparator()); + } + + /** + * A comparator by depth of redefinition, for elements that are inherited. + * Elements inherited from farther up the hierarchy precede elements inherited + * from nearer supertypes. + * + * @return the comparator by inheritance depth + */ + private static Comparator<Element> byInheritanceDepth() { + return Comparator.comparingInt(inheritanceDepth()); + } + + private static ToIntFunction<Element> inheritanceDepth() { + return element -> { + // Redefined and excluded elements are local definitions; they have no depth + int result = 0; + + if (UMLRTExtensionUtil.isVirtualElement(element)) { + // It couldn't be virtual without implementing this interface + InternalUMLRTElement rt = (InternalUMLRTElement) element; + try { + result = -inheritanceDepth(rt, 0); + } catch (IllegalStateException e) { + // This will cause problems elsewhere, so no need to log it. Just + // return a zero depth + } + } + + return result; + }; + } + + private static int inheritanceDepth(InternalUMLRTElement element, int depthSoFar) { + int count = 0; + + for (InternalUMLRTElement rt = element.rtGetRedefinedElement(); rt != null; rt = rt.rtGetRedefinedElement()) { + depthSoFar = depthSoFar + 1; + + // Since the cycle is detected by checking if we hit 'element' again, after many iterations + // we'll call this method recursively in case we started with something that wasn't part of + // a cycle but later traversed up to a cycle. Note that this technique is susceptible to + // missing cycles of depth greater than a hundred thousand elements, but that seems an + // acceptable risk + if (++count > 100000) { + return inheritanceDepth(rt, depthSoFar); + } else if (rt == element) { + throw new IllegalStateException("Redefinition cycle including " + rt); //$NON-NLS-1$ + } + } + + return depthSoFar; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // UMLRTInheritanceKind
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTModel.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTModel.java new file mode 100644 index 0000000..cc92497 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTModel.java
@@ -0,0 +1,59 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTModelImpl; + +/** + * A façade for UML {@link Resource}s that store a root UML-RT model package, + * providing a view of the element more in keeping with the UML-RT semantics. + */ +public interface UMLRTModel { + + /** + * Obtains the canonical instance of the model façade for a resource. + * + * @param resource + * an UML resource containing an UML-RT model + * + * @return its model façade, or {@code null} if the resource is not a valid UML-RT resource + */ + public static UMLRTModel getInstance(Resource resource) { + return UMLRTModelImpl.getInstance(resource); + } + + /** + * Obtains the UML representation of the model. + * + * @return the UML representation + */ + Resource toUML(); + + /** + * Obtains the URI of the resource that I represent. + * + * @return my URI + */ + URI getURI(); + + /** + * Obtains the root package of the model (or sub-model, as the case may be). + * + * @return the root package + */ + UMLRTPackage getRoot(); + + +} // UMLRTModel
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTNamedElement.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTNamedElement.java new file mode 100644 index 0000000..e158202 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTNamedElement.java
@@ -0,0 +1,402 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.uml2.uml.NamedElement; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Named Element</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getModel <em>Model</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getInheritanceKind <em>Inheritance Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isInherited <em>Is Inherited</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isVirtualRedefinition <em>Is Virtual Redefinition</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isRedefinition <em>Is Redefinition</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isExcluded <em>Is Excluded</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinedElement <em>Redefined Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext <em>Redefinition Context</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements <em>Redefinable Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getInheritedElement <em>Inherited Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRootDefinition <em>Root Definition</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getExcludedElements <em>Excluded Element</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement() + * @extends FacadeObject + * @generated + */ +public interface UMLRTNamedElement extends FacadeObject { + /** + * Returns the value of the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Model</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Model</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_Model() + * @generated + */ + UMLRTModel getModel(); + + /** + * Returns the value of the '<em><b>Inheritance Kind</b></em>' attribute. + * The literals are from the enumeration {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Inheritance Kind</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Inheritance Kind</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_InheritanceKind() + * @generated + */ + UMLRTInheritanceKind getInheritanceKind(); + + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_Name() + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Inherited</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Inherited</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_IsInherited() + * @generated + */ + boolean isInherited(); + + /** + * Returns the value of the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Virtual Redefinition</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Virtual Redefinition</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_IsVirtualRedefinition() + * @generated + */ + boolean isVirtualRedefinition(); + + /** + * Returns the value of the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Redefinition</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Redefinition</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_IsRedefinition() + * @generated + */ + boolean isRedefinition(); + + /** + * Returns the value of the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Excluded</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Excluded</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_IsExcluded() + * @generated + */ + @Override + boolean isExcluded(); + + /** + * Returns the value of the '<em><b>Redefined Element</b></em>' reference. + * This feature is a derived union. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Redefined Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Redefined Element</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_RedefinedElement() + * @generated + */ + UMLRTNamedElement getRedefinedElement(); + + /** + * Returns the value of the '<em><b>Redefinition Context</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements <em>Redefinable Element</em>}'. + * This feature is a derived union. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Redefinition Context</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Redefinition Context</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_RedefinitionContext() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements + * @generated + */ + UMLRTNamedElement getRedefinitionContext(); + + /** + * Returns the value of the '<em><b>Redefinable Element</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext <em>Redefinition Context</em>}'. + * This feature is a derived union. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Redefinable Element</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Redefinable Element</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_RedefinableElement() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext + * @generated + */ + List<UMLRTNamedElement> getRedefinableElements(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getRedefinableElements() + * @generated + */ + UMLRTNamedElement getRedefinableElement(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @param eClass + * The Ecore class of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getRedefinableElements() + * @generated + */ + UMLRTNamedElement getRedefinableElement(String name, boolean ignoreCase, EClass eClass); + + /** + * Returns the value of the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Inherited Element</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Inherited Element</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_InheritedElement() + * @generated + */ + UMLRTNamedElement getInheritedElement(); + + /** + * Returns the value of the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Root Definition</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Root Definition</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_RootDefinition() + * @generated + */ + UMLRTNamedElement getRootDefinition(); + + /** + * Returns the value of the '<em><b>Excluded Element</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Excluded Element</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Excluded Element</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getNamedElement_ExcludedElement() + * @generated + */ + List<UMLRTNamedElement> getExcludedElements(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getExcludedElements() + * @generated + */ + UMLRTNamedElement getExcludedElement(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @param eClass + * The Ecore class of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getExcludedElements() + * @generated + */ + UMLRTNamedElement getExcludedElement(String name, boolean ignoreCase, EClass eClass); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + NamedElement toUML(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + boolean redefines(UMLRTNamedElement element); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + <T extends UMLRTNamedElement> T getRedefinitionOf(T element); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTNamedElement> getRedefinitionChain(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + <T extends UMLRTNamedElement> T getExcludedElement(String name, Class<T> type); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + boolean exclude(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + boolean reinherit(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + void reify(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + void destroy(); + +} // UMLRTNamedElement
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPackage.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPackage.java new file mode 100644 index 0000000..e45f71d --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPackage.java
@@ -0,0 +1,249 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; + +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl; +import org.eclipse.uml2.uml.Package; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Package</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestedPackages <em>Nested Package</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestingPackage <em>Nesting Package</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getCapsules <em>Capsule</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getProtocols <em>Protocol</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPackage() + * @generated + */ +public interface UMLRTPackage extends UMLRTNamedElement { + + /** + * Returns the value of the '<em><b>Nested Package</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestingPackage <em>Nesting Package</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Nested Package</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Nested Package</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPackage_NestedPackage() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestingPackage + * @generated + */ + List<UMLRTPackage> getNestedPackages(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage} with the specified '<em><b>Name</b></em>' from the '<em><b>Nested Package</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getNestedPackages() + * @generated + */ + UMLRTPackage getNestedPackage(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage} with the specified '<em><b>Name</b></em>' from the '<em><b>Nested Package</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getNestedPackages() + * @generated + */ + UMLRTPackage getNestedPackage(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Nesting Package</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestedPackages <em>Nested Package</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Nesting Package</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Nesting Package</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPackage_NestingPackage() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestedPackages + * @generated + */ + UMLRTPackage getNestingPackage(); + + /** + * Obtains the canonical instance of the package façade for a package. + * + * @param package_ + * a package in the UML model + * + * @return its package façade, or {@code null} if the package is not a valid UML-RT package + * (for example, if it is a protocol-container package or does not + * have or inherit an application of the UML-RT profile) + */ + public static UMLRTPackage getInstance(Package package_) { + return UMLRTPackageImpl.getInstance(package_); + } + + /** + * Returns the value of the '<em><b>Capsule</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPackage <em>Package</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Capsule</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Capsule</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPackage_Capsule() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPackage + * @generated + */ + List<UMLRTCapsule> getCapsules(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>' from the '<em><b>Capsule</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getCapsules() + * @generated + */ + UMLRTCapsule getCapsule(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>' from the '<em><b>Capsule</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getCapsules() + * @generated + */ + UMLRTCapsule getCapsule(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Protocol</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getPackage <em>Package</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Protocol</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Protocol</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPackage_Protocol() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getPackage + * @generated + */ + List<UMLRTProtocol> getProtocols(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>' from the '<em><b>Protocol</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getProtocols() + * @generated + */ + UMLRTProtocol getProtocol(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>' from the '<em><b>Protocol</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getProtocols() + * @generated + */ + UMLRTProtocol getProtocol(String name, boolean ignoreCase); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + org.eclipse.uml2.uml.Package toUML(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTPackage createNestedPackage(String name); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTCapsule createCapsule(String name); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTProtocol createProtocol(String name); + +} // UMLRTPackage
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPort.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPort.java new file mode 100644 index 0000000..7bbfe13 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPort.java
@@ -0,0 +1,647 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.PortRegistrationType; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl; +import org.eclipse.uml2.uml.Port; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Port</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getKind <em>Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRedefinedPort <em>Redefined Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getType <em>Type</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getPartsWithPort <em>Parts With Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isService <em>Service</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isBehavior <em>Behavior</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConjugated <em>Conjugated</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isWired <em>Wired</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isPublish <em>Publish</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isNotification <em>Notification</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistration <em>Registration</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistrationOverride <em>Registration Override</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnected <em>Is Connected</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnectedInside <em>Is Connected Inside</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnectedOutside <em>Is Connected Outside</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getConnectors <em>Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getInsideConnectors <em>Inside Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getOutsideConnectors <em>Outside Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getCapsule <em>Capsule</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort() + * @generated + */ +public interface UMLRTPort extends UMLRTReplicatedElement { + + /** + * Obtains the canonical instance of the port façade for a port. + * + * @param port + * a port in the UML model + * + * @return its port façade, or {@code null} if the port is not a valid UML-RT port + */ + public static UMLRTPort getInstance(Port port) { + return UMLRTPortImpl.getInstance(port); + } + + /** + * Returns the value of the '<em><b>Kind</b></em>' attribute. + * The literals are from the enumeration {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Kind</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Kind</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind + * @see #setKind(UMLRTPortKind) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Kind() + * @generated + */ + UMLRTPortKind getKind(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getKind <em>Kind</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Kind</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind + * @see #getKind() + * @generated + */ + void setKind(UMLRTPortKind value); + + /** + * Returns the value of the '<em><b>Redefined Port</b></em>' reference. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinedElement() <em>Redefined Element</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Redefined Port</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Redefined Port</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_RedefinedPort() + * @generated + */ + UMLRTPort getRedefinedPort(); + + /** + * Returns the value of the '<em><b>Type</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Type</em>' reference. + * @see #setType(UMLRTProtocol) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Type() + * @generated + */ + UMLRTProtocol getType(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getType <em>Type</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Type</em>' reference. + * @see #getType() + * @generated + */ + void setType(UMLRTProtocol value); + + /** + * Returns the value of the '<em><b>Parts With Port</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Parts With Port</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Parts With Port</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_PartsWithPort() + * @generated + */ + List<UMLRTCapsulePart> getPartsWithPort(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>' from the '<em><b>Parts With Port</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getPartsWithPort() + * @generated + */ + UMLRTCapsulePart getPartsWithPort(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>' from the '<em><b>Parts With Port</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getPartsWithPort() + * @generated + */ + UMLRTCapsulePart getPartsWithPort(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Service</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Service</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Service</em>' attribute. + * @see #setService(boolean) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Service() + * @generated + */ + boolean isService(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isService <em>Service</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Service</em>' attribute. + * @see #isService() + * @generated + */ + void setService(boolean value); + + /** + * Returns the value of the '<em><b>Behavior</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Behavior</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Behavior</em>' attribute. + * @see #setBehavior(boolean) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Behavior() + * @generated + */ + boolean isBehavior(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isBehavior <em>Behavior</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Behavior</em>' attribute. + * @see #isBehavior() + * @generated + */ + void setBehavior(boolean value); + + /** + * Returns the value of the '<em><b>Conjugated</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Conjugated</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Conjugated</em>' attribute. + * @see #setConjugated(boolean) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Conjugated() + * @generated + */ + boolean isConjugated(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConjugated <em>Conjugated</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Conjugated</em>' attribute. + * @see #isConjugated() + * @generated + */ + void setConjugated(boolean value); + + /** + * Returns the value of the '<em><b>Wired</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Wired</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Wired</em>' attribute. + * @see #setWired(boolean) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Wired() + * @generated + */ + boolean isWired(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isWired <em>Wired</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Wired</em>' attribute. + * @see #isWired() + * @generated + */ + void setWired(boolean value); + + /** + * Returns the value of the '<em><b>Publish</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Publish</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Publish</em>' attribute. + * @see #setPublish(boolean) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Publish() + * @generated + */ + boolean isPublish(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isPublish <em>Publish</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Publish</em>' attribute. + * @see #isPublish() + * @generated + */ + void setPublish(boolean value); + + /** + * Returns the value of the '<em><b>Notification</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Notification</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Notification</em>' attribute. + * @see #setNotification(boolean) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Notification() + * @generated + */ + boolean isNotification(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isNotification <em>Notification</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Notification</em>' attribute. + * @see #isNotification() + * @generated + */ + void setNotification(boolean value); + + /** + * Returns the value of the '<em><b>Registration</b></em>' attribute. + * The literals are from the enumeration {@link org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.PortRegistrationType}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Registration</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Registration</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.PortRegistrationType + * @see #setRegistration(PortRegistrationType) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Registration() + * @generated + */ + PortRegistrationType getRegistration(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistration <em>Registration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Registration</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.PortRegistrationType + * @see #getRegistration() + * @generated + */ + void setRegistration(PortRegistrationType value); + + /** + * Returns the value of the '<em><b>Registration Override</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Registration Override</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Registration Override</em>' attribute. + * @see #setRegistrationOverride(String) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_RegistrationOverride() + * @generated + */ + String getRegistrationOverride(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistrationOverride <em>Registration Override</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Registration Override</em>' attribute. + * @see #getRegistrationOverride() + * @generated + */ + void setRegistrationOverride(String value); + + /** + * Returns the value of the '<em><b>Is Connected</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Connected</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Connected</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_IsConnected() + * @generated + */ + boolean isConnected(); + + /** + * Returns the value of the '<em><b>Is Connected Inside</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Connected Inside</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Connected Inside</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_IsConnectedInside() + * @generated + */ + boolean isConnectedInside(); + + /** + * Returns the value of the '<em><b>Is Connected Outside</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Connected Outside</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Connected Outside</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_IsConnectedOutside() + * @generated + */ + boolean isConnectedOutside(); + + /** + * Returns the value of the '<em><b>Connector</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector}. + * This feature is a derived union. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Connector</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Connector</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Connector() + * @generated + */ + List<UMLRTConnector> getConnectors(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getConnectors() + * @generated + */ + UMLRTConnector getConnector(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getConnectors() + * @generated + */ + UMLRTConnector getConnector(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Inside Connector</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector}. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getConnectors() <em>Connector</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Inside Connector</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Inside Connector</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_InsideConnector() + * @generated + */ + List<UMLRTConnector> getInsideConnectors(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Inside Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getInsideConnectors() + * @generated + */ + UMLRTConnector getInsideConnector(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Inside Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getInsideConnectors() + * @generated + */ + UMLRTConnector getInsideConnector(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Outside Connector</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector}. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getConnectors() <em>Connector</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Outside Connector</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Outside Connector</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_OutsideConnector() + * @generated + */ + List<UMLRTConnector> getOutsideConnectors(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Outside Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getOutsideConnectors() + * @generated + */ + UMLRTConnector getOutsideConnector(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>' from the '<em><b>Outside Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getOutsideConnectors() + * @generated + */ + UMLRTConnector getOutsideConnector(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Capsule</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPorts <em>Port</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext() <em>Redefinition Context</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Capsule</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Capsule</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getPort_Capsule() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPorts + * @generated + */ + @Override + UMLRTCapsule getCapsule(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + Port toUML(); + +} // UMLRTPort
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPortKind.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPortKind.java new file mode 100644 index 0000000..eb4f6a0 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTPortKind.java
@@ -0,0 +1,440 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Port Kind</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getUMLRTPortKind() + * @generated + */ +public enum UMLRTPortKind implements Enumerator { + /** + * The '<em><b>External Behavior</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #EXTERNAL_BEHAVIOR_VALUE + * @generated + * @ordered + */ + EXTERNAL_BEHAVIOR(0, "externalBehavior", "externalBehavior"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Internal Behavior</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #INTERNAL_BEHAVIOR_VALUE + * @generated + * @ordered + */ + INTERNAL_BEHAVIOR(1, "internalBehavior", "internalBehavior"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Relay</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #RELAY_VALUE + * @generated + * @ordered + */ + RELAY(2, "relay", "relay"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>SAP</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #SAP_VALUE + * @generated + * @ordered + */ + SAP(3, "SAP", "SAP"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>SPP</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #SPP_VALUE + * @generated + * @ordered + */ + SPP(4, "SPP", "SPP"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>Null</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #NULL_VALUE + * @generated + * @ordered + */ + NULL(5, "null", "null"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The '<em><b>External Behavior</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>External Behavior</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #EXTERNAL_BEHAVIOR + * @generated + * @ordered + */ + public static final int EXTERNAL_BEHAVIOR_VALUE = 0; + + /** + * The '<em><b>Internal Behavior</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Internal Behavior</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #INTERNAL_BEHAVIOR + * @generated + * @ordered + */ + public static final int INTERNAL_BEHAVIOR_VALUE = 1; + + /** + * The '<em><b>Relay</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Relay</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #RELAY + * @generated + * @ordered + */ + public static final int RELAY_VALUE = 2; + + /** + * The '<em><b>SAP</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SAP</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #SAP + * @generated + * @ordered + */ + public static final int SAP_VALUE = 3; + + /** + * The '<em><b>SPP</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SPP</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #SPP + * @generated + * @ordered + */ + public static final int SPP_VALUE = 4; + + /** + * The '<em><b>Null</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Null</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #NULL + * @generated + * @ordered + */ + public static final int NULL_VALUE = 5; + + /** + * An array of all the '<em><b>Port Kind</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private static final UMLRTPortKind[] VALUES_ARRAY = new UMLRTPortKind[] { + EXTERNAL_BEHAVIOR, + INTERNAL_BEHAVIOR, + RELAY, + SAP, + SPP, + NULL, + }; + + /** + * A public read-only list of all the '<em><b>Port Kind</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static final List<UMLRTPortKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Port Kind</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param literal + * the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTPortKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UMLRTPortKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Port Kind</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTPortKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + UMLRTPortKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Port Kind</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static UMLRTPortKind get(int value) { + switch (value) { + case EXTERNAL_BEHAVIOR_VALUE: + return EXTERNAL_BEHAVIOR; + case INTERNAL_BEHAVIOR_VALUE: + return INTERNAL_BEHAVIOR; + case RELAY_VALUE: + return RELAY; + case SAP_VALUE: + return SAP; + case SPP_VALUE: + return SPP; + case NULL_VALUE: + return NULL; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private UMLRTPortKind(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Queries whether I am the {@link #NULL} object. + * + * @return whether I am the null value + */ + public boolean isNull() { + return this == NULL; + } + + /** + * Queries whether I am a kind of an external-facing port. + * The {@link #NULL} kind is neither external nor internal. + * + * @return whether ports of my kind are external facing + */ + public boolean isExternal() { + return (this == EXTERNAL_BEHAVIOR) || (this == RELAY) || (this == SPP); + } + + /** + * Queries whether I am a kind of an internal-facing port. + * The {@link #NULL} kind is neither internal nor external. + * + * @return whether ports of my kind are internal facing + */ + public boolean isInternal() { + return (this == INTERNAL_BEHAVIOR) || (this == SAP); + } + + /** + * Queries whether I am a kind of a service port. + * + * @return whether ports of my kind are service ports + */ + public boolean isService() { + return (this == EXTERNAL_BEHAVIOR) || (this == RELAY) || (this == SPP); + } + + /** + * Queries whether I am a kind of a wired port. + * The {@link #NULL} kind is neither wired nor non-wired. + * + * @return whether ports of my kind are wired + */ + public boolean isWired() { + return (this == EXTERNAL_BEHAVIOR) || (this == INTERNAL_BEHAVIOR) + || (this == RELAY); + } + + /** + * Queries whether I am a kind of a non-wired port. + * The {@link #NULL} kind is neither non-wired nor wired. + * + * @return whether ports of my kind are unwired + */ + public boolean isUnwired() { + return (this == SPP) || (this == SAP); + } + + /** + * Queries whether I am a kind of a behaviour port. + * + * @return whether ports of my kind are behaviour ports + */ + public boolean isBehavior() { + return (this == EXTERNAL_BEHAVIOR) || (this == INTERNAL_BEHAVIOR) + || (this == SPP) || (this == SAP); + } + + /** + * Queries whether I am a kind of a published port. + * + * @return whether ports of my kind are published + */ + public boolean isPublish() { + return (this == SPP); + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // UMLRTPortKind
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocol.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocol.java new file mode 100644 index 0000000..331961f --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocol.java
@@ -0,0 +1,559 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; +import java.util.stream.Stream; + +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl; +import org.eclipse.uml2.uml.AnyReceiveEvent; +import org.eclipse.uml2.uml.Collaboration; +import org.eclipse.uml2.uml.Type; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Protocol</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getPackage <em>Package</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSuperProtocol <em>Super Protocol</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSubProtocols <em>Sub Protocol</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages <em>Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getInMessages <em>In Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getOutMessages <em>Out Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getInOutMessages <em>In Out Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#isConjugate <em>Is Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getConjugate <em>Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getHierarchy <em>Hierarchy</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol() + * @generated + */ +public interface UMLRTProtocol extends UMLRTClassifier { + + /** + * Returns the value of the '<em><b>Super Protocol</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSubProtocols <em>Sub Protocol</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getGeneral() <em>General</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Super Protocol</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Super Protocol</em>' reference. + * @see #setSuperProtocol(UMLRTProtocol) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_SuperProtocol() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSubProtocols + * @generated + */ + UMLRTProtocol getSuperProtocol(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSuperProtocol <em>Super Protocol</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Super Protocol</em>' reference. + * @see #getSuperProtocol() + * @generated + */ + void setSuperProtocol(UMLRTProtocol value); + + /** + * Returns the value of the '<em><b>Sub Protocol</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSuperProtocol <em>Super Protocol</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getSpecifics() <em>Specific</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Sub Protocol</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Sub Protocol</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_SubProtocol() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSuperProtocol + * @generated + */ + List<UMLRTProtocol> getSubProtocols(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>' from the '<em><b>Sub Protocol</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getSubProtocols() + * @generated + */ + UMLRTProtocol getSubProtocol(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>' from the '<em><b>Sub Protocol</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getSubProtocols() + * @generated + */ + UMLRTProtocol getSubProtocol(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Message</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage}. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getProtocol <em>Protocol</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements() <em>Redefinable Element</em>}'</li> + * </ul> + * This feature is a derived union. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Message</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Message</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_Message() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getProtocol + * @generated + */ + List<UMLRTProtocolMessage> getMessages(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getMessages() + * @generated + */ + UMLRTProtocolMessage getMessage(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getMessages() + * @generated + */ + UMLRTProtocolMessage getMessage(String name, boolean ignoreCase); + + /** + * Retrieves the first message with the specified {@code kind} and {@code name}. + * + * @param kind + * the kind of message to retrieve, or {@code null} to get any kind + * @param name + * the name of the message to retrieve, or {@code null} to get + * any message of the given {@code kind} + * + * @return the first message with the matching {@code kind} and {@code name} + * + * @see #getMessages() + * @see #getMessage(String, RTMessageKind) + */ + default UMLRTProtocolMessage getMessage(RTMessageKind kind, String name) { + switch (kind) { + case IN: + return getInMessage(name); + case OUT: + return getOutMessage(name); + case IN_OUT: + return getInOutMessage(name); + default: + throw new IllegalArgumentException(kind.getName()); + } + } + + /** + * Returns the value of the '<em><b>In Message</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage}. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages() <em>Message</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>In Message</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>In Message</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_InMessage() + * @generated + */ + List<UMLRTProtocolMessage> getInMessages(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>In Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getInMessages() + * @generated + */ + UMLRTProtocolMessage getInMessage(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>In Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getInMessages() + * @generated + */ + UMLRTProtocolMessage getInMessage(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Out Message</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage}. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages() <em>Message</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Out Message</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Out Message</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_OutMessage() + * @generated + */ + List<UMLRTProtocolMessage> getOutMessages(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>Out Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getOutMessages() + * @generated + */ + UMLRTProtocolMessage getOutMessage(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>Out Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getOutMessages() + * @generated + */ + UMLRTProtocolMessage getOutMessage(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>In Out Message</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage}. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages() <em>Message</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>In Out Message</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>In Out Message</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_InOutMessage() + * @generated + */ + List<UMLRTProtocolMessage> getInOutMessages(); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>In Out Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getInOutMessages() + * @generated + */ + UMLRTProtocolMessage getInOutMessage(String name); + + /** + * Retrieves the first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>' from the '<em><b>In Out Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage} with the specified '<em><b>Name</b></em>', or <code>null</code>. + * @see #getInOutMessages() + * @generated + */ + UMLRTProtocolMessage getInOutMessage(String name, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Is Conjugate</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Conjugate</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Conjugate</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_IsConjugate() + * @generated + */ + boolean isConjugate(); + + /** + * Returns the value of the '<em><b>Conjugate</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Conjugate</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Conjugate</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_Conjugate() + * @generated + */ + UMLRTProtocol getConjugate(); + + /** + * Returns the value of the '<em><b>Hierarchy</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Hierarchy</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Hierarchy</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_Hierarchy() + * @generated + */ + @Override + Stream<UMLRTProtocol> getHierarchy(); + + /** + * Obtains the protocol façade for the base protocol type represented by the given + * UML collaboration. + * + * @param protocol + * a UML collaboration representing a protocol + * @return the base UML-RT protocol façade, or {@code null} if the collaboration + * is not actually a protocol + */ + public static UMLRTProtocol getInstance(Collaboration protocol) { + return UMLRTProtocolImpl.getInstance(protocol); + } + + /** + * Obtains the protocol façade of the given conjugation for a UML collaboration. + * + * @param protocol + * a UML collaboration representing a protocol + * @param conjugate + * {@code true} to obtain the conjugate protocol type; {@code false} + * for the base protocol type + * + * @return the protocol type, or {@code null} if the UML collaboration is not a protocol + */ + public static UMLRTProtocol getInstance(Collaboration protocol, boolean conjugate) { + UMLRTProtocol result = UMLRTProtocolImpl.getInstance(protocol); + return (conjugate && (result != null)) ? result.getConjugate() : result; + } + + /** + * Returns the value of the '<em><b>Package</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getProtocols <em>Protocol</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Package</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Package</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocol_Package() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getProtocols + * @generated + */ + @Override + UMLRTPackage getPackage(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + Collaboration toUML(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + AnyReceiveEvent getAnyReceiveEvent(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getAncestry() <em>Get Ancestry</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + List<UMLRTProtocol> getAncestry(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTProtocolMessage> getMessages(RTMessageKind kind); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTProtocolMessage> getMessages(RTMessageKind kind, boolean withExclusions); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + List<UMLRTProtocolMessage> getMessages(boolean withExclusions); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTProtocolMessage createMessage(RTMessageKind kind, String name); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTProtocolMessage createMessage(RTMessageKind kind, String name, Type dataType); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTProtocolMessage createMessage(RTMessageKind kind, String name, List<String> parameterName, List<Type> parameterType); + +} // UMLRTProtocol
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocolMessage.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocolMessage.java new file mode 100644 index 0000000..397894e --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocolMessage.java
@@ -0,0 +1,279 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import java.util.List; + +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl; +import org.eclipse.uml2.uml.CallEvent; +import org.eclipse.uml2.uml.Operation; +import org.eclipse.uml2.uml.Parameter; +import org.eclipse.uml2.uml.Type; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Protocol Message</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getKind <em>Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getRedefinedMessage <em>Redefined Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getParameters <em>Parameter</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#isConjugate <em>Is Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getConjugate <em>Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getProtocol <em>Protocol</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocolMessage() + * @generated + */ +public interface UMLRTProtocolMessage extends UMLRTNamedElement { + + /** + * Obtains the protocol message façade for the message represented by the given + * UML operation. + * + * @param operation + * a UML operation representing a protocol message + * @return the base UML-RT protocol-message façade, or {@code null} if the operation + * is not actually a protocol message + */ + public static UMLRTProtocolMessage getInstance(Operation operation) { + return UMLRTProtocolMessageImpl.getInstance(operation); + } + + /** + * Returns the value of the '<em><b>Kind</b></em>' attribute. + * The literals are from the enumeration {@link org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Kind</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Kind</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind + * @see #setKind(RTMessageKind) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocolMessage_Kind() + * @generated + */ + RTMessageKind getKind(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getKind <em>Kind</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Kind</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind + * @see #getKind() + * @generated + */ + void setKind(RTMessageKind value); + + /** + * Returns the value of the '<em><b>Redefined Message</b></em>' reference. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinedElement() <em>Redefined Element</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Redefined Message</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Redefined Message</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocolMessage_RedefinedMessage() + * @generated + */ + UMLRTProtocolMessage getRedefinedMessage(); + + /** + * Returns the value of the '<em><b>Parameter</b></em>' reference list. + * The list contents are of type {@link org.eclipse.uml2.uml.Parameter}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Parameter</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Parameter</em>' reference list. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocolMessage_Parameter() + * @generated + */ + List<Parameter> getParameters(); + + /** + * Retrieves the first parameter with the specified {@code name}. + * + * @param name + * the name of a parameter to retrieve + * @return the first parameter with the given {@code name} + * + * @see #getParameters() + * @see #getParameter(String, Type, boolean) + * + */ + default Parameter getParameter(String name) { + return getParameter(name, null); + } + + /** + * Retrieves the first parameter with the specified {@code type}. + * + * @param type + * the type of a parameter to retrieve + * @return the first parameter with the given {@code type} + * + * @see #getParameters() + * @see #getParameter(String, Type, boolean) + * + */ + default Parameter getParameter(Type type) { + return getParameter(null, type); + } + + /** + * Retrieves the first {@link org.eclipse.uml2.uml.Parameter} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Parameter</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Parameter} to retrieve, or <code>null</code>. + * @param type + * The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.Parameter} to retrieve, or <code>null</code>. + * @return The first {@link org.eclipse.uml2.uml.Parameter} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>. + * @see #getParameters() + * @generated + */ + Parameter getParameter(String name, Type type); + + /** + * Retrieves the first {@link org.eclipse.uml2.uml.Parameter} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Parameter</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param name + * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Parameter} to retrieve, or <code>null</code>. + * @param type + * The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.Parameter} to retrieve, or <code>null</code>. + * @param ignoreCase + * Whether to ignore case in {@link java.lang.String} comparisons. + * @return The first {@link org.eclipse.uml2.uml.Parameter} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>. + * @see #getParameters() + * @generated + */ + Parameter getParameter(String name, Type type, boolean ignoreCase); + + /** + * Returns the value of the '<em><b>Is Conjugate</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Is Conjugate</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Is Conjugate</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocolMessage_IsConjugate() + * @generated + */ + boolean isConjugate(); + + /** + * Returns the value of the '<em><b>Conjugate</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Conjugate</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Conjugate</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocolMessage_Conjugate() + * @generated + */ + UMLRTProtocolMessage getConjugate(); + + /** + * Returns the value of the '<em><b>Protocol</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages <em>Message</em>}'. + * <p> + * This feature subsets the following features: + * </p> + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext() <em>Redefinition Context</em>}'</li> + * </ul> + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Protocol</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Protocol</em>' reference. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getProtocolMessage_Protocol() + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages + * @generated + */ + UMLRTProtocol getProtocol(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + Operation toUML(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + CallEvent toReceiveEvent(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + Parameter createParameter(String name, Type type); + +} // UMLRTProtocolMessage
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTReplicatedElement.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTReplicatedElement.java new file mode 100644 index 0000000..1cf84a4 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/UMLRTReplicatedElement.java
@@ -0,0 +1,100 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml; + +import org.eclipse.uml2.uml.Property; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Replicated Element</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#getReplicationFactor <em>Replication Factor</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#isSymbolicReplicationFactor <em>Symbolic Replication Factor</em>}</li> + * </ul> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getReplicatedElement() + * @generated + */ +public interface UMLRTReplicatedElement extends UMLRTNamedElement { + /** + * Returns the value of the '<em><b>Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Replication Factor</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Replication Factor</em>' attribute. + * @see #setReplicationFactor(int) + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getReplicatedElement_ReplicationFactor() + * @generated + */ + int getReplicationFactor(); + + /** + * Sets the value of the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#getReplicationFactor <em>Replication Factor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Replication Factor</em>' attribute. + * @see #getReplicationFactor() + * @generated + */ + void setReplicationFactor(int value); + + /** + * Returns the value of the '<em><b>Symbolic Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Symbolic Replication Factor</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Symbolic Replication Factor</em>' attribute. + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#getReplicatedElement_SymbolicReplicationFactor() + * @generated + */ + boolean isSymbolicReplicationFactor(); + + /** + * <p> + * This operation redefines the following operations: + * <ul> + * <li>'{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#toUML() <em>To UML</em>}'</li> + * </ul> + * </p> + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + Property toUML(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTCapsule getCapsule(); + +} // UMLRTReplicatedElement
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/UMLRTUMLRTFactory.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/UMLRTUMLRTFactory.java new file mode 100644 index 0000000..88e523d --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/UMLRTUMLRTFactory.java
@@ -0,0 +1,124 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade; + +import org.eclipse.emf.ecore.EFactory; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; + + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage + * @generated + */ +public interface UMLRTUMLRTFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTUMLRTFactory eINSTANCE = org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Package</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Package</em>'. + * @generated + */ + UMLRTPackage createPackage(); + + /** + * Returns a new object of class '<em>Capsule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Capsule</em>'. + * @generated + */ + UMLRTCapsule createCapsule(); + + /** + * Returns a new object of class '<em>Protocol</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Protocol</em>'. + * @generated + */ + UMLRTProtocol createProtocol(); + + /** + * Returns a new object of class '<em>Port</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Port</em>'. + * @generated + */ + UMLRTPort createPort(); + + /** + * Returns a new object of class '<em>Capsule Part</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Capsule Part</em>'. + * @generated + */ + UMLRTCapsulePart createCapsulePart(); + + /** + * Returns a new object of class '<em>Connector</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Connector</em>'. + * @generated + */ + UMLRTConnector createConnector(); + + /** + * Returns a new object of class '<em>Protocol Message</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Protocol Message</em>'. + * @generated + */ + UMLRTProtocolMessage createProtocolMessage(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the package supported by this factory. + * @generated + */ + UMLRTUMLRTPackage getUMLRTPackage(); + +} // UMLRTUMLRTFactory
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/UMLRTUMLRTPackage.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/UMLRTUMLRTPackage.java new file mode 100644 index 0000000..1b7def1 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/UMLRTUMLRTPackage.java
@@ -0,0 +1,4336 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTFactory + * @generated + */ +public interface UMLRTUMLRTPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "umlrt"; //$NON-NLS-1$ + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrusrt/2017/UML-RT"; //$NON-NLS-1$ + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "umlrt"; //$NON-NLS-1$ + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + UMLRTUMLRTPackage eINSTANCE = org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl <em>Named Element</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getNamedElement() + * @generated + */ + int NAMED_ELEMENT = 0; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__MODEL = 0; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__INHERITANCE_KIND = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__NAME = 2; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__IS_INHERITED = 3; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION = 4; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__IS_REDEFINITION = 5; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__IS_EXCLUDED = 6; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__REDEFINED_ELEMENT = 7; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__REDEFINITION_CONTEXT = 8; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__REDEFINABLE_ELEMENT = 9; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__INHERITED_ELEMENT = 10; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__ROOT_DEFINITION = 11; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__EXCLUDED_ELEMENT = 12; + + /** + * The number of structural features of the '<em>Named Element</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int NAMED_ELEMENT_FEATURE_COUNT = 13; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl <em>Package</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getPackage() + * @generated + */ + int PACKAGE = 1; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__MODEL = NAMED_ELEMENT__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__INHERITANCE_KIND = NAMED_ELEMENT__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__IS_INHERITED = NAMED_ELEMENT__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__IS_VIRTUAL_REDEFINITION = NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__IS_REDEFINITION = NAMED_ELEMENT__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__IS_EXCLUDED = NAMED_ELEMENT__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__REDEFINED_ELEMENT = NAMED_ELEMENT__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__REDEFINITION_CONTEXT = NAMED_ELEMENT__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__REDEFINABLE_ELEMENT = NAMED_ELEMENT__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__INHERITED_ELEMENT = NAMED_ELEMENT__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__ROOT_DEFINITION = NAMED_ELEMENT__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__EXCLUDED_ELEMENT = NAMED_ELEMENT__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>Nested Package</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__NESTED_PACKAGE = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Nesting Package</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__NESTING_PACKAGE = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Capsule</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__CAPSULE = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Protocol</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE__PROTOCOL = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The number of structural features of the '<em>Package</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PACKAGE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 4; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTClassifierImpl <em>Classifier</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTClassifierImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getClassifier() + * @generated + */ + int CLASSIFIER = 3; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__MODEL = NAMED_ELEMENT__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__INHERITANCE_KIND = NAMED_ELEMENT__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__IS_INHERITED = NAMED_ELEMENT__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__IS_VIRTUAL_REDEFINITION = NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__IS_REDEFINITION = NAMED_ELEMENT__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__IS_EXCLUDED = NAMED_ELEMENT__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__REDEFINED_ELEMENT = NAMED_ELEMENT__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__REDEFINITION_CONTEXT = NAMED_ELEMENT__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__REDEFINABLE_ELEMENT = NAMED_ELEMENT__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__INHERITED_ELEMENT = NAMED_ELEMENT__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__ROOT_DEFINITION = NAMED_ELEMENT__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__EXCLUDED_ELEMENT = NAMED_ELEMENT__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>General</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__GENERAL = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Specific</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER__SPECIFIC = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Classifier</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CLASSIFIER_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl <em>Capsule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getCapsule() + * @generated + */ + int CAPSULE = 2; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__MODEL = CLASSIFIER__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__INHERITANCE_KIND = CLASSIFIER__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__NAME = CLASSIFIER__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__IS_INHERITED = CLASSIFIER__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__IS_VIRTUAL_REDEFINITION = CLASSIFIER__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__IS_REDEFINITION = CLASSIFIER__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__IS_EXCLUDED = CLASSIFIER__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__REDEFINED_ELEMENT = CLASSIFIER__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__REDEFINITION_CONTEXT = CLASSIFIER__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__REDEFINABLE_ELEMENT = CLASSIFIER__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__INHERITED_ELEMENT = CLASSIFIER__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__ROOT_DEFINITION = CLASSIFIER__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__EXCLUDED_ELEMENT = CLASSIFIER__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>General</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__GENERAL = CLASSIFIER__GENERAL; + + /** + * The feature id for the '<em><b>Specific</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__SPECIFIC = CLASSIFIER__SPECIFIC; + + /** + * The feature id for the '<em><b>Superclass</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__SUPERCLASS = CLASSIFIER_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Subclass</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__SUBCLASS = CLASSIFIER_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Port</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__PORT = CLASSIFIER_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Capsule Part</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__CAPSULE_PART = CLASSIFIER_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__CONNECTOR = CLASSIFIER_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Hierarchy</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__HIERARCHY = CLASSIFIER_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Package</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE__PACKAGE = CLASSIFIER_FEATURE_COUNT + 6; + + /** + * The number of structural features of the '<em>Capsule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_FEATURE_COUNT = CLASSIFIER_FEATURE_COUNT + 7; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl <em>Protocol</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getProtocol() + * @generated + */ + int PROTOCOL = 6; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTReplicatedElementImpl <em>Replicated Element</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTReplicatedElementImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getReplicatedElement() + * @generated + */ + int REPLICATED_ELEMENT = 5; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__MODEL = NAMED_ELEMENT__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__INHERITANCE_KIND = NAMED_ELEMENT__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__IS_INHERITED = NAMED_ELEMENT__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__IS_VIRTUAL_REDEFINITION = NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__IS_REDEFINITION = NAMED_ELEMENT__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__IS_EXCLUDED = NAMED_ELEMENT__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__REDEFINED_ELEMENT = NAMED_ELEMENT__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__REDEFINITION_CONTEXT = NAMED_ELEMENT__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__REDEFINABLE_ELEMENT = NAMED_ELEMENT__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__INHERITED_ELEMENT = NAMED_ELEMENT__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__ROOT_DEFINITION = NAMED_ELEMENT__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__EXCLUDED_ELEMENT = NAMED_ELEMENT__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__REPLICATION_FACTOR = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Symbolic Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT__SYMBOLIC_REPLICATION_FACTOR = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Replicated Element</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REPLICATED_ELEMENT_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl <em>Port</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getPort() + * @generated + */ + int PORT = 4; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__MODEL = REPLICATED_ELEMENT__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__INHERITANCE_KIND = REPLICATED_ELEMENT__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__NAME = REPLICATED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__IS_INHERITED = REPLICATED_ELEMENT__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__IS_VIRTUAL_REDEFINITION = REPLICATED_ELEMENT__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__IS_REDEFINITION = REPLICATED_ELEMENT__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__IS_EXCLUDED = REPLICATED_ELEMENT__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__REDEFINED_ELEMENT = REPLICATED_ELEMENT__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__REDEFINITION_CONTEXT = REPLICATED_ELEMENT__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__REDEFINABLE_ELEMENT = REPLICATED_ELEMENT__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__INHERITED_ELEMENT = REPLICATED_ELEMENT__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__ROOT_DEFINITION = REPLICATED_ELEMENT__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__EXCLUDED_ELEMENT = REPLICATED_ELEMENT__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__REPLICATION_FACTOR = REPLICATED_ELEMENT__REPLICATION_FACTOR; + + /** + * The feature id for the '<em><b>Symbolic Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__SYMBOLIC_REPLICATION_FACTOR = REPLICATED_ELEMENT__SYMBOLIC_REPLICATION_FACTOR; + + /** + * The feature id for the '<em><b>Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__KIND = REPLICATED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Redefined Port</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__REDEFINED_PORT = REPLICATED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__TYPE = REPLICATED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Parts With Port</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__PARTS_WITH_PORT = REPLICATED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Service</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__SERVICE = REPLICATED_ELEMENT_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Behavior</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__BEHAVIOR = REPLICATED_ELEMENT_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Conjugated</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__CONJUGATED = REPLICATED_ELEMENT_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Wired</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__WIRED = REPLICATED_ELEMENT_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Publish</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__PUBLISH = REPLICATED_ELEMENT_FEATURE_COUNT + 8; + + /** + * The feature id for the '<em><b>Notification</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__NOTIFICATION = REPLICATED_ELEMENT_FEATURE_COUNT + 9; + + /** + * The feature id for the '<em><b>Registration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__REGISTRATION = REPLICATED_ELEMENT_FEATURE_COUNT + 10; + + /** + * The feature id for the '<em><b>Registration Override</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__REGISTRATION_OVERRIDE = REPLICATED_ELEMENT_FEATURE_COUNT + 11; + + /** + * The feature id for the '<em><b>Is Connected</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__IS_CONNECTED = REPLICATED_ELEMENT_FEATURE_COUNT + 12; + + /** + * The feature id for the '<em><b>Is Connected Inside</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__IS_CONNECTED_INSIDE = REPLICATED_ELEMENT_FEATURE_COUNT + 13; + + /** + * The feature id for the '<em><b>Is Connected Outside</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__IS_CONNECTED_OUTSIDE = REPLICATED_ELEMENT_FEATURE_COUNT + 14; + + /** + * The feature id for the '<em><b>Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__CONNECTOR = REPLICATED_ELEMENT_FEATURE_COUNT + 15; + + /** + * The feature id for the '<em><b>Inside Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__INSIDE_CONNECTOR = REPLICATED_ELEMENT_FEATURE_COUNT + 16; + + /** + * The feature id for the '<em><b>Outside Connector</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__OUTSIDE_CONNECTOR = REPLICATED_ELEMENT_FEATURE_COUNT + 17; + + /** + * The feature id for the '<em><b>Capsule</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT__CAPSULE = REPLICATED_ELEMENT_FEATURE_COUNT + 18; + + /** + * The number of structural features of the '<em>Port</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PORT_FEATURE_COUNT = REPLICATED_ELEMENT_FEATURE_COUNT + 19; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__MODEL = CLASSIFIER__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__INHERITANCE_KIND = CLASSIFIER__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__NAME = CLASSIFIER__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__IS_INHERITED = CLASSIFIER__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__IS_VIRTUAL_REDEFINITION = CLASSIFIER__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__IS_REDEFINITION = CLASSIFIER__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__IS_EXCLUDED = CLASSIFIER__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__REDEFINED_ELEMENT = CLASSIFIER__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__REDEFINITION_CONTEXT = CLASSIFIER__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__REDEFINABLE_ELEMENT = CLASSIFIER__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__INHERITED_ELEMENT = CLASSIFIER__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__ROOT_DEFINITION = CLASSIFIER__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__EXCLUDED_ELEMENT = CLASSIFIER__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>General</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__GENERAL = CLASSIFIER__GENERAL; + + /** + * The feature id for the '<em><b>Specific</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__SPECIFIC = CLASSIFIER__SPECIFIC; + + /** + * The feature id for the '<em><b>Package</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__PACKAGE = CLASSIFIER_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Super Protocol</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__SUPER_PROTOCOL = CLASSIFIER_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Sub Protocol</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__SUB_PROTOCOL = CLASSIFIER_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__MESSAGE = CLASSIFIER_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>In Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__IN_MESSAGE = CLASSIFIER_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Out Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__OUT_MESSAGE = CLASSIFIER_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>In Out Message</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__IN_OUT_MESSAGE = CLASSIFIER_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Is Conjugate</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__IS_CONJUGATE = CLASSIFIER_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Conjugate</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__CONJUGATE = CLASSIFIER_FEATURE_COUNT + 8; + + /** + * The feature id for the '<em><b>Hierarchy</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL__HIERARCHY = CLASSIFIER_FEATURE_COUNT + 9; + + /** + * The number of structural features of the '<em>Protocol</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_FEATURE_COUNT = CLASSIFIER_FEATURE_COUNT + 10; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl <em>Capsule Part</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getCapsulePart() + * @generated + */ + int CAPSULE_PART = 8; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl <em>Connector</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getConnector() + * @generated + */ + int CONNECTOR = 9; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl <em>Protocol Message</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getProtocolMessage() + * @generated + */ + int PROTOCOL_MESSAGE = 7; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__MODEL = NAMED_ELEMENT__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__INHERITANCE_KIND = NAMED_ELEMENT__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__IS_INHERITED = NAMED_ELEMENT__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__IS_VIRTUAL_REDEFINITION = NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__IS_REDEFINITION = NAMED_ELEMENT__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__IS_EXCLUDED = NAMED_ELEMENT__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__REDEFINED_ELEMENT = NAMED_ELEMENT__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__REDEFINITION_CONTEXT = NAMED_ELEMENT__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__REDEFINABLE_ELEMENT = NAMED_ELEMENT__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__INHERITED_ELEMENT = NAMED_ELEMENT__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__ROOT_DEFINITION = NAMED_ELEMENT__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__EXCLUDED_ELEMENT = NAMED_ELEMENT__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__KIND = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Redefined Message</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__REDEFINED_MESSAGE = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Parameter</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__PARAMETER = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Is Conjugate</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__IS_CONJUGATE = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Conjugate</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__CONJUGATE = NAMED_ELEMENT_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Protocol</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE__PROTOCOL = NAMED_ELEMENT_FEATURE_COUNT + 5; + + /** + * The number of structural features of the '<em>Protocol Message</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PROTOCOL_MESSAGE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__MODEL = REPLICATED_ELEMENT__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__INHERITANCE_KIND = REPLICATED_ELEMENT__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__NAME = REPLICATED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__IS_INHERITED = REPLICATED_ELEMENT__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__IS_VIRTUAL_REDEFINITION = REPLICATED_ELEMENT__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__IS_REDEFINITION = REPLICATED_ELEMENT__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__IS_EXCLUDED = REPLICATED_ELEMENT__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__REDEFINED_ELEMENT = REPLICATED_ELEMENT__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__REDEFINITION_CONTEXT = REPLICATED_ELEMENT__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__REDEFINABLE_ELEMENT = REPLICATED_ELEMENT__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__INHERITED_ELEMENT = REPLICATED_ELEMENT__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__ROOT_DEFINITION = REPLICATED_ELEMENT__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__EXCLUDED_ELEMENT = REPLICATED_ELEMENT__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__REPLICATION_FACTOR = REPLICATED_ELEMENT__REPLICATION_FACTOR; + + /** + * The feature id for the '<em><b>Symbolic Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__SYMBOLIC_REPLICATION_FACTOR = REPLICATED_ELEMENT__SYMBOLIC_REPLICATION_FACTOR; + + /** + * The feature id for the '<em><b>Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__KIND = REPLICATED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Optional</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__OPTIONAL = REPLICATED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Redefined Part</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__REDEFINED_PART = REPLICATED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Capsule</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__CAPSULE = REPLICATED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART__TYPE = REPLICATED_ELEMENT_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Capsule Part</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CAPSULE_PART_FEATURE_COUNT = REPLICATED_ELEMENT_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Model</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__MODEL = NAMED_ELEMENT__MODEL; + + /** + * The feature id for the '<em><b>Inheritance Kind</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__INHERITANCE_KIND = NAMED_ELEMENT__INHERITANCE_KIND; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Is Inherited</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__IS_INHERITED = NAMED_ELEMENT__IS_INHERITED; + + /** + * The feature id for the '<em><b>Is Virtual Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__IS_VIRTUAL_REDEFINITION = NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Redefinition</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__IS_REDEFINITION = NAMED_ELEMENT__IS_REDEFINITION; + + /** + * The feature id for the '<em><b>Is Excluded</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__IS_EXCLUDED = NAMED_ELEMENT__IS_EXCLUDED; + + /** + * The feature id for the '<em><b>Redefined Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__REDEFINED_ELEMENT = NAMED_ELEMENT__REDEFINED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefinition Context</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__REDEFINITION_CONTEXT = NAMED_ELEMENT__REDEFINITION_CONTEXT; + + /** + * The feature id for the '<em><b>Redefinable Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__REDEFINABLE_ELEMENT = NAMED_ELEMENT__REDEFINABLE_ELEMENT; + + /** + * The feature id for the '<em><b>Inherited Element</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__INHERITED_ELEMENT = NAMED_ELEMENT__INHERITED_ELEMENT; + + /** + * The feature id for the '<em><b>Root Definition</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__ROOT_DEFINITION = NAMED_ELEMENT__ROOT_DEFINITION; + + /** + * The feature id for the '<em><b>Excluded Element</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__EXCLUDED_ELEMENT = NAMED_ELEMENT__EXCLUDED_ELEMENT; + + /** + * The feature id for the '<em><b>Redefined Connector</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__REDEFINED_CONNECTOR = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Capsule</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__CAPSULE = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Source</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__SOURCE = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Source Part With Port</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__SOURCE_PART_WITH_PORT = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Source Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__SOURCE_REPLICATION_FACTOR = NAMED_ELEMENT_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Target</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__TARGET = NAMED_ELEMENT_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Target Part With Port</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__TARGET_PART_WITH_PORT = NAMED_ELEMENT_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Target Replication Factor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR__TARGET_REPLICATION_FACTOR = NAMED_ELEMENT_FEATURE_COUNT + 7; + + /** + * The number of structural features of the '<em>Connector</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONNECTOR_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 8; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind <em>Inheritance Kind</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getUMLRTInheritanceKind() + * @generated + */ + int UMLRT_INHERITANCE_KIND = 10; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind <em>Port Kind</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getUMLRTPortKind() + * @generated + */ + int UMLRT_PORT_KIND = 11; + + /** + * The meta object id for the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind <em>Capsule Part Kind</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getUMLRTCapsulePartKind() + * @generated + */ + int UMLRT_CAPSULE_PART_KIND = 12; + + /** + * The meta object id for the '<em>Model</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTModel + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getModel() + * @generated + */ + int MODEL = 13; + + + /** + * The meta object id for the '<em>List</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see java.util.List + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getList() + * @generated + */ + int LIST = 14; + + /** + * The meta object id for the '<em>Stream</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see java.util.stream.Stream + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getStream() + * @generated + */ + int STREAM = 15; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement <em>Named Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Named Element</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement + * @generated + */ + EClass getNamedElement(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getModel <em>Model</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Model</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getModel() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_Model(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getInheritanceKind <em>Inheritance Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Inheritance Kind</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getInheritanceKind() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_InheritanceKind(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getName() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isInherited <em>Is Inherited</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Inherited</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isInherited() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_IsInherited(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isVirtualRedefinition <em>Is Virtual Redefinition</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Virtual Redefinition</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isVirtualRedefinition() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_IsVirtualRedefinition(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isRedefinition <em>Is Redefinition</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Redefinition</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isRedefinition() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_IsRedefinition(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isExcluded <em>Is Excluded</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Excluded</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#isExcluded() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_IsExcluded(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinedElement <em>Redefined Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Redefined Element</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinedElement() + * @see #getNamedElement() + * @generated + */ + EReference getNamedElement_RedefinedElement(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext <em>Redefinition Context</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Redefinition Context</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinitionContext() + * @see #getNamedElement() + * @generated + */ + EReference getNamedElement_RedefinitionContext(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements <em>Redefinable Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Redefinable Element</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRedefinableElements() + * @see #getNamedElement() + * @generated + */ + EReference getNamedElement_RedefinableElement(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getInheritedElement <em>Inherited Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Inherited Element</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getInheritedElement() + * @see #getNamedElement() + * @generated + */ + EReference getNamedElement_InheritedElement(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRootDefinition <em>Root Definition</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Root Definition</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getRootDefinition() + * @see #getNamedElement() + * @generated + */ + EReference getNamedElement_RootDefinition(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getExcludedElements <em>Excluded Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Excluded Element</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement#getExcludedElements() + * @see #getNamedElement() + * @generated + */ + EReference getNamedElement_ExcludedElement(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage <em>Package</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Package</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage + * @generated + */ + EClass getPackage(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestedPackages <em>Nested Package</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Nested Package</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestedPackages() + * @see #getPackage() + * @generated + */ + EReference getPackage_NestedPackage(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestingPackage <em>Nesting Package</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Nesting Package</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getNestingPackage() + * @see #getPackage() + * @generated + */ + EReference getPackage_NestingPackage(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getCapsules <em>Capsule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Capsule</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getCapsules() + * @see #getPackage() + * @generated + */ + EReference getPackage_Capsule(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getProtocols <em>Protocol</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Protocol</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage#getProtocols() + * @see #getPackage() + * @generated + */ + EReference getPackage_Protocol(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule <em>Capsule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Capsule</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule + * @generated + */ + EClass getCapsule(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSuperclass <em>Superclass</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Superclass</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSuperclass() + * @see #getCapsule() + * @generated + */ + EReference getCapsule_Superclass(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSubclasses <em>Subclass</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Subclass</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getSubclasses() + * @see #getCapsule() + * @generated + */ + EReference getCapsule_Subclass(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPorts <em>Port</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Port</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPorts() + * @see #getCapsule() + * @generated + */ + EReference getCapsule_Port(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getConnectors <em>Connector</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Connector</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getConnectors() + * @see #getCapsule() + * @generated + */ + EReference getCapsule_Connector(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getCapsuleParts <em>Capsule Part</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Capsule Part</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getCapsuleParts() + * @see #getCapsule() + * @generated + */ + EReference getCapsule_CapsulePart(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getHierarchy <em>Hierarchy</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Hierarchy</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getHierarchy() + * @see #getCapsule() + * @generated + */ + EAttribute getCapsule_Hierarchy(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPackage <em>Package</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Package</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule#getPackage() + * @see #getCapsule() + * @generated + */ + EReference getCapsule_Package(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier <em>Classifier</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Classifier</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier + * @generated + */ + EClass getClassifier(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getGeneral <em>General</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>General</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getGeneral() + * @see #getClassifier() + * @generated + */ + EReference getClassifier_General(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getSpecifics <em>Specific</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Specific</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier#getSpecifics() + * @see #getClassifier() + * @generated + */ + EReference getClassifier_Specific(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol <em>Protocol</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Protocol</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol + * @generated + */ + EClass getProtocol(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSuperProtocol <em>Super Protocol</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Super Protocol</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSuperProtocol() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_SuperProtocol(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSubProtocols <em>Sub Protocol</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Sub Protocol</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getSubProtocols() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_SubProtocol(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages <em>Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Message</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getMessages() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_Message(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getInMessages <em>In Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>In Message</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getInMessages() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_InMessage(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getOutMessages <em>Out Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Out Message</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getOutMessages() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_OutMessage(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getInOutMessages <em>In Out Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>In Out Message</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getInOutMessages() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_InOutMessage(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#isConjugate <em>Is Conjugate</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Conjugate</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#isConjugate() + * @see #getProtocol() + * @generated + */ + EAttribute getProtocol_IsConjugate(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getConjugate <em>Conjugate</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Conjugate</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getConjugate() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_Conjugate(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getHierarchy <em>Hierarchy</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Hierarchy</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getHierarchy() + * @see #getProtocol() + * @generated + */ + EAttribute getProtocol_Hierarchy(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getPackage <em>Package</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Package</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol#getPackage() + * @see #getProtocol() + * @generated + */ + EReference getProtocol_Package(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement <em>Replicated Element</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Replicated Element</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement + * @generated + */ + EClass getReplicatedElement(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#getReplicationFactor <em>Replication Factor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Replication Factor</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#getReplicationFactor() + * @see #getReplicatedElement() + * @generated + */ + EAttribute getReplicatedElement_ReplicationFactor(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#isSymbolicReplicationFactor <em>Symbolic Replication Factor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Symbolic Replication Factor</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement#isSymbolicReplicationFactor() + * @see #getReplicatedElement() + * @generated + */ + EAttribute getReplicatedElement_SymbolicReplicationFactor(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort <em>Port</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Port</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort + * @generated + */ + EClass getPort(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getKind <em>Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Kind</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getKind() + * @see #getPort() + * @generated + */ + EAttribute getPort_Kind(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRedefinedPort <em>Redefined Port</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Redefined Port</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRedefinedPort() + * @see #getPort() + * @generated + */ + EReference getPort_RedefinedPort(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Type</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getType() + * @see #getPort() + * @generated + */ + EReference getPort_Type(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getPartsWithPort <em>Parts With Port</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Parts With Port</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getPartsWithPort() + * @see #getPort() + * @generated + */ + EReference getPort_PartsWithPort(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isService <em>Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Service</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isService() + * @see #getPort() + * @generated + */ + EAttribute getPort_Service(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isBehavior <em>Behavior</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Behavior</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isBehavior() + * @see #getPort() + * @generated + */ + EAttribute getPort_Behavior(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConjugated <em>Conjugated</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Conjugated</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConjugated() + * @see #getPort() + * @generated + */ + EAttribute getPort_Conjugated(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isWired <em>Wired</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Wired</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isWired() + * @see #getPort() + * @generated + */ + EAttribute getPort_Wired(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isPublish <em>Publish</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Publish</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isPublish() + * @see #getPort() + * @generated + */ + EAttribute getPort_Publish(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isNotification <em>Notification</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Notification</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isNotification() + * @see #getPort() + * @generated + */ + EAttribute getPort_Notification(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistration <em>Registration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Registration</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistration() + * @see #getPort() + * @generated + */ + EAttribute getPort_Registration(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistrationOverride <em>Registration Override</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Registration Override</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getRegistrationOverride() + * @see #getPort() + * @generated + */ + EAttribute getPort_RegistrationOverride(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnected <em>Is Connected</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Connected</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnected() + * @see #getPort() + * @generated + */ + EAttribute getPort_IsConnected(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnectedInside <em>Is Connected Inside</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Connected Inside</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnectedInside() + * @see #getPort() + * @generated + */ + EAttribute getPort_IsConnectedInside(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnectedOutside <em>Is Connected Outside</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Connected Outside</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#isConnectedOutside() + * @see #getPort() + * @generated + */ + EAttribute getPort_IsConnectedOutside(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getConnectors <em>Connector</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Connector</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getConnectors() + * @see #getPort() + * @generated + */ + EReference getPort_Connector(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getInsideConnectors <em>Inside Connector</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Inside Connector</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getInsideConnectors() + * @see #getPort() + * @generated + */ + EReference getPort_InsideConnector(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getOutsideConnectors <em>Outside Connector</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Outside Connector</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getOutsideConnectors() + * @see #getPort() + * @generated + */ + EReference getPort_OutsideConnector(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getCapsule <em>Capsule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Capsule</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort#getCapsule() + * @see #getPort() + * @generated + */ + EReference getPort_Capsule(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart <em>Capsule Part</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Capsule Part</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart + * @generated + */ + EClass getCapsulePart(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getKind <em>Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Kind</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getKind() + * @see #getCapsulePart() + * @generated + */ + EAttribute getCapsulePart_Kind(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#isOptional <em>Optional</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Optional</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#isOptional() + * @see #getCapsulePart() + * @generated + */ + EAttribute getCapsulePart_Optional(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getRedefinedPart <em>Redefined Part</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Redefined Part</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getRedefinedPart() + * @see #getCapsulePart() + * @generated + */ + EReference getCapsulePart_RedefinedPart(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Type</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getType() + * @see #getCapsulePart() + * @generated + */ + EReference getCapsulePart_Type(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getCapsule <em>Capsule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Capsule</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart#getCapsule() + * @see #getCapsulePart() + * @generated + */ + EReference getCapsulePart_Capsule(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector <em>Connector</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Connector</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector + * @generated + */ + EClass getConnector(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getRedefinedConnector <em>Redefined Connector</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Redefined Connector</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getRedefinedConnector() + * @see #getConnector() + * @generated + */ + EReference getConnector_RedefinedConnector(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getCapsule <em>Capsule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Capsule</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getCapsule() + * @see #getConnector() + * @generated + */ + EReference getConnector_Capsule(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSource <em>Source</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Source</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSource() + * @see #getConnector() + * @generated + */ + EReference getConnector_Source(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourcePartWithPort <em>Source Part With Port</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Source Part With Port</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourcePartWithPort() + * @see #getConnector() + * @generated + */ + EReference getConnector_SourcePartWithPort(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourceReplicationFactor <em>Source Replication Factor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Source Replication Factor</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getSourceReplicationFactor() + * @see #getConnector() + * @generated + */ + EAttribute getConnector_SourceReplicationFactor(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTarget <em>Target</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Target</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTarget() + * @see #getConnector() + * @generated + */ + EReference getConnector_Target(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetPartWithPort <em>Target Part With Port</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Target Part With Port</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetPartWithPort() + * @see #getConnector() + * @generated + */ + EReference getConnector_TargetPartWithPort(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetReplicationFactor <em>Target Replication Factor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Target Replication Factor</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector#getTargetReplicationFactor() + * @see #getConnector() + * @generated + */ + EAttribute getConnector_TargetReplicationFactor(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage <em>Protocol Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Protocol Message</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage + * @generated + */ + EClass getProtocolMessage(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getKind <em>Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Kind</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getKind() + * @see #getProtocolMessage() + * @generated + */ + EAttribute getProtocolMessage_Kind(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getRedefinedMessage <em>Redefined Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Redefined Message</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getRedefinedMessage() + * @see #getProtocolMessage() + * @generated + */ + EReference getProtocolMessage_RedefinedMessage(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getParameters <em>Parameter</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Parameter</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getParameters() + * @see #getProtocolMessage() + * @generated + */ + EReference getProtocolMessage_Parameter(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#isConjugate <em>Is Conjugate</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Is Conjugate</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#isConjugate() + * @see #getProtocolMessage() + * @generated + */ + EAttribute getProtocolMessage_IsConjugate(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getConjugate <em>Conjugate</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Conjugate</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getConjugate() + * @see #getProtocolMessage() + * @generated + */ + EReference getProtocolMessage_Conjugate(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getProtocol <em>Protocol</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Protocol</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage#getProtocol() + * @see #getProtocolMessage() + * @generated + */ + EReference getProtocolMessage_Protocol(); + + /** + * Returns the meta object for enum '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind <em>Inheritance Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for enum '<em>Inheritance Kind</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind + * @generated + */ + EEnum getUMLRTInheritanceKind(); + + /** + * Returns the meta object for enum '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind <em>Port Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for enum '<em>Port Kind</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind + * @generated + */ + EEnum getUMLRTPortKind(); + + /** + * Returns the meta object for enum '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind <em>Capsule Part Kind</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for enum '<em>Capsule Part Kind</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind + * @generated + */ + EEnum getUMLRTCapsulePartKind(); + + /** + * Returns the meta object for data type '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTModel <em>Model</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for data type '<em>Model</em>'. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTModel + * @generated + */ + EDataType getModel(); + + /** + * Returns the meta object for data type '{@link java.util.List <em>List</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for data type '<em>List</em>'. + * @see java.util.List + * @generated + */ + EDataType getList(); + + /** + * Returns the meta object for data type '{@link java.util.stream.Stream <em>Stream</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for data type '<em>Stream</em>'. + * @see java.util.stream.Stream + * @generated + */ + EDataType getStream(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the factory that creates the instances of the model. + * @generated + */ + UMLRTUMLRTFactory getUMLRTFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl <em>Named Element</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getNamedElement() + * @generated + */ + EClass NAMED_ELEMENT = eINSTANCE.getNamedElement(); + + /** + * The meta object literal for the '<em><b>Model</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute NAMED_ELEMENT__MODEL = eINSTANCE.getNamedElement_Model(); + + /** + * The meta object literal for the '<em><b>Inheritance Kind</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute NAMED_ELEMENT__INHERITANCE_KIND = eINSTANCE.getNamedElement_InheritanceKind(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute NAMED_ELEMENT__NAME = eINSTANCE.getNamedElement_Name(); + + /** + * The meta object literal for the '<em><b>Is Inherited</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute NAMED_ELEMENT__IS_INHERITED = eINSTANCE.getNamedElement_IsInherited(); + + /** + * The meta object literal for the '<em><b>Is Virtual Redefinition</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION = eINSTANCE.getNamedElement_IsVirtualRedefinition(); + + /** + * The meta object literal for the '<em><b>Is Redefinition</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute NAMED_ELEMENT__IS_REDEFINITION = eINSTANCE.getNamedElement_IsRedefinition(); + + /** + * The meta object literal for the '<em><b>Is Excluded</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute NAMED_ELEMENT__IS_EXCLUDED = eINSTANCE.getNamedElement_IsExcluded(); + + /** + * The meta object literal for the '<em><b>Redefined Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference NAMED_ELEMENT__REDEFINED_ELEMENT = eINSTANCE.getNamedElement_RedefinedElement(); + + /** + * The meta object literal for the '<em><b>Redefinition Context</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference NAMED_ELEMENT__REDEFINITION_CONTEXT = eINSTANCE.getNamedElement_RedefinitionContext(); + + /** + * The meta object literal for the '<em><b>Redefinable Element</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference NAMED_ELEMENT__REDEFINABLE_ELEMENT = eINSTANCE.getNamedElement_RedefinableElement(); + + /** + * The meta object literal for the '<em><b>Inherited Element</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference NAMED_ELEMENT__INHERITED_ELEMENT = eINSTANCE.getNamedElement_InheritedElement(); + + /** + * The meta object literal for the '<em><b>Root Definition</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference NAMED_ELEMENT__ROOT_DEFINITION = eINSTANCE.getNamedElement_RootDefinition(); + + /** + * The meta object literal for the '<em><b>Excluded Element</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference NAMED_ELEMENT__EXCLUDED_ELEMENT = eINSTANCE.getNamedElement_ExcludedElement(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl <em>Package</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getPackage() + * @generated + */ + EClass PACKAGE = eINSTANCE.getPackage(); + + /** + * The meta object literal for the '<em><b>Nested Package</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PACKAGE__NESTED_PACKAGE = eINSTANCE.getPackage_NestedPackage(); + + /** + * The meta object literal for the '<em><b>Nesting Package</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PACKAGE__NESTING_PACKAGE = eINSTANCE.getPackage_NestingPackage(); + + /** + * The meta object literal for the '<em><b>Capsule</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PACKAGE__CAPSULE = eINSTANCE.getPackage_Capsule(); + + /** + * The meta object literal for the '<em><b>Protocol</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PACKAGE__PROTOCOL = eINSTANCE.getPackage_Protocol(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl <em>Capsule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getCapsule() + * @generated + */ + EClass CAPSULE = eINSTANCE.getCapsule(); + + /** + * The meta object literal for the '<em><b>Superclass</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE__SUPERCLASS = eINSTANCE.getCapsule_Superclass(); + + /** + * The meta object literal for the '<em><b>Subclass</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE__SUBCLASS = eINSTANCE.getCapsule_Subclass(); + + /** + * The meta object literal for the '<em><b>Port</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE__PORT = eINSTANCE.getCapsule_Port(); + + /** + * The meta object literal for the '<em><b>Connector</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE__CONNECTOR = eINSTANCE.getCapsule_Connector(); + + /** + * The meta object literal for the '<em><b>Capsule Part</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE__CAPSULE_PART = eINSTANCE.getCapsule_CapsulePart(); + + /** + * The meta object literal for the '<em><b>Hierarchy</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute CAPSULE__HIERARCHY = eINSTANCE.getCapsule_Hierarchy(); + + /** + * The meta object literal for the '<em><b>Package</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE__PACKAGE = eINSTANCE.getCapsule_Package(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTClassifierImpl <em>Classifier</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTClassifierImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getClassifier() + * @generated + */ + EClass CLASSIFIER = eINSTANCE.getClassifier(); + + /** + * The meta object literal for the '<em><b>General</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CLASSIFIER__GENERAL = eINSTANCE.getClassifier_General(); + + /** + * The meta object literal for the '<em><b>Specific</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CLASSIFIER__SPECIFIC = eINSTANCE.getClassifier_Specific(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl <em>Protocol</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getProtocol() + * @generated + */ + EClass PROTOCOL = eINSTANCE.getProtocol(); + + /** + * The meta object literal for the '<em><b>Super Protocol</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__SUPER_PROTOCOL = eINSTANCE.getProtocol_SuperProtocol(); + + /** + * The meta object literal for the '<em><b>Sub Protocol</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__SUB_PROTOCOL = eINSTANCE.getProtocol_SubProtocol(); + + /** + * The meta object literal for the '<em><b>Message</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__MESSAGE = eINSTANCE.getProtocol_Message(); + + /** + * The meta object literal for the '<em><b>In Message</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__IN_MESSAGE = eINSTANCE.getProtocol_InMessage(); + + /** + * The meta object literal for the '<em><b>Out Message</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__OUT_MESSAGE = eINSTANCE.getProtocol_OutMessage(); + + /** + * The meta object literal for the '<em><b>In Out Message</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__IN_OUT_MESSAGE = eINSTANCE.getProtocol_InOutMessage(); + + /** + * The meta object literal for the '<em><b>Is Conjugate</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PROTOCOL__IS_CONJUGATE = eINSTANCE.getProtocol_IsConjugate(); + + /** + * The meta object literal for the '<em><b>Conjugate</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__CONJUGATE = eINSTANCE.getProtocol_Conjugate(); + + /** + * The meta object literal for the '<em><b>Hierarchy</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PROTOCOL__HIERARCHY = eINSTANCE.getProtocol_Hierarchy(); + + /** + * The meta object literal for the '<em><b>Package</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL__PACKAGE = eINSTANCE.getProtocol_Package(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTReplicatedElementImpl <em>Replicated Element</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTReplicatedElementImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getReplicatedElement() + * @generated + */ + EClass REPLICATED_ELEMENT = eINSTANCE.getReplicatedElement(); + + /** + * The meta object literal for the '<em><b>Replication Factor</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute REPLICATED_ELEMENT__REPLICATION_FACTOR = eINSTANCE.getReplicatedElement_ReplicationFactor(); + + /** + * The meta object literal for the '<em><b>Symbolic Replication Factor</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute REPLICATED_ELEMENT__SYMBOLIC_REPLICATION_FACTOR = eINSTANCE.getReplicatedElement_SymbolicReplicationFactor(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl <em>Port</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getPort() + * @generated + */ + EClass PORT = eINSTANCE.getPort(); + + /** + * The meta object literal for the '<em><b>Kind</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__KIND = eINSTANCE.getPort_Kind(); + + /** + * The meta object literal for the '<em><b>Redefined Port</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PORT__REDEFINED_PORT = eINSTANCE.getPort_RedefinedPort(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PORT__TYPE = eINSTANCE.getPort_Type(); + + /** + * The meta object literal for the '<em><b>Parts With Port</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PORT__PARTS_WITH_PORT = eINSTANCE.getPort_PartsWithPort(); + + /** + * The meta object literal for the '<em><b>Service</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__SERVICE = eINSTANCE.getPort_Service(); + + /** + * The meta object literal for the '<em><b>Behavior</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__BEHAVIOR = eINSTANCE.getPort_Behavior(); + + /** + * The meta object literal for the '<em><b>Conjugated</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__CONJUGATED = eINSTANCE.getPort_Conjugated(); + + /** + * The meta object literal for the '<em><b>Wired</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__WIRED = eINSTANCE.getPort_Wired(); + + /** + * The meta object literal for the '<em><b>Publish</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__PUBLISH = eINSTANCE.getPort_Publish(); + + /** + * The meta object literal for the '<em><b>Notification</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__NOTIFICATION = eINSTANCE.getPort_Notification(); + + /** + * The meta object literal for the '<em><b>Registration</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__REGISTRATION = eINSTANCE.getPort_Registration(); + + /** + * The meta object literal for the '<em><b>Registration Override</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__REGISTRATION_OVERRIDE = eINSTANCE.getPort_RegistrationOverride(); + + /** + * The meta object literal for the '<em><b>Is Connected</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__IS_CONNECTED = eINSTANCE.getPort_IsConnected(); + + /** + * The meta object literal for the '<em><b>Is Connected Inside</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__IS_CONNECTED_INSIDE = eINSTANCE.getPort_IsConnectedInside(); + + /** + * The meta object literal for the '<em><b>Is Connected Outside</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PORT__IS_CONNECTED_OUTSIDE = eINSTANCE.getPort_IsConnectedOutside(); + + /** + * The meta object literal for the '<em><b>Connector</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PORT__CONNECTOR = eINSTANCE.getPort_Connector(); + + /** + * The meta object literal for the '<em><b>Inside Connector</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PORT__INSIDE_CONNECTOR = eINSTANCE.getPort_InsideConnector(); + + /** + * The meta object literal for the '<em><b>Outside Connector</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PORT__OUTSIDE_CONNECTOR = eINSTANCE.getPort_OutsideConnector(); + + /** + * The meta object literal for the '<em><b>Capsule</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PORT__CAPSULE = eINSTANCE.getPort_Capsule(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl <em>Capsule Part</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getCapsulePart() + * @generated + */ + EClass CAPSULE_PART = eINSTANCE.getCapsulePart(); + + /** + * The meta object literal for the '<em><b>Kind</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute CAPSULE_PART__KIND = eINSTANCE.getCapsulePart_Kind(); + + /** + * The meta object literal for the '<em><b>Optional</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute CAPSULE_PART__OPTIONAL = eINSTANCE.getCapsulePart_Optional(); + + /** + * The meta object literal for the '<em><b>Redefined Part</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE_PART__REDEFINED_PART = eINSTANCE.getCapsulePart_RedefinedPart(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE_PART__TYPE = eINSTANCE.getCapsulePart_Type(); + + /** + * The meta object literal for the '<em><b>Capsule</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CAPSULE_PART__CAPSULE = eINSTANCE.getCapsulePart_Capsule(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl <em>Connector</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getConnector() + * @generated + */ + EClass CONNECTOR = eINSTANCE.getConnector(); + + /** + * The meta object literal for the '<em><b>Redefined Connector</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CONNECTOR__REDEFINED_CONNECTOR = eINSTANCE.getConnector_RedefinedConnector(); + + /** + * The meta object literal for the '<em><b>Capsule</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CONNECTOR__CAPSULE = eINSTANCE.getConnector_Capsule(); + + /** + * The meta object literal for the '<em><b>Source</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CONNECTOR__SOURCE = eINSTANCE.getConnector_Source(); + + /** + * The meta object literal for the '<em><b>Source Part With Port</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CONNECTOR__SOURCE_PART_WITH_PORT = eINSTANCE.getConnector_SourcePartWithPort(); + + /** + * The meta object literal for the '<em><b>Source Replication Factor</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute CONNECTOR__SOURCE_REPLICATION_FACTOR = eINSTANCE.getConnector_SourceReplicationFactor(); + + /** + * The meta object literal for the '<em><b>Target</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CONNECTOR__TARGET = eINSTANCE.getConnector_Target(); + + /** + * The meta object literal for the '<em><b>Target Part With Port</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CONNECTOR__TARGET_PART_WITH_PORT = eINSTANCE.getConnector_TargetPartWithPort(); + + /** + * The meta object literal for the '<em><b>Target Replication Factor</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute CONNECTOR__TARGET_REPLICATION_FACTOR = eINSTANCE.getConnector_TargetReplicationFactor(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl <em>Protocol Message</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getProtocolMessage() + * @generated + */ + EClass PROTOCOL_MESSAGE = eINSTANCE.getProtocolMessage(); + + /** + * The meta object literal for the '<em><b>Kind</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PROTOCOL_MESSAGE__KIND = eINSTANCE.getProtocolMessage_Kind(); + + /** + * The meta object literal for the '<em><b>Redefined Message</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL_MESSAGE__REDEFINED_MESSAGE = eINSTANCE.getProtocolMessage_RedefinedMessage(); + + /** + * The meta object literal for the '<em><b>Parameter</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL_MESSAGE__PARAMETER = eINSTANCE.getProtocolMessage_Parameter(); + + /** + * The meta object literal for the '<em><b>Is Conjugate</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute PROTOCOL_MESSAGE__IS_CONJUGATE = eINSTANCE.getProtocolMessage_IsConjugate(); + + /** + * The meta object literal for the '<em><b>Conjugate</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL_MESSAGE__CONJUGATE = eINSTANCE.getProtocolMessage_Conjugate(); + + /** + * The meta object literal for the '<em><b>Protocol</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PROTOCOL_MESSAGE__PROTOCOL = eINSTANCE.getProtocolMessage_Protocol(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind <em>Inheritance Kind</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getUMLRTInheritanceKind() + * @generated + */ + EEnum UMLRT_INHERITANCE_KIND = eINSTANCE.getUMLRTInheritanceKind(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind <em>Port Kind</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getUMLRTPortKind() + * @generated + */ + EEnum UMLRT_PORT_KIND = eINSTANCE.getUMLRTPortKind(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind <em>Capsule Part Kind</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getUMLRTCapsulePartKind() + * @generated + */ + EEnum UMLRT_CAPSULE_PART_KIND = eINSTANCE.getUMLRTCapsulePartKind(); + + /** + * The meta object literal for the '<em>Model</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTModel + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getModel() + * @generated + */ + EDataType MODEL = eINSTANCE.getModel(); + + /** + * The meta object literal for the '<em>List</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see java.util.List + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getList() + * @generated + */ + EDataType LIST = eINSTANCE.getList(); + + /** + * The meta object literal for the '<em>Stream</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see java.util.stream.Stream + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTUMLRTPackageImpl#getStream() + * @generated + */ + EDataType STREAM = eINSTANCE.getStream(); + + } + +} // UMLRTUMLRTPackage
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTCapsuleImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTCapsuleImpl.java new file mode 100644 index 0000000..1fd15b2 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTCapsuleImpl.java
@@ -0,0 +1,746 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import static java.util.stream.Collectors.collectingAndThen; +import static java.util.stream.Collectors.toList; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.Capsule; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.CapsulePart; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTConnector; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTPort; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtUMLExtPackage; +import org.eclipse.uml2.common.util.CacheAdapter; +import org.eclipse.uml2.common.util.DerivedUnionEObjectEList; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.Connector; +import org.eclipse.uml2.uml.ConnectorEnd; +import org.eclipse.uml2.uml.Port; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Capsule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getGeneral <em>General</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getSpecifics <em>Specific</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getRedefinableElements <em>Redefinable Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getSuperclass <em>Superclass</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getSubclasses <em>Subclass</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getPorts <em>Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getCapsuleParts <em>Capsule Part</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getConnectors <em>Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getHierarchy <em>Hierarchy</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsuleImpl#getPackage <em>Package</em>}</li> + * </ul> + * + * @generated + */ +public class UMLRTCapsuleImpl extends UMLRTClassifierImpl implements UMLRTCapsule { + + static final FacadeType<Class, Capsule, UMLRTCapsuleImpl> TYPE = new FacadeType<>( + UMLRTCapsuleImpl.class, + UMLPackage.Literals.CLASS, + UMLRealTimePackage.Literals.CAPSULE, + UMLRTCapsuleImpl::getInstance, + capsule -> (UMLRTCapsuleImpl) capsule.getSuperclass(), + stereo -> new UMLRTCapsuleImpl().init(stereo.getBase_Class(), stereo)); + + private static final FacadeReference<Port, RTPort, UMLRTPort, UMLRTPortImpl> PORT_REFERENCE = new FacadeReference<>( + UMLRTPortImpl.TYPE, + UMLRTUMLRTPackage.Literals.CAPSULE__PORT, + UMLRTPort.class, + UMLPackage.Literals.ENCAPSULATED_CLASSIFIER__OWNED_PORT, + ExtUMLExtPackage.Literals.ENCAPSULATED_CLASSIFIER__IMPLICIT_PORT, + UMLPackage.Literals.PORT); + + private static final FacadeReference<Property, CapsulePart, UMLRTCapsulePart, UMLRTCapsulePartImpl> CAPSULE_PART_REFERENCE = new FacadeReference<>( + UMLRTCapsulePartImpl.TYPE, + UMLRTUMLRTPackage.Literals.CAPSULE__CAPSULE_PART, + UMLRTCapsulePart.class, + UMLPackage.Literals.STRUCTURED_CLASSIFIER__OWNED_ATTRIBUTE, + ExtUMLExtPackage.Literals.STRUCTURED_CLASSIFIER__IMPLICIT_ATTRIBUTE, + UMLPackage.Literals.PROPERTY); + + private static final FacadeReference<Connector, RTConnector, UMLRTConnector, UMLRTConnectorImpl> CONNECTOR_REFERENCE = new FacadeReference<>( + UMLRTConnectorImpl.TYPE, + UMLRTUMLRTPackage.Literals.CAPSULE__CONNECTOR, + UMLRTConnector.class, + UMLPackage.Literals.STRUCTURED_CLASSIFIER__OWNED_CONNECTOR, + ExtUMLExtPackage.Literals.STRUCTURED_CLASSIFIER__IMPLICIT_CONNECTOR, + UMLPackage.Literals.CONNECTOR); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTCapsuleImpl() { + super(); + } + + /** + * Obtains the canonical instance of the capsule façade for a class. + * + * @param class_ + * a class in the UML model + * + * @return its capsule façade, or {@code null} if the class is not a valid capsule + */ + public static UMLRTCapsuleImpl getInstance(Class class_) { + return getFacade(class_, TYPE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.CAPSULE; + } + + UMLRTCapsuleImpl initCapsule() { + // Capsules are active classes + toUML().setIsActive(true); + + return this; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTClassifier getGeneral() { + UMLRTCapsule superclass = getSuperclass(); + if (superclass != null) { + return superclass; + } + return super.getGeneral(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTClassifier> getSpecifics() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTClassifier> specifics = (List<UMLRTClassifier>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC); + if (specifics == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC, specifics = new DerivedUnionEObjectEList<>(UMLRTClassifier.class, this, UMLRTUMLRTPackage.CAPSULE__SPECIFIC, SPECIFIC_ESUBSETS)); + } + return specifics; + } + return new DerivedUnionEObjectEList<>(UMLRTClassifier.class, this, UMLRTUMLRTPackage.CAPSULE__SPECIFIC, SPECIFIC_ESUBSETS); + } + + /** + * The array of subset feature identifiers for the '{@link #getSpecifics() <em>Specific</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getSpecifics() + * @generated + * @ordered + */ + protected static final int[] SPECIFIC_ESUBSETS = new int[] { UMLRTUMLRTPackage.CAPSULE__SUBCLASS }; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTNamedElement> getRedefinableElements() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTNamedElement> redefinableElements = (List<UMLRTNamedElement>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + if (redefinableElements == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT, + redefinableElements = new DerivedUnionEObjectEList<>(UMLRTNamedElement.class, this, UMLRTUMLRTPackage.CAPSULE__REDEFINABLE_ELEMENT, REDEFINABLE_ELEMENT_ESUBSETS)); + } + return redefinableElements; + } + return new DerivedUnionEObjectEList<>(UMLRTNamedElement.class, this, UMLRTUMLRTPackage.CAPSULE__REDEFINABLE_ELEMENT, REDEFINABLE_ELEMENT_ESUBSETS); + } + + /** + * The array of subset feature identifiers for the '{@link #getRedefinableElements() <em>Redefinable Element</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getRedefinableElements() + * @generated + * @ordered + */ + protected static final int[] REDEFINABLE_ELEMENT_ESUBSETS = new int[] { UMLRTUMLRTPackage.CAPSULE__PORT, UMLRTUMLRTPackage.CAPSULE__CAPSULE_PART, UMLRTUMLRTPackage.CAPSULE__CONNECTOR }; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsule getSuperclass() { + List<Class> superclasses = toUML().getSuperClasses(); + return superclasses.isEmpty() ? null : getInstance(superclasses.get(0)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setSuperclass(UMLRTCapsule newSuperclass) { + setGeneral(toUML(), (newSuperclass == null) ? null : newSuperclass.toUML()); + } + + @Override + public void setGeneral(UMLRTClassifier general) { + setSuperclass((UMLRTCapsule) general); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTCapsule> getSubclasses() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + @SuppressWarnings("unchecked") + List<UMLRTCapsule> subclasses = (List<UMLRTCapsule>) cache.get(this, UMLRTUMLRTPackage.Literals.CAPSULE__SUBCLASS); + if (subclasses == null) { + cache.put(this, UMLRTUMLRTPackage.Literals.CAPSULE__SUBCLASS, + subclasses = doGetSubclasses()); + } + return subclasses; + } + return doGetSubclasses(); + } + + private List<UMLRTCapsule> doGetSubclasses() { + return specifics(toUML(), Class.class) + .map(UMLRTCapsuleImpl::getInstance) + .filter(Objects::nonNull) + .collect(collectingAndThen(Collectors.<UMLRTCapsule> toList(), + list -> elist(UMLRTUMLRTPackage.Literals.CAPSULE__SUBCLASS, list))); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsule getSubclass(String name) { + return getSubclass(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsule getSubclass(String name, boolean ignoreCase) { + subclassLoop: for (UMLRTCapsule subclass : getSubclasses()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(subclass.getName()) : name.equals(subclass.getName()))) { + continue subclassLoop; + } + return subclass; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTPort> getPorts() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + @SuppressWarnings("unchecked") + List<UMLRTPort> ports = (List<UMLRTPort>) cache.get(this, UMLRTUMLRTPackage.Literals.CAPSULE__PORT); + if (ports == null) { + cache.put(this, UMLRTUMLRTPackage.Literals.CAPSULE__PORT, + ports = getFacades(PORT_REFERENCE)); + } + return ports; + } + return getFacades(PORT_REFERENCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTPort getPort(String name) { + return getPort(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTPort getPort(String name, boolean ignoreCase) { + portLoop: for (UMLRTPort port : getPorts()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(port.getName()) : name.equals(port.getName()))) { + continue portLoop; + } + return port; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTConnector> getConnectors() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + @SuppressWarnings("unchecked") + List<UMLRTConnector> connectors = (List<UMLRTConnector>) cache.get(this, UMLRTUMLRTPackage.Literals.CAPSULE__CONNECTOR); + if (connectors == null) { + cache.put(this, UMLRTUMLRTPackage.Literals.CAPSULE__CONNECTOR, + connectors = getFacades(CONNECTOR_REFERENCE)); + } + return connectors; + } + return getFacades(CONNECTOR_REFERENCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getConnector(String name) { + return getConnector(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getConnector(String name, boolean ignoreCase) { + connectorLoop: for (UMLRTConnector connector : getConnectors()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(connector.getName()) : name.equals(connector.getName()))) { + continue connectorLoop; + } + return connector; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTCapsulePart> getCapsuleParts() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + @SuppressWarnings("unchecked") + List<UMLRTCapsulePart> capsuleParts = (List<UMLRTCapsulePart>) cache.get(this, UMLRTUMLRTPackage.Literals.CAPSULE__CAPSULE_PART); + if (capsuleParts == null) { + cache.put(this, UMLRTUMLRTPackage.Literals.CAPSULE__CAPSULE_PART, + capsuleParts = getFacades(CAPSULE_PART_REFERENCE)); + } + return capsuleParts; + } + return getFacades(CAPSULE_PART_REFERENCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsulePart getCapsulePart(String name) { + return getCapsulePart(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsulePart getCapsulePart(String name, boolean ignoreCase) { + capsulePartLoop: for (UMLRTCapsulePart capsulePart : getCapsuleParts()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(capsulePart.getName()) : name.equals(capsulePart.getName()))) { + continue capsulePartLoop; + } + return capsulePart; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPackage getPackage() { + return UMLRTPackage.getInstance(toUML().getNearestPackage()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public org.eclipse.uml2.uml.Class toUML() { + return (Class) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTCapsule> getAncestry() { + // TODO: Cache this + return doGetAncestry(); + } + + private List<UMLRTCapsule> doGetAncestry() { + return ancestry(toUML(), Class.class).stream() + .map(UMLRTCapsuleImpl::getInstance) + .filter(Objects::nonNull) + .collect(collectingAndThen(toList(), ECollections::unmodifiableEList)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTPort> getPorts(boolean withExclusions) { + return getFacades(PORT_REFERENCE, withExclusions); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTCapsulePart> getCapsuleParts(boolean withExclusions) { + return getFacades(CAPSULE_PART_REFERENCE, withExclusions); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTConnector> getConnectors(boolean withExclusions) { + return getFacades(CONNECTOR_REFERENCE, withExclusions); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPort createPort(UMLRTProtocol type) { + return createPort(type, UMLRTPortKind.EXTERNAL_BEHAVIOR); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPort createPort(UMLRTProtocol type, UMLRTPortKind kind) { + String baseProtocolName = type.isConjugate() + ? type.getConjugate().getName() // want the base protocol name + : type.getName(); + String portName = initialLower(baseProtocolName); + UMLRTPort result = create(PORT_REFERENCE, portName); + result.setType(type); + result.setKind(kind); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsulePart createCapsulePart(UMLRTCapsule type) { + String partName = initialLower(type.getName()); + UMLRTCapsulePart result = create(CAPSULE_PART_REFERENCE, partName); + result.setType(type); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTConnector createConnector(String name, + UMLRTPort source, UMLRTCapsulePart sourcePartWithPort, + UMLRTPort target, UMLRTCapsulePart targetPartWithPort) { + + UMLRTConnector result = create(CONNECTOR_REFERENCE, name); + ConnectorEnd sourceEnd = result.toUML().createEnd(); + sourceEnd.setRole(source.toUML()); + if (sourcePartWithPort != null) { + sourceEnd.setPartWithPort(sourcePartWithPort.toUML()); + } + + ConnectorEnd targetEnd = result.toUML().createEnd(); + targetEnd.setRole(target.toUML()); + if (targetPartWithPort != null) { + targetEnd.setPartWithPort(targetPartWithPort.toUML()); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Stream<UMLRTCapsule> getHierarchy() { + return hierarchy(toUML(), Class.class) + .map(UMLRTCapsule::getInstance) + .filter(Objects::nonNull); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE__SUPERCLASS: + return getSuperclass(); + case UMLRTUMLRTPackage.CAPSULE__SUBCLASS: + return getSubclasses(); + case UMLRTUMLRTPackage.CAPSULE__PORT: + return getPorts(); + case UMLRTUMLRTPackage.CAPSULE__CAPSULE_PART: + return getCapsuleParts(); + case UMLRTUMLRTPackage.CAPSULE__CONNECTOR: + return getConnectors(); + case UMLRTUMLRTPackage.CAPSULE__HIERARCHY: + return getHierarchy(); + case UMLRTUMLRTPackage.CAPSULE__PACKAGE: + return getPackage(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE__SUPERCLASS: + setSuperclass((UMLRTCapsule) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE__SUPERCLASS: + setSuperclass((UMLRTCapsule) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE__GENERAL: + return isSetGeneral(); + case UMLRTUMLRTPackage.CAPSULE__SPECIFIC: + return isSetSpecifics(); + case UMLRTUMLRTPackage.CAPSULE__REDEFINABLE_ELEMENT: + return isSetRedefinableElements(); + case UMLRTUMLRTPackage.CAPSULE__SUPERCLASS: + return getSuperclass() != null; + case UMLRTUMLRTPackage.CAPSULE__SUBCLASS: + return !getSubclasses().isEmpty(); + case UMLRTUMLRTPackage.CAPSULE__PORT: + return !getPorts().isEmpty(); + case UMLRTUMLRTPackage.CAPSULE__CAPSULE_PART: + return !getCapsuleParts().isEmpty(); + case UMLRTUMLRTPackage.CAPSULE__CONNECTOR: + return !getConnectors().isEmpty(); + case UMLRTUMLRTPackage.CAPSULE__HIERARCHY: + return getHierarchy() != null; + case UMLRTUMLRTPackage.CAPSULE__PACKAGE: + return getPackage() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetGeneral() { + return super.isSetGeneral() + || eIsSet(UMLRTUMLRTPackage.CAPSULE__SUPERCLASS); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetSpecifics() { + return super.isSetSpecifics() + || eIsSet(UMLRTUMLRTPackage.CAPSULE__SUBCLASS); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinableElements() { + return super.isSetRedefinableElements() + || eIsSet(UMLRTUMLRTPackage.CAPSULE__PORT) + || eIsSet(UMLRTUMLRTPackage.CAPSULE__CAPSULE_PART) + || eIsSet(UMLRTUMLRTPackage.CAPSULE__CONNECTOR); + } + +} // UMLRTCapsuleImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTCapsulePartImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTCapsulePartImpl.java new file mode 100644 index 0000000..007c070 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTCapsulePartImpl.java
@@ -0,0 +1,514 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import static java.util.stream.Collectors.collectingAndThen; +import static java.util.stream.Collectors.toList; + +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.function.Predicate; +import java.util.stream.Stream; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.CapsulePart; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; +import org.eclipse.uml2.common.util.CacheAdapter; +import org.eclipse.uml2.uml.AggregationKind; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.ConnectableElement; +import org.eclipse.uml2.uml.Connector; +import org.eclipse.uml2.uml.ConnectorEnd; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.LiteralUnlimitedNatural; +import org.eclipse.uml2.uml.Port; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Capsule Part</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl#getRedefinedElement <em>Redefined Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl#getRedefinitionContext <em>Redefinition Context</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl#getKind <em>Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl#isOptional <em>Optional</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl#getRedefinedPart <em>Redefined Part</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl#getCapsule <em>Capsule</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTCapsulePartImpl#getType <em>Type</em>}</li> + * </ul> + * + * @generated + */ +public class UMLRTCapsulePartImpl extends UMLRTReplicatedElementImpl implements UMLRTCapsulePart { + static final FacadeType<Property, CapsulePart, UMLRTCapsulePartImpl> TYPE = new FacadeType<>( + UMLRTCapsulePartImpl.class, + UMLPackage.Literals.PROPERTY, + UMLRealTimePackage.Literals.CAPSULE_PART, + UMLRTCapsulePartImpl::getInstance, + capsulePart -> (UMLRTCapsulePartImpl) capsulePart.getRedefinedPart(), + stereo -> new UMLRTCapsulePartImpl().init(stereo.getBase_Property(), stereo)); + + /** + * The default value of the '{@link #getKind() <em>Kind</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getKind() + * @generated + * @ordered + */ + protected static final UMLRTCapsulePartKind KIND_EDEFAULT = UMLRTCapsulePartKind.FIXED; + + /** + * The default value of the '{@link #isOptional() <em>Optional</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isOptional() + * @generated + * @ordered + */ + protected static final boolean OPTIONAL_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTCapsulePartImpl() { + super(); + } + + /** + * Obtains the canonical instance of the capsule-part façade for a property. + * + * @param part + * a property in the UML model + * + * @return its capsule-part façade, or {@code null} if the property is not a valid capsule-part + */ + public static UMLRTCapsulePartImpl getInstance(Property part) { + return getFacade(part, TYPE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.CAPSULE_PART; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinedElement() { + UMLRTCapsulePart redefinedPart = getRedefinedPart(); + if (redefinedPart != null) { + return redefinedPart; + } + return super.getRedefinedElement(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinitionContext() { + UMLRTCapsule capsule = getCapsule(); + if (capsule != null) { + return capsule; + } + return super.getRedefinitionContext(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsulePartKind getKind() { + UMLRTCapsulePartKind result = UMLRTCapsulePartKind.NULL; + Property uml = toUML(); + + if ((uml.getLower()) > 0 && (uml.getUpper() > 0)) { + result = UMLRTCapsulePartKind.FIXED; + } else if ((uml.getLower() == 0) || (uml.getUpper() == LiteralUnlimitedNatural.UNLIMITED)) { + if (uml.getAggregation() == AggregationKind.COMPOSITE_LITERAL) { + result = UMLRTCapsulePartKind.OPTIONAL; + } else if (uml.getAggregation() == AggregationKind.SHARED_LITERAL) { + result = UMLRTCapsulePartKind.PLUG_IN; + } + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setKind(UMLRTCapsulePartKind newKind) { + if (Objects.requireNonNull(newKind, "newKind").isNull()) { //$NON-NLS-1$ + throw new IllegalArgumentException(newKind.getName()); + } + + setOptional(!newKind.isRequired()); + if ((toUML().getAggregation() == AggregationKind.COMPOSITE_LITERAL) != newKind.isComposite()) { + if (newKind.isComposite()) { + toUML().setAggregation(AggregationKind.COMPOSITE_LITERAL); + } else { + toUML().setAggregation(AggregationKind.SHARED_LITERAL); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isOptional() { + return toUML().getLower() == 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setOptional(boolean newOptional) { + if (newOptional != isOptional()) { + if (newOptional) { + toUML().setLower(0); + } else { + // FIXME: Need to account for symbolic replication factors + toUML().setLower(getReplicationFactor()); + if (toUML().getAggregation() != AggregationKind.COMPOSITE_LITERAL) { + toUML().setAggregation(AggregationKind.COMPOSITE_LITERAL); + } + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsulePart getRedefinedPart() { + UMLRTCapsulePart result; + + if (toUML() instanceof InternalUMLRTElement) { + Property superPart = (Property) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); + result = UMLRTCapsulePart.getInstance(superPart); + } else { + UMLRTNamedElement redef = super.getRedefinedElement(); + result = (redef instanceof UMLRTCapsulePart) ? (UMLRTCapsulePart) redef : null; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsule getType() { + Type result = toUML().getType(); + return (result instanceof Class) ? UMLRTCapsule.getInstance((Class) result) + : null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setType(UMLRTCapsule newType) { + if (newType == null) { + toUML().setType(null); + } else { + toUML().setType(newType.toUML()); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTConnector> getConnectorsOf(UMLRTPort port) { + UMLRTCapsule capsule = getCapsule(); + Predicate<UMLRTConnector> excluded = UMLRTConnector::isExcluded; + + // Get the connectors that are defined within my capsule + return allConnectorsOf(port) + .map(capsule::getRedefinitionOf) + .filter(Objects::nonNull) + .filter(excluded.negate()) + .distinct() + .collect(collectingAndThen(toList(), Collections::unmodifiableList)); + } + + Stream<UMLRTConnector> allConnectorsOf(UMLRTPort portOnPart) { + CacheAdapter cache = CacheAdapter.getCacheAdapter(toUML()); + + return getRedefinitionChain().stream() + .map(UMLRTNamedElement::toUML) + .flatMap(e -> cache.getNonNavigableInverseReferences(e).stream()) + .filter(s -> s.getEStructuralFeature() == UMLPackage.Literals.CONNECTOR_END__PART_WITH_PORT) + .map(EStructuralFeature.Setting::getEObject) + .map(ConnectorEnd.class::cast) + .filter(end -> redefines(end.getRole(), portOnPart)) + .map(Element::getOwner) + .map(Connector.class::cast) + .map(UMLRTConnector::getInstance) + .filter(Objects::nonNull); + } + + private static boolean redefines(ConnectableElement role, UMLRTPort port) { + UMLRTPort rtRole = (role instanceof Port) ? UMLRTPort.getInstance((Port) role) : null; + return (rtRole != null) && rtRole.redefines(port); + } + + /** + * Obtains a stream over all of the currently loaded redefinitions of my in + * the inheritance hierarchy of my {@link #getCapsule() capsule}. + * + * @return my currently loaded redefinitions + * + * @see UMLRTCapsule#getHierarchy() + */ + protected Stream<UMLRTCapsulePart> allRedefinitions() { + Predicate<UMLRTCapsulePart> excluded = UMLRTCapsulePart::isExcluded; + UMLRTCapsule capsule = getCapsule(); + return (capsule == null) ? Stream.empty() : capsule.getHierarchy() + .map(c -> c.getRedefinitionOf((UMLRTCapsulePart) this)) + .filter(excluded.negate()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTConnector> getConnectorsOfPorts() { + UMLRTCapsule capsule = getCapsule(); + Predicate<UMLRTConnector> excluded = UMLRTConnector::isExcluded; + + // Get the connectors that are defined within my capsule + return allConnectorsOfPorts() + .map(capsule::getRedefinitionOf) + .filter(Objects::nonNull) + .filter(excluded.negate()) + .distinct() + .collect(collectingAndThen(toList(), Collections::unmodifiableList)); + } + + Stream<UMLRTConnector> allConnectorsOfPorts() { + return getRedefinitionChain().stream() + .map(UMLRTCapsulePartImpl.class::cast) + .flatMap(UMLRTCapsulePartImpl::getEnds) + .map(Element::getOwner) + .map(Connector.class::cast) + .map(UMLRTConnector::getInstance) + .filter(Objects::nonNull); + } + + Stream<ConnectorEnd> getEnds() { + CacheAdapter cache = CacheAdapter.getCacheAdapter(toUML()); + return cache.getNonNavigableInverseReferences(toUML()).stream() + .filter(s -> s.getEStructuralFeature() == UMLPackage.Literals.CONNECTOR_END__PART_WITH_PORT) + .map(EStructuralFeature.Setting::getEObject) + .map(ConnectorEnd.class::cast); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsule getCapsule() { + Class class_ = toUML().getClass_(); + return (class_ == null) ? null : UMLRTCapsule.getInstance(class_); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE_PART__KIND: + return getKind(); + case UMLRTUMLRTPackage.CAPSULE_PART__OPTIONAL: + return isOptional(); + case UMLRTUMLRTPackage.CAPSULE_PART__REDEFINED_PART: + return getRedefinedPart(); + case UMLRTUMLRTPackage.CAPSULE_PART__CAPSULE: + return getCapsule(); + case UMLRTUMLRTPackage.CAPSULE_PART__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE_PART__KIND: + setKind((UMLRTCapsulePartKind) newValue); + return; + case UMLRTUMLRTPackage.CAPSULE_PART__OPTIONAL: + setOptional((Boolean) newValue); + return; + case UMLRTUMLRTPackage.CAPSULE_PART__TYPE: + setType((UMLRTCapsule) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE_PART__KIND: + setKind(KIND_EDEFAULT); + return; + case UMLRTUMLRTPackage.CAPSULE_PART__OPTIONAL: + setOptional(OPTIONAL_EDEFAULT); + return; + case UMLRTUMLRTPackage.CAPSULE_PART__TYPE: + setType((UMLRTCapsule) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.CAPSULE_PART__REDEFINED_ELEMENT: + return isSetRedefinedElement(); + case UMLRTUMLRTPackage.CAPSULE_PART__REDEFINITION_CONTEXT: + return isSetRedefinitionContext(); + case UMLRTUMLRTPackage.CAPSULE_PART__KIND: + return getKind() != KIND_EDEFAULT; + case UMLRTUMLRTPackage.CAPSULE_PART__OPTIONAL: + return isOptional() != OPTIONAL_EDEFAULT; + case UMLRTUMLRTPackage.CAPSULE_PART__REDEFINED_PART: + return getRedefinedPart() != null; + case UMLRTUMLRTPackage.CAPSULE_PART__CAPSULE: + return getCapsule() != null; + case UMLRTUMLRTPackage.CAPSULE_PART__TYPE: + return getType() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinedElement() { + return super.isSetRedefinedElement() + || eIsSet(UMLRTUMLRTPackage.CAPSULE_PART__REDEFINED_PART); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinitionContext() { + return super.isSetRedefinitionContext() + || eIsSet(UMLRTUMLRTPackage.CAPSULE_PART__CAPSULE); + } + +} // UMLRTCapsulePartImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTClassifierImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTClassifierImpl.java new file mode 100644 index 0000000..ee40016 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTClassifierImpl.java
@@ -0,0 +1,303 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; + +import org.eclipse.emf.common.util.BasicEList.UnmodifiableEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.uml2.common.util.CacheAdapter; +import org.eclipse.uml2.common.util.DerivedUnionEObjectEList; +import org.eclipse.uml2.uml.Classifier; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Generalization; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Classifier</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTClassifierImpl#getGeneral <em>General</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTClassifierImpl#getSpecifics <em>Specific</em>}</li> + * </ul> + * + * @generated + */ +public abstract class UMLRTClassifierImpl extends UMLRTNamedElementImpl implements UMLRTClassifier { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTClassifierImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.CLASSIFIER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTClassifier> getSpecifics() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTClassifier> specifics = (List<UMLRTClassifier>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC); + if (specifics == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC, specifics = new DerivedUnionEObjectEList<>(UMLRTClassifier.class, this, UMLRTUMLRTPackage.CLASSIFIER__SPECIFIC, null)); + } + return specifics; + } + return new DerivedUnionEObjectEList<>(UMLRTClassifier.class, this, UMLRTUMLRTPackage.CLASSIFIER__SPECIFIC, null); + } + + static <C extends Classifier> Stream<C> specifics(C class_, Class<C> metaclass) { + Stream<Generalization> generalizations = class_.getTargetDirectedRelationships().stream() + .filter(Generalization.class::isInstance).map(Generalization.class::cast); + Stream<C> result = generalizations.map(Generalization::getSpecific) + .filter(metaclass::isInstance).map(metaclass::cast); + return result; + } + + static <C extends Classifier> Set<C> collectSpecificClosure(C class_, Class<C> metaclass, Set<C> result) { + specifics(class_, metaclass).forEach(classifier -> { + if (result.add(classifier)) { + collectSpecificClosure(classifier, metaclass, result); + } + }); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTClassifier getSpecific(String name) { + return getSpecific(name, false, null); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTClassifier getSpecific(String name, boolean ignoreCase, EClass eClass) { + specificLoop: for (UMLRTClassifier specific : getSpecifics()) { + if (eClass != null && !eClass.isInstance(specific)) { + continue specificLoop; + } + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(specific.getName()) : name.equals(specific.getName()))) { + continue specificLoop; + } + return specific; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTClassifier getGeneral() { + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Classifier toUML() { + return (Classifier) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPackage getPackage() { + return UMLRTPackage.getInstance(toUML().getNearestPackage()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<? extends UMLRTClassifier> getAncestry() { + throw new UnsupportedOperationException(); + } + + static <C extends Classifier> List<C> ancestry(C class_, Class<C> metaclass) { + Set<C> result = new LinkedHashSet<>(); + for (C next = class_; next != null;) { + if (!result.add(next)) { + // Cycle + break; + } + List<Classifier> generals = next.getGenerals(); + if (!generals.isEmpty() && metaclass.isInstance(generals.get(0))) { + next = metaclass.cast(generals.get(0)); + } else { + next = null; + } + } + return new UnmodifiableEList.FastCompare<>(result); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Stream<? extends UMLRTClassifier> getHierarchy() { + throw new UnsupportedOperationException(); + } + + static <C extends Classifier> Stream<C> hierarchy(C class_, Class<C> metaclass) { + return Stream.concat(Stream.of(class_), + collectSpecificClosure(class_, metaclass, new LinkedHashSet<>()).stream()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isSuperTypeOf(UMLRTClassifier classifier) { + return (classifier != null) && classifier.getAncestry().contains(this); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setGeneral(UMLRTClassifier general) { + throw new UnsupportedOperationException(); + } + + protected static <C extends Classifier> void setGeneral(C specific, C general) { + EList<Classifier> generals = specific.getGenerals(); + if (general == null) { + new ArrayList<>(specific.getGeneralizations()).forEach(Element::destroy); + } else if (generals.isEmpty()) { + generals.add(general); + } else if (generals.get(0) != general) { + generals.set(0, general); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.CLASSIFIER__GENERAL: + return getGeneral(); + case UMLRTUMLRTPackage.CLASSIFIER__SPECIFIC: + return getSpecifics(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.CLASSIFIER__GENERAL: + return isSetGeneral(); + case UMLRTUMLRTPackage.CLASSIFIER__SPECIFIC: + return isSetSpecifics(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isSetGeneral() { + return false; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isSetSpecifics() { + return false; + } + +} // UMLRTClassifierImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTConnectorImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTConnectorImpl.java new file mode 100644 index 0000000..ec79000 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTConnectorImpl.java
@@ -0,0 +1,550 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTConnector; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; +import org.eclipse.uml2.uml.Connector; +import org.eclipse.uml2.uml.ConnectorEnd; +import org.eclipse.uml2.uml.Port; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Connector</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getRedefinedElement <em>Redefined Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getRedefinitionContext <em>Redefinition Context</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getRedefinedConnector <em>Redefined Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getCapsule <em>Capsule</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getSource <em>Source</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getSourcePartWithPort <em>Source Part With Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getSourceReplicationFactor <em>Source Replication Factor</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getTarget <em>Target</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getTargetPartWithPort <em>Target Part With Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTConnectorImpl#getTargetReplicationFactor <em>Target Replication Factor</em>}</li> + * </ul> + * + * @generated + */ +public class UMLRTConnectorImpl extends UMLRTNamedElementImpl implements UMLRTConnector { + /** + * The default value of the '{@link #getSourceReplicationFactor() <em>Source Replication Factor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getSourceReplicationFactor() + * @generated + * @ordered + */ + protected static final int SOURCE_REPLICATION_FACTOR_EDEFAULT = 0; + /** + * The default value of the '{@link #getTargetReplicationFactor() <em>Target Replication Factor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getTargetReplicationFactor() + * @generated + * @ordered + */ + protected static final int TARGET_REPLICATION_FACTOR_EDEFAULT = 0; + static final FacadeType<Connector, RTConnector, UMLRTConnectorImpl> TYPE = new FacadeType<>( + UMLRTConnectorImpl.class, + UMLPackage.Literals.CONNECTOR, + UMLRealTimePackage.Literals.RT_CONNECTOR, + UMLRTConnectorImpl::getInstance, + connector -> (UMLRTConnectorImpl) connector.getRedefinedConnector(), + stereo -> new UMLRTConnectorImpl().init(stereo.getBase_Connector(), stereo)); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTConnectorImpl() { + super(); + } + + /** + * Obtains the canonical instance of the connector façade for a connector. + * + * @param connector + * a connector in the UML model + * + * @return its connector façade, or {@code null} if the connector is not a valid UML-RT connector + */ + public static UMLRTConnectorImpl getInstance(Connector connector) { + return getFacade(connector, TYPE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.CONNECTOR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinedElement() { + UMLRTConnector redefinedConnector = getRedefinedConnector(); + if (redefinedConnector != null) { + return redefinedConnector; + } + return super.getRedefinedElement(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinitionContext() { + UMLRTCapsule capsule = getCapsule(); + if (capsule != null) { + return capsule; + } + return super.getRedefinitionContext(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTConnector getRedefinedConnector() { + UMLRTConnector result; + + if (toUML() instanceof InternalUMLRTElement) { + Connector superConnector = (Connector) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); + result = UMLRTConnector.getInstance(superConnector); + } else { + UMLRTNamedElement redef = super.getRedefinedElement(); + result = (redef instanceof UMLRTConnector) ? (UMLRTConnector) redef : null; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsule getCapsule() { + return UMLRTCapsule.getInstance((org.eclipse.uml2.uml.Class) toUML().getNamespace()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPort getSource() { + ConnectorEnd sourceEnd = umlEnd(0); + return resolvePort(sourceEnd); + } + + ConnectorEnd umlEnd(int index) { + ConnectorEnd result = null; + EList<ConnectorEnd> ends = toUML().getEnds(); + + if (ends.size() > index) { + result = ends.get(index); + } + + return result; + } + + private UMLRTPort resolvePort(ConnectorEnd end) { + Port uml = (end == null) + ? null + : (end.getRole() instanceof Port) + ? (Port) end.getRole() + : null; + UMLRTPort result = (uml == null) ? null : UMLRTPort.getInstance(uml); + + if ((result != null) && (result.getCapsule() != getCapsule())) { + // Resolve the inherited port in my capsule + UMLRTPort inherited = result; + result = getCapsule().getPorts(true).stream() + .filter(p -> p.redefines(inherited)) + .findAny() + .orElse(result); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setSource(UMLRTPort newSource) { + ConnectorEnd sourceEnd = umlEnd(0); + if (sourceEnd == null) { + throw new IllegalStateException("no source end"); //$NON-NLS-1$ + } + sourceEnd.setRole((newSource == null) ? null : newSource.toUML()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsulePart getSourcePartWithPort() { + ConnectorEnd sourceEnd = umlEnd(0); + return resolvePartWithPort(sourceEnd); + } + + private UMLRTCapsulePart resolvePartWithPort(ConnectorEnd end) { + UMLRTCapsulePart result = null; + + if ((end != null) && (end.getPartWithPort() != null)) { + result = UMLRTCapsulePart.getInstance(end.getPartWithPort()); + + if ((result != null) && (result.getCapsule() != getCapsule())) { + // Resolve the inherited port in my capsule + UMLRTCapsulePart inherited = result; + result = getCapsule().getCapsuleParts(true).stream() + .filter(p -> p.redefines(inherited)) + .findAny() + .orElse(result); + } + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setSourcePartWithPort(UMLRTCapsulePart newSourcePartWithPort) { + ConnectorEnd sourceEnd = umlEnd(0); + if (sourceEnd == null) { + throw new IllegalStateException("no source end"); //$NON-NLS-1$ + } + sourceEnd.setPartWithPort((newSourcePartWithPort == null) ? null : newSourcePartWithPort.toUML()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public int getSourceReplicationFactor() { + ConnectorEnd sourceEnd = umlEnd(0); + return UMLRTReplicatedElementImpl.getReplicationFactor( + (sourceEnd == null) ? null : sourceEnd.getUpperValue()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setSourceReplicationFactor(int newSourceReplicationFactor) { + ConnectorEnd sourceEnd = umlEnd(0); + if (sourceEnd == null) { + throw new IllegalStateException("no source end"); //$NON-NLS-1$ + } + UMLRTReplicatedElementImpl.setReplicationFactor(sourceEnd, newSourceReplicationFactor); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPort getTarget() { + ConnectorEnd targetEnd = umlEnd(1); + return resolvePort(targetEnd); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setTarget(UMLRTPort newTarget) { + ConnectorEnd targetEnd = umlEnd(1); + if (targetEnd == null) { + throw new IllegalStateException("no target end"); //$NON-NLS-1$ + } + targetEnd.setRole((newTarget == null) ? null : newTarget.toUML()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsulePart getTargetPartWithPort() { + ConnectorEnd targetEnd = umlEnd(1); + return resolvePartWithPort(targetEnd); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setTargetPartWithPort(UMLRTCapsulePart newTargetPartWithPort) { + ConnectorEnd targetEnd = umlEnd(1); + if (targetEnd == null) { + throw new IllegalStateException("no target end"); //$NON-NLS-1$ + } + targetEnd.setPartWithPort((newTargetPartWithPort == null) ? null : newTargetPartWithPort.toUML()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public int getTargetReplicationFactor() { + ConnectorEnd targetEnd = umlEnd(1); + return UMLRTReplicatedElementImpl.getReplicationFactor( + (targetEnd == null) ? null : targetEnd.getUpperValue()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setTargetReplicationFactor(int newTargetReplicationFactor) { + ConnectorEnd targetEnd = umlEnd(1); + if (targetEnd == null) { + throw new IllegalStateException("no target end"); //$NON-NLS-1$ + } + UMLRTReplicatedElementImpl.setReplicationFactor(targetEnd, newTargetReplicationFactor); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Connector toUML() { + return (Connector) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.CONNECTOR__REDEFINED_CONNECTOR: + return getRedefinedConnector(); + case UMLRTUMLRTPackage.CONNECTOR__CAPSULE: + return getCapsule(); + case UMLRTUMLRTPackage.CONNECTOR__SOURCE: + return getSource(); + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_PART_WITH_PORT: + return getSourcePartWithPort(); + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_REPLICATION_FACTOR: + return getSourceReplicationFactor(); + case UMLRTUMLRTPackage.CONNECTOR__TARGET: + return getTarget(); + case UMLRTUMLRTPackage.CONNECTOR__TARGET_PART_WITH_PORT: + return getTargetPartWithPort(); + case UMLRTUMLRTPackage.CONNECTOR__TARGET_REPLICATION_FACTOR: + return getTargetReplicationFactor(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.CONNECTOR__SOURCE: + setSource((UMLRTPort) newValue); + return; + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_PART_WITH_PORT: + setSourcePartWithPort((UMLRTCapsulePart) newValue); + return; + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_REPLICATION_FACTOR: + setSourceReplicationFactor((Integer) newValue); + return; + case UMLRTUMLRTPackage.CONNECTOR__TARGET: + setTarget((UMLRTPort) newValue); + return; + case UMLRTUMLRTPackage.CONNECTOR__TARGET_PART_WITH_PORT: + setTargetPartWithPort((UMLRTCapsulePart) newValue); + return; + case UMLRTUMLRTPackage.CONNECTOR__TARGET_REPLICATION_FACTOR: + setTargetReplicationFactor((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.CONNECTOR__SOURCE: + setSource((UMLRTPort) null); + return; + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_PART_WITH_PORT: + setSourcePartWithPort((UMLRTCapsulePart) null); + return; + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_REPLICATION_FACTOR: + setSourceReplicationFactor(SOURCE_REPLICATION_FACTOR_EDEFAULT); + return; + case UMLRTUMLRTPackage.CONNECTOR__TARGET: + setTarget((UMLRTPort) null); + return; + case UMLRTUMLRTPackage.CONNECTOR__TARGET_PART_WITH_PORT: + setTargetPartWithPort((UMLRTCapsulePart) null); + return; + case UMLRTUMLRTPackage.CONNECTOR__TARGET_REPLICATION_FACTOR: + setTargetReplicationFactor(TARGET_REPLICATION_FACTOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.CONNECTOR__REDEFINED_ELEMENT: + return isSetRedefinedElement(); + case UMLRTUMLRTPackage.CONNECTOR__REDEFINITION_CONTEXT: + return isSetRedefinitionContext(); + case UMLRTUMLRTPackage.CONNECTOR__REDEFINED_CONNECTOR: + return getRedefinedConnector() != null; + case UMLRTUMLRTPackage.CONNECTOR__CAPSULE: + return getCapsule() != null; + case UMLRTUMLRTPackage.CONNECTOR__SOURCE: + return getSource() != null; + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_PART_WITH_PORT: + return getSourcePartWithPort() != null; + case UMLRTUMLRTPackage.CONNECTOR__SOURCE_REPLICATION_FACTOR: + return getSourceReplicationFactor() != SOURCE_REPLICATION_FACTOR_EDEFAULT; + case UMLRTUMLRTPackage.CONNECTOR__TARGET: + return getTarget() != null; + case UMLRTUMLRTPackage.CONNECTOR__TARGET_PART_WITH_PORT: + return getTargetPartWithPort() != null; + case UMLRTUMLRTPackage.CONNECTOR__TARGET_REPLICATION_FACTOR: + return getTargetReplicationFactor() != TARGET_REPLICATION_FACTOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinedElement() { + return super.isSetRedefinedElement() + || eIsSet(UMLRTUMLRTPackage.CONNECTOR__REDEFINED_CONNECTOR); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinitionContext() { + return super.isSetRedefinitionContext() + || eIsSet(UMLRTUMLRTPackage.CONNECTOR__CAPSULE); + } + +} // UMLRTConnectorImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTModel.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTModelImpl.java similarity index 81% rename from plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTModel.java rename to plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTModelImpl.java index e42432e..849052f 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTModel.java +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTModelImpl.java
@@ -1,17 +1,16 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * +/** + * Copyright (c) 2017 Christian W. Damus and others. + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; import java.util.ArrayList; @@ -21,6 +20,8 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTModel; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtElement; import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.util.ExtensionResource; import org.eclipse.uml2.uml.Package; @@ -28,14 +29,13 @@ import org.eclipse.uml2.uml.resource.UMLResource; /** - * A façade for UML {@link Package} elements that represent UML-RT packages, - * providing a view of the element more in keeping with the UML-RT semantics. + * Implementation of the model façade. */ -public class UMLRTModel { +public class UMLRTModelImpl implements UMLRTModel { private final Resource resource; - protected UMLRTModel(Resource resource) { + protected UMLRTModelImpl(Resource resource) { super(); this.resource = resource; @@ -49,7 +49,7 @@ * @param resource * an UML resource containing an UML-RT model * - * @return its model façade, or {@code null} if the reosurce is not a valid UML-RT resource + * @return its model façade, or {@code null} if the resource is not a valid UML-RT resource */ public static UMLRTModel getInstance(Resource resource) { FacadeAdapter adapter = null; @@ -57,7 +57,7 @@ if (resource instanceof UMLResource) { adapter = (FacadeAdapter) EcoreUtil.getExistingAdapter(resource, UMLRTModel.class); if (adapter == null) { - adapter = new UMLRTModel(resource).new FacadeAdapter(); + adapter = new UMLRTModelImpl(resource).new FacadeAdapter(); resource.eAdapters().add(adapter); } } @@ -88,6 +88,7 @@ * * @return the UML representation */ + @Override public Resource toUML() { return resource; } @@ -97,6 +98,7 @@ * * @return my URI */ + @Override public URI getURI() { return resource.getURI(); } @@ -106,6 +108,7 @@ * * @return the root package */ + @Override public UMLRTPackage getRoot() { Package result = (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE); return UMLRTPackage.getInstance(result); @@ -126,7 +129,7 @@ } UMLRTModel getModel() { - return UMLRTModel.this; + return UMLRTModelImpl.this; } @Override
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTNamedElementImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTNamedElementImpl.java new file mode 100644 index 0000000..cd35193 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTNamedElementImpl.java
@@ -0,0 +1,765 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import static java.util.stream.Collectors.collectingAndThen; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTFactory; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTModel; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtUMLExtPackage; +import org.eclipse.uml2.common.util.CacheAdapter; +import org.eclipse.uml2.common.util.DerivedUnionEObjectEList; +import org.eclipse.uml2.common.util.UML2Util; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Namespace; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Named Element</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getRedefinedElement <em>Redefined Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getRedefinitionContext <em>Redefinition Context</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getRedefinableElements <em>Redefinable Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getModel <em>Model</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getInheritanceKind <em>Inheritance Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#isInherited <em>Is Inherited</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#isVirtualRedefinition <em>Is Virtual Redefinition</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#isRedefinition <em>Is Redefinition</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#isExcluded <em>Is Excluded</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getInheritedElement <em>Inherited Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getRootDefinition <em>Root Definition</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTNamedElementImpl#getExcludedElements <em>Excluded Element</em>}</li> + * </ul> + * + * @generated + */ +public abstract class UMLRTNamedElementImpl extends FacadeObjectImpl implements UMLRTNamedElement { + /** + * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + protected int fFlags = 0; + + /** + * The default value of the '{@link #getModel() <em>Model</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getModel() + * @generated + * @ordered + */ + protected static final UMLRTModel MODEL_EDEFAULT = null; + + /** + * The default value of the '{@link #getInheritanceKind() <em>Inheritance Kind</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getInheritanceKind() + * @generated + * @ordered + */ + protected static final UMLRTInheritanceKind INHERITANCE_KIND_EDEFAULT = UMLRTInheritanceKind.INHERITED; + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The default value of the '{@link #isInherited() <em>Is Inherited</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isInherited() + * @generated + * @ordered + */ + protected static final boolean IS_INHERITED_EDEFAULT = false; + + /** + * The default value of the '{@link #isVirtualRedefinition() <em>Is Virtual Redefinition</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isVirtualRedefinition() + * @generated + * @ordered + */ + protected static final boolean IS_VIRTUAL_REDEFINITION_EDEFAULT = false; + + /** + * The default value of the '{@link #isRedefinition() <em>Is Redefinition</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isRedefinition() + * @generated + * @ordered + */ + protected static final boolean IS_REDEFINITION_EDEFAULT = false; + + /** + * The default value of the '{@link #isExcluded() <em>Is Excluded</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isExcluded() + * @generated + * @ordered + */ + protected static final boolean IS_EXCLUDED_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTNamedElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.NAMED_ELEMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinedElement() { + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinitionContext() { + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTNamedElement> getRedefinableElements() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTNamedElement> redefinableElements = (List<UMLRTNamedElement>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + if (redefinableElements == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT, + redefinableElements = new DerivedUnionEObjectEList<>(UMLRTNamedElement.class, this, UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINABLE_ELEMENT, null)); + } + return redefinableElements; + } + return new DerivedUnionEObjectEList<>(UMLRTNamedElement.class, this, UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINABLE_ELEMENT, null); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinableElement(String name) { + return getRedefinableElement(name, false, null); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinableElement(String name, boolean ignoreCase, EClass eClass) { + redefinableElementLoop: for (UMLRTNamedElement redefinableElement : getRedefinableElements()) { + if (eClass != null && !eClass.isInstance(redefinableElement)) { + continue redefinableElementLoop; + } + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(redefinableElement.getName()) : name.equals(redefinableElement.getName()))) { + continue redefinableElementLoop; + } + return redefinableElement; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTModel getModel() { + return UMLRTModel.getInstance(toUML().eResource()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTInheritanceKind getInheritanceKind() { + return UMLRTInheritanceKind.of(toUML()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getName() { + return toUML().getName(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setName(String newName) { + toUML().setName(newName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isInherited() { + return getInheritanceKind() != UMLRTInheritanceKind.NONE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isVirtualRedefinition() { + return getInheritanceKind() == UMLRTInheritanceKind.INHERITED; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isRedefinition() { + return getInheritanceKind() == UMLRTInheritanceKind.REDEFINED; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isExcluded() { + return getInheritanceKind() == UMLRTInheritanceKind.EXCLUDED; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTNamedElement getInheritedElement() { + UMLRTNamedElement result = getRedefinedElement(); + + if ((result != null) && result.isVirtualRedefinition()) { + result = result.getInheritedElement(); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTNamedElement getRootDefinition() { + // Start with the assumption that I am the root + UMLRTNamedElement result = this; + + for (UMLRTNamedElement inh = result.getInheritedElement(); (inh != null); inh = result.getInheritedElement()) { + result = inh; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTNamedElement> getExcludedElements() { + return excludedElements().collect( + collectingAndThen(Collectors.<UMLRTNamedElement> toList(), + list -> elist(UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__EXCLUDED_ELEMENT, list))); + } + + protected Stream<? extends UMLRTNamedElement> excludedElements() { + Stream<UMLRTNamedElement> result = Stream.empty(); + + NamedElement uml = toUML(); + if ((uml instanceof Namespace) && (uml instanceof InternalUMLRTElement)) { + @SuppressWarnings("unchecked") + List<NamedElement> exclusions = (List<NamedElement>) uml.eGet(ExtUMLExtPackage.Literals.NAMESPACE__EXCLUDED_MEMBER); + result = exclusions.stream() + .map(UMLRTFactory::create) + .filter(Objects::nonNull); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getExcludedElement(String name) { + return getExcludedElement(name, false, null); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getExcludedElement(String name, boolean ignoreCase, EClass eClass) { + excludedElementLoop: for (UMLRTNamedElement excludedElement : getExcludedElements()) { + if (eClass != null && !eClass.isInstance(excludedElement)) { + continue excludedElementLoop; + } + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(excludedElement.getName()) : name.equals(excludedElement.getName()))) { + continue excludedElementLoop; + } + return excludedElement; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public NamedElement toUML() { + return (NamedElement) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean redefines(UMLRTNamedElement element) { + boolean result = false; + + for (UMLRTNamedElement redefined = this; !result && (redefined != null); redefined = redefined.getRedefinedElement()) { + result = redefined == element; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @SuppressWarnings("unchecked") + @Override + public <T extends UMLRTNamedElement> T getRedefinitionOf(T element) { + return (T) getRedefinableElements().stream() + .filter(e -> e.redefines(element)) + .findAny().orElse(null); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTNamedElement> getRedefinitionChain() { + List<UMLRTNamedElement> result; + + UMLRTNamedElement redef = getRedefinedElement(); + + if (redef == null) { + result = ECollections.singletonEList(this); + } else { + result = new ArrayList<>(3); + result.add(this); + for (; redef != null; redef = redef.getRedefinedElement()) { + result.add(redef); + } + result = ECollections.unmodifiableEList(result); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public <T extends UMLRTNamedElement> T getExcludedElement(String name, Class<T> type) { + return excludedElements() + .filter(type::isInstance) + .filter(e -> Objects.equals(e.getName(), name)) + .map(type::cast) + .findAny().orElse(null); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean exclude() { + boolean result = false; + + NamedElement uml = toUML(); + if (uml instanceof InternalUMLRTElement) { + result = ((InternalUMLRTElement) uml).rtExclude(); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean reinherit() { + boolean result = false; + + NamedElement uml = toUML(); + if (uml instanceof InternalUMLRTElement) { + result = ((InternalUMLRTElement) uml).rtReinherit(); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void reify() { + NamedElement uml = toUML(); + if (uml instanceof InternalUMLRTElement) { + InternalUMLRTElement internal = (InternalUMLRTElement) uml; + if (internal.rtIsVirtual()) { + internal.rtReify(); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void destroy() { + super.destroy(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINED_ELEMENT: + return getRedefinedElement(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINITION_CONTEXT: + return getRedefinitionContext(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINABLE_ELEMENT: + return getRedefinableElements(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__MODEL: + return getModel(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__INHERITANCE_KIND: + return getInheritanceKind(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__NAME: + return getName(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_INHERITED: + return isInherited(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION: + return isVirtualRedefinition(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_REDEFINITION: + return isRedefinition(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_EXCLUDED: + return isExcluded(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__INHERITED_ELEMENT: + return getInheritedElement(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__ROOT_DEFINITION: + return getRootDefinition(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__EXCLUDED_ELEMENT: + return getExcludedElements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.NAMED_ELEMENT__NAME: + setName((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.NAMED_ELEMENT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINED_ELEMENT: + return isSetRedefinedElement(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINITION_CONTEXT: + return isSetRedefinitionContext(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__REDEFINABLE_ELEMENT: + return isSetRedefinableElements(); + case UMLRTUMLRTPackage.NAMED_ELEMENT__MODEL: + return MODEL_EDEFAULT == null ? getModel() != null : !MODEL_EDEFAULT.equals(getModel()); + case UMLRTUMLRTPackage.NAMED_ELEMENT__INHERITANCE_KIND: + return getInheritanceKind() != INHERITANCE_KIND_EDEFAULT; + case UMLRTUMLRTPackage.NAMED_ELEMENT__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_INHERITED: + return isInherited() != IS_INHERITED_EDEFAULT; + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION: + return isVirtualRedefinition() != IS_VIRTUAL_REDEFINITION_EDEFAULT; + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_REDEFINITION: + return isRedefinition() != IS_REDEFINITION_EDEFAULT; + case UMLRTUMLRTPackage.NAMED_ELEMENT__IS_EXCLUDED: + return isExcluded() != IS_EXCLUDED_EDEFAULT; + case UMLRTUMLRTPackage.NAMED_ELEMENT__INHERITED_ELEMENT: + return getInheritedElement() != null; + case UMLRTUMLRTPackage.NAMED_ELEMENT__ROOT_DEFINITION: + return getRootDefinition() != null; + case UMLRTUMLRTPackage.NAMED_ELEMENT__EXCLUDED_ELEMENT: + return !getExcludedElements().isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * Creates a new instance of the specified Ecore class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param eClass + * The Ecore class of the instance to create. + * @return The new instance. + * @generated + */ + protected EObject create(EClass eClass) { + return EcoreUtil.create(eClass); + } + + /** + * Retrieves the cache adapter for this '<em><b>Named Element</b></em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return The cache adapter for this '<em><b>Named Element</b></em>'. + * @generated NOT + */ + protected CacheAdapter getCacheAdapter() { + return CacheAdapter.getCacheAdapter(toUML()); + } + + protected static String initialLower(String name) { + String result; + + if (UML2Util.isEmpty(name)) { + result = name; + } else { + StringBuilder buf = new StringBuilder(name.length()); + buf.append(Character.toLowerCase(name.charAt(0))); + buf.append(name, 1, name.length()); + result = buf.toString(); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isSetRedefinedElement() { + return false; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isSetRedefinitionContext() { + return false; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isSetRedefinableElements() { + return false; + } + + @Override + public String toString() { + return String.format("%s(name=%s)", eClass().getName(), getName()); //$NON-NLS-1$ + } + +} // UMLRTNamedElementImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTPackageImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTPackageImpl.java new file mode 100644 index 0000000..e107684 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTPackageImpl.java
@@ -0,0 +1,423 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.Capsule; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.ProtocolContainer; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.Collaboration; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.util.UMLUtil; +import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Package</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl#getNestedPackages <em>Nested Package</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl#getNestingPackage <em>Nesting Package</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl#getCapsules <em>Capsule</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPackageImpl#getProtocols <em>Protocol</em>}</li> + * </ul> + * + * @generated + */ +public class UMLRTPackageImpl extends UMLRTNamedElementImpl implements UMLRTPackage { + + static final FacadeType<Package, EObject, UMLRTPackageImpl> TYPE = new FacadeType<>( + UMLRTPackageImpl.class, + UMLPackage.Literals.PACKAGE, + null, + UMLRTPackageImpl::getInstance, + null, + BasicFacadeAdapter.class, + null); + + private static final FacadeReference<Class, Capsule, UMLRTCapsule, UMLRTCapsuleImpl> CAPSULE_REFERENCE = new FacadeReference<>( + UMLRTCapsuleImpl.TYPE, + UMLRTUMLRTPackage.Literals.PACKAGE__CAPSULE, + UMLRTCapsule.class, + UMLPackage.Literals.PACKAGE__OWNED_TYPE, + null, + UMLPackage.Literals.CLASS); + + private static final FacadeReference<Package, EObject, UMLRTPackage, UMLRTPackageImpl> NESTED_PACKAGE_REFERENCE = new FacadeReference<>( + UMLRTPackageImpl.TYPE, + UMLRTUMLRTPackage.Literals.PACKAGE__NESTED_PACKAGE, + UMLRTPackage.class, + UMLPackage.Literals.PACKAGE__NESTED_PACKAGE, + null, + UMLPackage.Literals.PACKAGE); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTPackageImpl() { + super(); + } + + /** + * Obtains the canonical instance of the package façade for a package. + * + * @param package_ + * a package in the UML model + * + * @return its package façade, or {@code null} if the package is not a valid UML-RT package + * (for example, if it is a protocol-container package or does not + * have or inherit an application of the UML-RT profile) + */ + public static UMLRTPackageImpl getInstance(Package package_) { + BasicFacadeAdapter<UMLRTPackageImpl> adapter = null; + + if ((package_ != null) && isRTPackage(package_)) { + adapter = TYPE.getAdapter(package_); + if ((adapter == null) && !isProtocolContainer(package_)) { + adapter = new UMLRTPackageImpl().init(package_, null).new BasicFacadeAdapter<>(); + package_.eAdapters().add(adapter); + } + } + + return (adapter == null) ? null : adapter.getFacade(); + } + + static boolean isRTPackage(Package package_) { + return !(package_ instanceof Profile) + && (package_.getAppliedProfile("UMLRealTime", true) != null); + } + + static boolean isProtocolContainer(Package package_) { + return getProtocolContainer(package_) != null; + } + + static ProtocolContainer getProtocolContainer(Package package_) { + return UMLUtil.getStereotypeApplication(package_, ProtocolContainer.class); + } + + static Collaboration getProtocol(Package protocolContainer) { + return (Collaboration) protocolContainer.getMember( + protocolContainer.getName(), false, UMLPackage.Literals.COLLABORATION); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.PACKAGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTPackage> getNestedPackages() { + return getFacades(NESTED_PACKAGE_REFERENCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTPackage getNestedPackage(String name) { + return getNestedPackage(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTPackage getNestedPackage(String name, boolean ignoreCase) { + nestedPackageLoop: for (UMLRTPackage nestedPackage : getNestedPackages()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(nestedPackage.getName()) : name.equals(nestedPackage.getName()))) { + continue nestedPackageLoop; + } + return nestedPackage; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPackage getNestingPackage() { + Package result = toUML().getNestingPackage(); + return (result == null) ? null : getInstance(result); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTCapsule> getCapsules() { + return getFacades(CAPSULE_REFERENCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsule getCapsule(String name) { + return getCapsule(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsule getCapsule(String name, boolean ignoreCase) { + capsuleLoop: for (UMLRTCapsule capsule : getCapsules()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(capsule.getName()) : name.equals(capsule.getName()))) { + continue capsuleLoop; + } + return capsule; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocol> getProtocols() { + return toUML().getNestedPackages().stream() + .filter(UMLRTPackageImpl::isProtocolContainer) + .map(UMLRTPackageImpl::getProtocol) + .map(UMLRTProtocol::getInstance) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocol getProtocol(String name) { + return getProtocol(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocol getProtocol(String name, boolean ignoreCase) { + protocolLoop: for (UMLRTProtocol protocol : getProtocols()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(protocol.getName()) : name.equals(protocol.getName()))) { + continue protocolLoop; + } + return protocol; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public org.eclipse.uml2.uml.Package toUML() { + return (Package) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPackage createNestedPackage(String name) { + return create(NESTED_PACKAGE_REFERENCE, name); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsule createCapsule(String name) { + return ((UMLRTCapsuleImpl) create(CAPSULE_REFERENCE, name)).initCapsule(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocol createProtocol(String name) { + // Protocol container + Package protocolContainer = toUML().createNestedPackage(name); + StereotypeApplicationHelper.getInstance(protocolContainer).applyStereotype(protocolContainer, UMLRealTimePackage.Literals.PROTOCOL_CONTAINER); + + // Protocol collaboration + Collaboration result = (Collaboration) protocolContainer.createOwnedType(name, UMLPackage.Literals.COLLABORATION); + result.setName(name); + UMLRTProtocolImpl.TYPE.applyStereotype(result); + + return Optional.ofNullable(UMLRTProtocolImpl.getInstance(result)) + .map(UMLRTProtocolImpl::initContents) + .orElse(null); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.PACKAGE__NESTED_PACKAGE: + return getNestedPackages(); + case UMLRTUMLRTPackage.PACKAGE__NESTING_PACKAGE: + return getNestingPackage(); + case UMLRTUMLRTPackage.PACKAGE__CAPSULE: + return getCapsules(); + case UMLRTUMLRTPackage.PACKAGE__PROTOCOL: + return getProtocols(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.PACKAGE__NESTED_PACKAGE: + getNestedPackages().clear(); + getNestedPackages().addAll((Collection<? extends UMLRTPackage>) newValue); + return; + case UMLRTUMLRTPackage.PACKAGE__CAPSULE: + getCapsules().clear(); + getCapsules().addAll((Collection<? extends UMLRTCapsule>) newValue); + return; + case UMLRTUMLRTPackage.PACKAGE__PROTOCOL: + getProtocols().clear(); + getProtocols().addAll((Collection<? extends UMLRTProtocol>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PACKAGE__NESTED_PACKAGE: + getNestedPackages().clear(); + return; + case UMLRTUMLRTPackage.PACKAGE__CAPSULE: + getCapsules().clear(); + return; + case UMLRTUMLRTPackage.PACKAGE__PROTOCOL: + getProtocols().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PACKAGE__NESTED_PACKAGE: + return !getNestedPackages().isEmpty(); + case UMLRTUMLRTPackage.PACKAGE__NESTING_PACKAGE: + return getNestingPackage() != null; + case UMLRTUMLRTPackage.PACKAGE__CAPSULE: + return !getCapsules().isEmpty(); + case UMLRTUMLRTPackage.PACKAGE__PROTOCOL: + return !getProtocols().isEmpty(); + } + return super.eIsSet(featureID); + } + +} // UMLRTPackageImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTPortImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTPortImpl.java new file mode 100644 index 0000000..169c4cb --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTPortImpl.java
@@ -0,0 +1,1239 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import static java.util.stream.Collectors.collectingAndThen; +import static java.util.stream.Collectors.toList; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.PortRegistrationType; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTPort; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; +import org.eclipse.uml2.common.util.CacheAdapter; +import org.eclipse.uml2.common.util.DerivedUnionEObjectEList; +import org.eclipse.uml2.uml.Collaboration; +import org.eclipse.uml2.uml.Connector; +import org.eclipse.uml2.uml.ConnectorEnd; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Port; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.VisibilityKind; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Port</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getRedefinedElement <em>Redefined Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getConnectors <em>Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getRedefinitionContext <em>Redefinition Context</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getKind <em>Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getRedefinedPort <em>Redefined Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getType <em>Type</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getPartsWithPort <em>Parts With Port</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isService <em>Service</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isBehavior <em>Behavior</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isConjugated <em>Conjugated</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isWired <em>Wired</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isPublish <em>Publish</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isNotification <em>Notification</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getRegistration <em>Registration</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getRegistrationOverride <em>Registration Override</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isConnected <em>Is Connected</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isConnectedInside <em>Is Connected Inside</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#isConnectedOutside <em>Is Connected Outside</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getInsideConnectors <em>Inside Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getOutsideConnectors <em>Outside Connector</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTPortImpl#getCapsule <em>Capsule</em>}</li> + * </ul> + * + * @generated + */ +public class UMLRTPortImpl extends UMLRTReplicatedElementImpl implements UMLRTPort { + static final FacadeType<Port, RTPort, UMLRTPortImpl> TYPE = new FacadeType<>( + UMLRTPortImpl.class, + UMLPackage.Literals.PORT, + UMLRealTimePackage.Literals.RT_PORT, + UMLRTPortImpl::getInstance, + port -> (UMLRTPortImpl) port.getRedefinedPort(), + stereo -> new UMLRTPortImpl().init(stereo.getBase_Port(), stereo)); + + /** + * The default value of the '{@link #getKind() <em>Kind</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getKind() + * @generated + * @ordered + */ + protected static final UMLRTPortKind KIND_EDEFAULT = UMLRTPortKind.EXTERNAL_BEHAVIOR; + + /** + * The default value of the '{@link #isService() <em>Service</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isService() + * @generated + * @ordered + */ + protected static final boolean SERVICE_EDEFAULT = false; + + /** + * The default value of the '{@link #isBehavior() <em>Behavior</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isBehavior() + * @generated + * @ordered + */ + protected static final boolean BEHAVIOR_EDEFAULT = false; + + /** + * The default value of the '{@link #isConjugated() <em>Conjugated</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isConjugated() + * @generated + * @ordered + */ + protected static final boolean CONJUGATED_EDEFAULT = false; + + /** + * The default value of the '{@link #isWired() <em>Wired</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isWired() + * @generated + * @ordered + */ + protected static final boolean WIRED_EDEFAULT = false; + + /** + * The default value of the '{@link #isPublish() <em>Publish</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isPublish() + * @generated + * @ordered + */ + protected static final boolean PUBLISH_EDEFAULT = false; + + /** + * The default value of the '{@link #isNotification() <em>Notification</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isNotification() + * @generated + * @ordered + */ + protected static final boolean NOTIFICATION_EDEFAULT = false; + + /** + * The default value of the '{@link #getRegistration() <em>Registration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getRegistration() + * @generated + * @ordered + */ + protected static final PortRegistrationType REGISTRATION_EDEFAULT = PortRegistrationType.AUTOMATIC; + + /** + * The default value of the '{@link #getRegistrationOverride() <em>Registration Override</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getRegistrationOverride() + * @generated + * @ordered + */ + protected static final String REGISTRATION_OVERRIDE_EDEFAULT = null; + + /** + * The default value of the '{@link #isConnected() <em>Is Connected</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isConnected() + * @generated + * @ordered + */ + protected static final boolean IS_CONNECTED_EDEFAULT = false; + + /** + * The default value of the '{@link #isConnectedInside() <em>Is Connected Inside</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isConnectedInside() + * @generated + * @ordered + */ + protected static final boolean IS_CONNECTED_INSIDE_EDEFAULT = false; + + /** + * The default value of the '{@link #isConnectedOutside() <em>Is Connected Outside</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isConnectedOutside() + * @generated + * @ordered + */ + protected static final boolean IS_CONNECTED_OUTSIDE_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTPortImpl() { + super(); + } + + /** + * Obtains the canonical instance of the port façade for a port. + * + * @param port + * a port in the UML model + * + * @return its port façade, or {@code null} if the port is not a valid UML-RT port + */ + public static UMLRTPortImpl getInstance(Port port) { + return getFacade(port, TYPE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.PORT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinedElement() { + UMLRTPort redefinedPort = getRedefinedPort(); + if (redefinedPort != null) { + return redefinedPort; + } + return super.getRedefinedElement(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTConnector> getConnectors() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTConnector> connectors = (List<UMLRTConnector>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.PORT__CONNECTOR); + if (connectors == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.PORT__CONNECTOR, connectors = new DerivedUnionEObjectEList<>(UMLRTConnector.class, this, UMLRTUMLRTPackage.PORT__CONNECTOR, CONNECTOR_ESUBSETS)); + } + return connectors; + } + return new DerivedUnionEObjectEList<>(UMLRTConnector.class, this, UMLRTUMLRTPackage.PORT__CONNECTOR, CONNECTOR_ESUBSETS); + } + + /** + * The array of subset feature identifiers for the '{@link #getConnectors() <em>Connector</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getConnectors() + * @generated + * @ordered + */ + protected static final int[] CONNECTOR_ESUBSETS = new int[] { UMLRTUMLRTPackage.PORT__INSIDE_CONNECTOR, UMLRTUMLRTPackage.PORT__OUTSIDE_CONNECTOR }; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getConnector(String name) { + return getConnector(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getConnector(String name, boolean ignoreCase) { + connectorLoop: for (UMLRTConnector connector : getConnectors()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(connector.getName()) : name.equals(connector.getName()))) { + continue connectorLoop; + } + return connector; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinitionContext() { + UMLRTCapsule capsule = getCapsule(); + if (capsule != null) { + return capsule; + } + return super.getRedefinitionContext(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isConnected() { + boolean result; + CacheAdapter cache = getCacheAdapter(); + + if (cache == null) { + result = isConnectedInside() || isConnectedOutside(); + } else { + Boolean cached = (Boolean) cache.get(this, UMLRTUMLRTPackage.Literals.PORT__IS_CONNECTED); + if (cached == null) { + cached = isConnectedInside() || isConnectedOutside(); + cache.put(this, UMLRTUMLRTPackage.Literals.PORT__IS_CONNECTED, cached); + } + result = cached; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPortKind getKind() { + UMLRTPortKind result = UMLRTPortKind.NULL; + + if (isService() && isWired() && isBehavior() && !isPublish()) { + result = UMLRTPortKind.EXTERNAL_BEHAVIOR; + } else if (isBehavior() && isPublish() && !isWired()) { + result = UMLRTPortKind.SPP; // isService won't be checked here => Cf. bug 477033 + } else if (isWired() && isBehavior() && !isService() && !isPublish()) { + result = UMLRTPortKind.INTERNAL_BEHAVIOR; + } else if (isService() && isWired() && !isBehavior() && !isPublish()) { + result = UMLRTPortKind.RELAY; + } else if (isBehavior() && !isWired() && !isPublish()) { + result = UMLRTPortKind.SAP;// isService won't be checked here => Cf. bug 477033 + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setKind(UMLRTPortKind newKind) { + if (Objects.requireNonNull(newKind, "kind").isNull()) { //$NON-NLS-1$ + throw new IllegalArgumentException(newKind.getName()); + } + + switch (newKind) { + case EXTERNAL_BEHAVIOR: + setService(true); + setWired(true); + setBehavior(true); + setPublish(false); + toUML().setVisibility(VisibilityKind.PUBLIC_LITERAL); + break; + case INTERNAL_BEHAVIOR: + setService(false); + setWired(true); + setBehavior(true); + setPublish(false); + toUML().setVisibility(VisibilityKind.PROTECTED_LITERAL); + break; + case RELAY: + setService(true); + setWired(true); + setBehavior(false); + setPublish(false); + toUML().setVisibility(VisibilityKind.PUBLIC_LITERAL); + break; + case SAP: + setService(false); + setWired(false); + setBehavior(true); + setPublish(false); + toUML().setVisibility(VisibilityKind.PROTECTED_LITERAL); + break; + case SPP: + setService(true); + setWired(false); + setBehavior(true); + setPublish(true); + toUML().setVisibility(VisibilityKind.PUBLIC_LITERAL); + break; + default: + throw new IllegalArgumentException("invalid port kind: " + newKind); //$NON-NLS-1$ + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPort getRedefinedPort() { + UMLRTPort result; + + if (toUML() instanceof InternalUMLRTElement) { + Port superPort = (Port) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); + result = UMLRTPort.getInstance(superPort); + } else { + UMLRTNamedElement redef = super.getRedefinedElement(); + result = (redef instanceof UMLRTPort) ? (UMLRTPort) redef : null; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocol getType() { + Type result = toUML().getType(); + return (result instanceof Collaboration) ? UMLRTProtocol.getInstance((Collaboration) result, isConjugated()) + : null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setType(UMLRTProtocol newType) { + if (newType == null) { + toUML().setType(null); + } else { + toUML().setType(newType.toUML()); + setConjugated(newType.isConjugate()); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTCapsulePart> getPartsWithPort() { + Predicate<UMLRTCapsulePart> excluded = UMLRTCapsulePart::isExcluded; + + // Get the connectors that are defined within my capsule + return allPartsWithPort() + .filter(excluded.negate()) + .distinct() + .collect(collectingAndThen(Collectors.<UMLRTCapsulePart> toList(), + list -> elist(UMLRTUMLRTPackage.Literals.PORT__PARTS_WITH_PORT, list))); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsulePart getPartsWithPort(String name) { + return getPartsWithPort(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsulePart getPartsWithPort(String name, boolean ignoreCase) { + partsWithPortLoop: for (UMLRTCapsulePart partsWithPort : getPartsWithPort()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(partsWithPort.getName()) : name.equals(partsWithPort.getName()))) { + continue partsWithPortLoop; + } + return partsWithPort; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isService() { + return toUML().isService(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setService(boolean newService) { + toUML().setIsService(newService); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isBehavior() { + return toUML().isBehavior(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setBehavior(boolean newBehavior) { + toUML().setIsBehavior(newBehavior); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isConjugated() { + return toUML().isConjugated(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setConjugated(boolean newConjugated) { + toUML().setIsConjugated(newConjugated); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isWired() { + return toRT().isWired(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setWired(boolean newWired) { + toRT().setIsWired(newWired); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isPublish() { + return toRT().isPublish(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setPublish(boolean newPublish) { + toRT().setIsPublish(newPublish); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isNotification() { + return toRT().isNotification(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setNotification(boolean newNotification) { + toRT().setIsNotification(newNotification); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public PortRegistrationType getRegistration() { + return toRT().getRegistration(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setRegistration(PortRegistrationType newRegistration) { + toRT().setRegistration(newRegistration); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getRegistrationOverride() { + return toRT().getRegistrationOverride(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setRegistrationOverride(String newRegistrationOverride) { + toRT().setRegistrationOverride(newRegistrationOverride); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isConnectedInside() { + boolean result; + CacheAdapter cache = getCacheAdapter(); + + if (cache == null) { + result = insideConnectors().findAny().isPresent(); + } else { + Boolean cached = (Boolean) cache.get(this, UMLRTUMLRTPackage.Literals.PORT__IS_CONNECTED_INSIDE); + if (cached == null) { + cached = insideConnectors().findAny().isPresent(); + cache.put(this, UMLRTUMLRTPackage.Literals.PORT__IS_CONNECTED_INSIDE, cached); + } + result = cached; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isConnectedOutside() { + boolean result; + CacheAdapter cache = getCacheAdapter(); + + if (cache == null) { + result = outsideConnectors().findAny().isPresent(); + } else { + Boolean cached = (Boolean) cache.get(this, UMLRTUMLRTPackage.Literals.PORT__IS_CONNECTED_OUTSIDE); + if (cached == null) { + cached = outsideConnectors().findAny().isPresent(); + cache.put(this, UMLRTUMLRTPackage.Literals.PORT__IS_CONNECTED_OUTSIDE, cached); + } + result = cached; + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTConnector> getInsideConnectors() { + List<UMLRTConnector> result; + CacheAdapter cache = getCacheAdapter(); + + if (cache == null) { + // Get the connectors that are defined within my capsule + result = insideConnectors().collect( + collectingAndThen(toList(), + list -> elist(UMLRTUMLRTPackage.Literals.PORT__INSIDE_CONNECTOR, list))); + } else { + @SuppressWarnings("unchecked") + List<UMLRTConnector> cached = (List<UMLRTConnector>) cache.get(this, UMLRTUMLRTPackage.Literals.PORT__INSIDE_CONNECTOR); + if (cached == null) { + cached = insideConnectors().collect( + collectingAndThen(toList(), + list -> elist(UMLRTUMLRTPackage.Literals.PORT__INSIDE_CONNECTOR, list))); + cache.put(this, UMLRTUMLRTPackage.Literals.PORT__INSIDE_CONNECTOR, cached); + } + result = cached; + } + + return result; + } + + /** + * Obtains a stream over my inside connectors, those which are owned by context {@link #getCapsule() capsule}. + * + * @return my inside connectors + */ + protected Stream<UMLRTConnector> insideConnectors() { + UMLRTCapsule capsule = getCapsule(); + Predicate<UMLRTConnector> excluded = UMLRTConnector::isExcluded; + + return allConnectors() + .map(capsule::getRedefinitionOf) + .filter(Objects::nonNull) + .filter(excluded.negate()) + .distinct(); + } + + /** + * Obtains a stream over all of my connectors, both {@linkplain #insideConnectors() inside} and + * {@linkplain #outsideConnectors() outside}. + * + * @return all of my connectors + */ + protected Stream<UMLRTConnector> allConnectors() { + return getRedefinitionChain().stream() + .map(UMLRTPortImpl.class::cast) + .flatMap(UMLRTPortImpl::getEnds) + .map(Element::getOwner) + .map(Connector.class::cast) + .map(UMLRTConnector::getInstance) + .filter(Objects::nonNull); + } + + Stream<ConnectorEnd> getEnds() { + return toUML().getEnds().stream(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getInsideConnector(String name) { + return getInsideConnector(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getInsideConnector(String name, boolean ignoreCase) { + insideConnectorLoop: for (UMLRTConnector insideConnector : getInsideConnectors()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(insideConnector.getName()) : name.equals(insideConnector.getName()))) { + continue insideConnectorLoop; + } + return insideConnector; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTConnector> getOutsideConnectors() { + List<UMLRTConnector> result; + CacheAdapter cache = getCacheAdapter(); + + if (cache == null) { + // Get the connectors that are defined without my capsule + result = outsideConnectors().collect( + collectingAndThen(toList(), + list -> elist(UMLRTUMLRTPackage.Literals.PORT__OUTSIDE_CONNECTOR, list))); + } else { + @SuppressWarnings("unchecked") + List<UMLRTConnector> cached = (List<UMLRTConnector>) cache.get(this, UMLRTUMLRTPackage.Literals.PORT__OUTSIDE_CONNECTOR); + if (cached == null) { + cached = outsideConnectors().collect( + collectingAndThen(toList(), + list -> elist(UMLRTUMLRTPackage.Literals.PORT__OUTSIDE_CONNECTOR, list))); + cache.put(this, UMLRTUMLRTPackage.Literals.PORT__OUTSIDE_CONNECTOR, cached); + } + result = cached; + } + + return result; + } + + /** + * Obtains a stream over my outside connectors, those that are owned by capsules (and connect) parts + * of my {@link #getCapsule() capsule} type. + * + * @return my outside connectors + * + * @see #allPartsWithPort() + */ + protected Stream<UMLRTConnector> outsideConnectors() { + return getPartsWithPort().stream() + .flatMap(part -> part.getConnectorsOf(this).stream()) + .distinct(); + } + + /** + * Obtains a steam over all of the currently loaded capsule-parts that expose me as a port. + * + * @return all known parts that feature me + */ + protected Stream<UMLRTCapsulePart> allPartsWithPort() { + CacheAdapter cache = CacheAdapter.getCacheAdapter(toUML()); + + return allRedefinitions() + .map(UMLRTPort::getCapsule) + .map(UMLRTNamedElement::toUML) + .flatMap(e -> cache.getNonNavigableInverseReferences(e).stream()) + .filter(s -> s.getEStructuralFeature() == UMLPackage.Literals.TYPED_ELEMENT__TYPE) + .map(EStructuralFeature.Setting::getEObject) + .filter(Property.class::isInstance).map(Property.class::cast) + .map(UMLRTCapsulePart::getInstance) + .filter(Objects::nonNull) + .map(UMLRTCapsulePartImpl.class::cast) + .flatMap(UMLRTCapsulePartImpl::allRedefinitions) + .distinct(); + } + + /** + * Obtains a stream over all ports currently loaded that redefine me. + * + * @return my currently known redefinitions + */ + protected Stream<UMLRTPort> allRedefinitions() { + Predicate<UMLRTPort> excluded = UMLRTPort::isExcluded; + UMLRTCapsule capsule = getCapsule(); + return (capsule == null) ? Stream.empty() : capsule.getHierarchy() + .map(c -> c.getRedefinitionOf((UMLRTPort) this)) + .filter(excluded.negate()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getOutsideConnector(String name) { + return getOutsideConnector(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector getOutsideConnector(String name, boolean ignoreCase) { + outsideConnectorLoop: for (UMLRTConnector outsideConnector : getOutsideConnectors()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(outsideConnector.getName()) : name.equals(outsideConnector.getName()))) { + continue outsideConnectorLoop; + } + return outsideConnector; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsule getCapsule() { + return UMLRTCapsule.getInstance(toUML().getClass_()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Port toUML() { + return (Port) super.toUML(); + } + + @Override + RTPort toRT() { + return (RTPort) super.toRT(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.PORT__CONNECTOR: + return getConnectors(); + case UMLRTUMLRTPackage.PORT__KIND: + return getKind(); + case UMLRTUMLRTPackage.PORT__REDEFINED_PORT: + return getRedefinedPort(); + case UMLRTUMLRTPackage.PORT__TYPE: + return getType(); + case UMLRTUMLRTPackage.PORT__PARTS_WITH_PORT: + return getPartsWithPort(); + case UMLRTUMLRTPackage.PORT__SERVICE: + return isService(); + case UMLRTUMLRTPackage.PORT__BEHAVIOR: + return isBehavior(); + case UMLRTUMLRTPackage.PORT__CONJUGATED: + return isConjugated(); + case UMLRTUMLRTPackage.PORT__WIRED: + return isWired(); + case UMLRTUMLRTPackage.PORT__PUBLISH: + return isPublish(); + case UMLRTUMLRTPackage.PORT__NOTIFICATION: + return isNotification(); + case UMLRTUMLRTPackage.PORT__REGISTRATION: + return getRegistration(); + case UMLRTUMLRTPackage.PORT__REGISTRATION_OVERRIDE: + return getRegistrationOverride(); + case UMLRTUMLRTPackage.PORT__IS_CONNECTED: + return isConnected(); + case UMLRTUMLRTPackage.PORT__IS_CONNECTED_INSIDE: + return isConnectedInside(); + case UMLRTUMLRTPackage.PORT__IS_CONNECTED_OUTSIDE: + return isConnectedOutside(); + case UMLRTUMLRTPackage.PORT__INSIDE_CONNECTOR: + return getInsideConnectors(); + case UMLRTUMLRTPackage.PORT__OUTSIDE_CONNECTOR: + return getOutsideConnectors(); + case UMLRTUMLRTPackage.PORT__CAPSULE: + return getCapsule(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.PORT__KIND: + setKind((UMLRTPortKind) newValue); + return; + case UMLRTUMLRTPackage.PORT__TYPE: + setType((UMLRTProtocol) newValue); + return; + case UMLRTUMLRTPackage.PORT__PARTS_WITH_PORT: + getPartsWithPort().clear(); + getPartsWithPort().addAll((Collection<? extends UMLRTCapsulePart>) newValue); + return; + case UMLRTUMLRTPackage.PORT__SERVICE: + setService((Boolean) newValue); + return; + case UMLRTUMLRTPackage.PORT__BEHAVIOR: + setBehavior((Boolean) newValue); + return; + case UMLRTUMLRTPackage.PORT__CONJUGATED: + setConjugated((Boolean) newValue); + return; + case UMLRTUMLRTPackage.PORT__WIRED: + setWired((Boolean) newValue); + return; + case UMLRTUMLRTPackage.PORT__PUBLISH: + setPublish((Boolean) newValue); + return; + case UMLRTUMLRTPackage.PORT__NOTIFICATION: + setNotification((Boolean) newValue); + return; + case UMLRTUMLRTPackage.PORT__REGISTRATION: + setRegistration((PortRegistrationType) newValue); + return; + case UMLRTUMLRTPackage.PORT__REGISTRATION_OVERRIDE: + setRegistrationOverride((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PORT__KIND: + setKind(KIND_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__TYPE: + setType((UMLRTProtocol) null); + return; + case UMLRTUMLRTPackage.PORT__PARTS_WITH_PORT: + getPartsWithPort().clear(); + return; + case UMLRTUMLRTPackage.PORT__SERVICE: + setService(SERVICE_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__BEHAVIOR: + setBehavior(BEHAVIOR_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__CONJUGATED: + setConjugated(CONJUGATED_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__WIRED: + setWired(WIRED_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__PUBLISH: + setPublish(PUBLISH_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__NOTIFICATION: + setNotification(NOTIFICATION_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__REGISTRATION: + setRegistration(REGISTRATION_EDEFAULT); + return; + case UMLRTUMLRTPackage.PORT__REGISTRATION_OVERRIDE: + setRegistrationOverride(REGISTRATION_OVERRIDE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PORT__REDEFINED_ELEMENT: + return isSetRedefinedElement(); + case UMLRTUMLRTPackage.PORT__CONNECTOR: + return isSetConnectors(); + case UMLRTUMLRTPackage.PORT__REDEFINITION_CONTEXT: + return isSetRedefinitionContext(); + case UMLRTUMLRTPackage.PORT__KIND: + return getKind() != KIND_EDEFAULT; + case UMLRTUMLRTPackage.PORT__REDEFINED_PORT: + return getRedefinedPort() != null; + case UMLRTUMLRTPackage.PORT__TYPE: + return getType() != null; + case UMLRTUMLRTPackage.PORT__PARTS_WITH_PORT: + return !getPartsWithPort().isEmpty(); + case UMLRTUMLRTPackage.PORT__SERVICE: + return isService() != SERVICE_EDEFAULT; + case UMLRTUMLRTPackage.PORT__BEHAVIOR: + return isBehavior() != BEHAVIOR_EDEFAULT; + case UMLRTUMLRTPackage.PORT__CONJUGATED: + return isConjugated() != CONJUGATED_EDEFAULT; + case UMLRTUMLRTPackage.PORT__WIRED: + return isWired() != WIRED_EDEFAULT; + case UMLRTUMLRTPackage.PORT__PUBLISH: + return isPublish() != PUBLISH_EDEFAULT; + case UMLRTUMLRTPackage.PORT__NOTIFICATION: + return isNotification() != NOTIFICATION_EDEFAULT; + case UMLRTUMLRTPackage.PORT__REGISTRATION: + return getRegistration() != REGISTRATION_EDEFAULT; + case UMLRTUMLRTPackage.PORT__REGISTRATION_OVERRIDE: + return REGISTRATION_OVERRIDE_EDEFAULT == null ? getRegistrationOverride() != null : !REGISTRATION_OVERRIDE_EDEFAULT.equals(getRegistrationOverride()); + case UMLRTUMLRTPackage.PORT__IS_CONNECTED: + return isConnected() != IS_CONNECTED_EDEFAULT; + case UMLRTUMLRTPackage.PORT__IS_CONNECTED_INSIDE: + return isConnectedInside() != IS_CONNECTED_INSIDE_EDEFAULT; + case UMLRTUMLRTPackage.PORT__IS_CONNECTED_OUTSIDE: + return isConnectedOutside() != IS_CONNECTED_OUTSIDE_EDEFAULT; + case UMLRTUMLRTPackage.PORT__INSIDE_CONNECTOR: + return !getInsideConnectors().isEmpty(); + case UMLRTUMLRTPackage.PORT__OUTSIDE_CONNECTOR: + return !getOutsideConnectors().isEmpty(); + case UMLRTUMLRTPackage.PORT__CAPSULE: + return getCapsule() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinedElement() { + return super.isSetRedefinedElement() + || eIsSet(UMLRTUMLRTPackage.PORT__REDEFINED_PORT); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isSetConnectors() { + return eIsSet(UMLRTUMLRTPackage.PORT__INSIDE_CONNECTOR) + || eIsSet(UMLRTUMLRTPackage.PORT__OUTSIDE_CONNECTOR); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinitionContext() { + return super.isSetRedefinitionContext() + || eIsSet(UMLRTUMLRTPackage.PORT__CAPSULE); + } + +} // UMLRTPortImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTProtocolImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTProtocolImpl.java new file mode 100644 index 0000000..2097b6b --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTProtocolImpl.java
@@ -0,0 +1,1041 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import static java.util.stream.Collectors.collectingAndThen; +import static java.util.stream.Collectors.toList; + +import java.util.Collections; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Supplier; +import java.util.function.UnaryOperator; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.Protocol; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageSet; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtUMLExtPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.util.CachedReference; +import org.eclipse.uml2.common.util.CacheAdapter; +import org.eclipse.uml2.common.util.DerivedUnionEObjectEList; +import org.eclipse.uml2.uml.AnyReceiveEvent; +import org.eclipse.uml2.uml.Classifier; +import org.eclipse.uml2.uml.Collaboration; +import org.eclipse.uml2.uml.Interface; +import org.eclipse.uml2.uml.Operation; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.util.UMLUtil; +import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Protocol</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getGeneral <em>General</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getSpecifics <em>Specific</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getMessages <em>Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getRedefinableElements <em>Redefinable Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getPackage <em>Package</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getSuperProtocol <em>Super Protocol</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getSubProtocols <em>Sub Protocol</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getInMessages <em>In Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getOutMessages <em>Out Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getInOutMessages <em>In Out Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#isConjugate <em>Is Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getConjugate <em>Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl#getHierarchy <em>Hierarchy</em>}</li> + * </ul> + * + * @generated + */ +public class UMLRTProtocolImpl extends UMLRTClassifierImpl implements UMLRTProtocol { + /** + * The default value of the '{@link #isConjugate() <em>Is Conjugate</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isConjugate() + * @generated + * @ordered + */ + protected static final boolean IS_CONJUGATE_EDEFAULT = false; + + private static final String ANY_RECEIVE_EVENT_NAME = "*"; //$NON-NLS-1$ + + static final FacadeType<Collaboration, Protocol, UMLRTProtocolImpl> TYPE = new FacadeType<>( + UMLRTProtocolImpl.class, + UMLPackage.Literals.COLLABORATION, + UMLRealTimePackage.Literals.PROTOCOL, + UMLRTProtocolImpl::getInstance, + protocol -> (UMLRTProtocolImpl) protocol.getSuperProtocol(), + stereo -> new UMLRTProtocolImpl().init(stereo.getBase_Collaboration(), stereo)); + + private static final Map<RTMessageKind, FacadeReference<Operation, EObject, UMLRTProtocolMessage, UMLRTProtocolMessageImpl>> MESSAGE_REFERENCES; + + private final boolean isConjugate; + private final Supplier<UMLRTProtocol> conjugate; + + static { + EnumMap<RTMessageKind, EReference> references = new EnumMap<>(RTMessageKind.class); + references.put(RTMessageKind.IN, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE); + references.put(RTMessageKind.IN_OUT, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE); + references.put(RTMessageKind.OUT, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE); + + MESSAGE_REFERENCES = new EnumMap<>(RTMessageKind.class); + RTMessageKind.VALUES.forEach(kind -> MESSAGE_REFERENCES.put(kind, + new FacadeReference.Indirect<>( + UMLRTProtocolMessageImpl.TYPE, + references.get(kind), + UMLRTProtocolMessage.class, + UMLPackage.Literals.INTERFACE__OWNED_OPERATION, + ExtUMLExtPackage.Literals.INTERFACE__IMPLICIT_OPERATION, + UMLPackage.Literals.OPERATION, + protocol -> requireMessageSet((Collaboration) protocol, kind)))); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + protected UMLRTProtocolImpl() { + super(); + + this.isConjugate = false; + this.conjugate = new CachedReference<>(() -> new UMLRTProtocolImpl(this)); + } + + UMLRTProtocolImpl(UMLRTProtocolImpl base) { + super(); + + this.isConjugate = true; + this.conjugate = () -> base; // The base has a hard ref from the model anyways + init(base.toUML(), base.toRT()); + } + + /** + * Obtains the protocol façade for the base protocol type represented by the given + * UML collaboration. + * + * @param protocol + * a UML collaboration representing a protocol + * @return the base UML-RT protocol façade, or {@code null} if the collaboration + * is not actually a protocol + */ + public static UMLRTProtocolImpl getInstance(Collaboration protocol) { + return getFacade(protocol, TYPE); + } + + static boolean isRTMessageSet(Interface interface_) { + return getRTMessageSet(interface_) != null; + } + + static RTMessageSet getRTMessageSet(Interface interface_) { + return UMLUtil.getStereotypeApplication(interface_, RTMessageSet.class); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.PROTOCOL; + } + + @Override + public String getName() { + String result = super.getName(); + if (isConjugate()) { + result = result + "~"; //$NON-NLS-1$ + } + return result; + } + + @Override + public void setName(String newName) { + if ((newName != null) && isConjugate()) { + if (!newName.endsWith("~")) { + throw new IllegalArgumentException("conjugate name must end with ~"); //$NON-NLS-1$ + } + + // But it isn't in the UML + newName = newName.substring(0, newName.length() - 1); + } + + super.setName(newName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTClassifier getGeneral() { + UMLRTProtocol superProtocol = getSuperProtocol(); + if (superProtocol != null) { + return superProtocol; + } + return super.getGeneral(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTClassifier> getSpecifics() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTClassifier> specifics = (List<UMLRTClassifier>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC); + if (specifics == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC, specifics = new DerivedUnionEObjectEList<>(UMLRTClassifier.class, this, UMLRTUMLRTPackage.PROTOCOL__SPECIFIC, SPECIFIC_ESUBSETS)); + } + return specifics; + } + return new DerivedUnionEObjectEList<>(UMLRTClassifier.class, this, UMLRTUMLRTPackage.PROTOCOL__SPECIFIC, SPECIFIC_ESUBSETS); + } + + /** + * The array of subset feature identifiers for the '{@link #getSpecifics() <em>Specific</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getSpecifics() + * @generated + * @ordered + */ + protected static final int[] SPECIFIC_ESUBSETS = new int[] { UMLRTUMLRTPackage.PROTOCOL__SUB_PROTOCOL }; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTNamedElement> getRedefinableElements() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTNamedElement> redefinableElements = (List<UMLRTNamedElement>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + if (redefinableElements == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT, + redefinableElements = new DerivedUnionEObjectEList<>(UMLRTNamedElement.class, this, UMLRTUMLRTPackage.PROTOCOL__REDEFINABLE_ELEMENT, REDEFINABLE_ELEMENT_ESUBSETS)); + } + return redefinableElements; + } + return new DerivedUnionEObjectEList<>(UMLRTNamedElement.class, this, UMLRTUMLRTPackage.PROTOCOL__REDEFINABLE_ELEMENT, REDEFINABLE_ELEMENT_ESUBSETS); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocol getSuperProtocol() { + List<Classifier> generals = toUML().getGenerals(); + return (generals.isEmpty() || !(generals.get(0) instanceof Collaboration)) + ? null + : UMLRTProtocol.getInstance((Collaboration) generals.get(0), isConjugate()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setSuperProtocol(UMLRTProtocol newSuperProtocol) { + setGeneral(toUML(), (newSuperProtocol == null) ? null : newSuperProtocol.toUML()); + } + + @Override + public void setGeneral(UMLRTClassifier general) { + setSuperProtocol((UMLRTProtocol) general); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocol> getSubProtocols() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + @SuppressWarnings("unchecked") + List<UMLRTProtocol> subProtools = (List<UMLRTProtocol>) cache.get(this, UMLRTUMLRTPackage.Literals.PROTOCOL__SUB_PROTOCOL); + if (subProtools == null) { + cache.put(this, UMLRTUMLRTPackage.Literals.PROTOCOL__SUB_PROTOCOL, + subProtools = doGetSubProtocols()); + } + return subProtools; + } + return doGetSubProtocols(); + } + + private List<UMLRTProtocol> doGetSubProtocols() { + return specifics(toUML(), Collaboration.class) + .map(UMLRTProtocolImpl::getInstance) + .filter(Objects::nonNull) + .map(this::forConjugation) + .collect(collectingAndThen(Collectors.<UMLRTProtocol> toList(), + list -> elist(UMLRTUMLRTPackage.Literals.PROTOCOL__SUB_PROTOCOL, list))); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocol getSubProtocol(String name) { + return getSubProtocol(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocol getSubProtocol(String name, boolean ignoreCase) { + subProtocolLoop: for (UMLRTProtocol subProtocol : getSubProtocols()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(subProtocol.getName()) : name.equals(subProtocol.getName()))) { + continue subProtocolLoop; + } + return subProtocol; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocolMessage> getInMessages() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTProtocolMessage> messages = (List<UMLRTProtocolMessage>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__IN_MESSAGE); + if (messages == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__IN_MESSAGE, + messages = getFacades(MESSAGE_REFERENCES.get(forConjugation(RTMessageKind.IN)), messageConjugation())); + } + return messages; + } + return getFacades(MESSAGE_REFERENCES.get(forConjugation(RTMessageKind.IN)), messageConjugation()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getInMessage(String name) { + return getInMessage(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getInMessage(String name, boolean ignoreCase) { + inMessageLoop: for (UMLRTProtocolMessage inMessage : getInMessages()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(inMessage.getName()) : name.equals(inMessage.getName()))) { + continue inMessageLoop; + } + return inMessage; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocolMessage> getOutMessages() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTProtocolMessage> messages = (List<UMLRTProtocolMessage>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__OUT_MESSAGE); + if (messages == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__OUT_MESSAGE, + messages = getFacades(MESSAGE_REFERENCES.get(forConjugation(RTMessageKind.OUT)), messageConjugation())); + } + return messages; + } + return getFacades(MESSAGE_REFERENCES.get(forConjugation(RTMessageKind.OUT)), messageConjugation()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getOutMessage(String name) { + return getOutMessage(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getOutMessage(String name, boolean ignoreCase) { + outMessageLoop: for (UMLRTProtocolMessage outMessage : getOutMessages()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(outMessage.getName()) : name.equals(outMessage.getName()))) { + continue outMessageLoop; + } + return outMessage; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocolMessage> getInOutMessages() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTProtocolMessage> messages = (List<UMLRTProtocolMessage>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__IN_OUT_MESSAGE); + if (messages == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__IN_OUT_MESSAGE, + messages = getFacades(MESSAGE_REFERENCES.get(forConjugation(RTMessageKind.IN_OUT)), messageConjugation())); + } + return messages; + } + return getFacades(MESSAGE_REFERENCES.get(forConjugation(RTMessageKind.IN_OUT)), messageConjugation()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getInOutMessage(String name) { + return getInOutMessage(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getInOutMessage(String name, boolean ignoreCase) { + inOutMessageLoop: for (UMLRTProtocolMessage inOutMessage : getInOutMessages()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(inOutMessage.getName()) : name.equals(inOutMessage.getName()))) { + continue inOutMessageLoop; + } + return inOutMessage; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<UMLRTProtocolMessage> getMessages() { + CacheAdapter cache = getCacheAdapter(); + if (cache != null) { + Resource eResource = eResource(); + @SuppressWarnings("unchecked") + List<UMLRTProtocolMessage> messages = (List<UMLRTProtocolMessage>) cache.get(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE); + if (messages == null) { + cache.put(eResource, this, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE, messages = new DerivedUnionEObjectEList<>(UMLRTProtocolMessage.class, this, UMLRTUMLRTPackage.PROTOCOL__MESSAGE, MESSAGE_ESUBSETS)); + } + return messages; + } + return new DerivedUnionEObjectEList<>(UMLRTProtocolMessage.class, this, UMLRTUMLRTPackage.PROTOCOL__MESSAGE, MESSAGE_ESUBSETS); + } + + /** + * The array of subset feature identifiers for the '{@link #getMessages() <em>Message</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getMessages() + * @generated + * @ordered + */ + protected static final int[] MESSAGE_ESUBSETS = new int[] { UMLRTUMLRTPackage.PROTOCOL__IN_MESSAGE, UMLRTUMLRTPackage.PROTOCOL__OUT_MESSAGE, UMLRTUMLRTPackage.PROTOCOL__IN_OUT_MESSAGE }; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getMessage(String name) { + return getMessage(name, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage getMessage(String name, boolean ignoreCase) { + messageLoop: for (UMLRTProtocolMessage message : getMessages()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(message.getName()) : name.equals(message.getName()))) { + continue messageLoop; + } + return message; + } + return null; + } + + /** + * The array of subset feature identifiers for the '{@link #getRedefinableElements() <em>Redefinable Element</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getRedefinableElements() + * @generated + * @ordered + */ + protected static final int[] REDEFINABLE_ELEMENT_ESUBSETS = new int[] { UMLRTUMLRTPackage.PROTOCOL__MESSAGE }; + + UMLRTProtocol forConjugation(UMLRTProtocol other) { + return ((other != null) && (other != this) && isConjugate()) + ? other.getConjugate() + : other; + } + + Stream<Interface> messageSets() { + return toUML().getNearestPackage().getOwnedTypes().stream() + .filter(Interface.class::isInstance).map(Interface.class::cast) + .filter(UMLRTProtocolImpl::isRTMessageSet); + } + + Optional<Interface> getMessageSet(RTMessageKind kind) { + return messageSets().map(UMLRTProtocolImpl::getRTMessageSet) + .filter(set -> set.getRtMsgKind() == kind) + .findFirst() + .map(RTMessageSet::getBase_Interface); + } + + Interface requireMessageSet(RTMessageKind kind) { + return getMessageSet(kind) + .orElseThrow(() -> new IllegalArgumentException("no such message set: " + kind)); //$NON-NLS-1$ + } + + static Interface requireMessageSet(Collaboration protocol, RTMessageKind kind) { + return UMLRTProtocolImpl.getInstance(protocol).getMessageSet(kind) + .orElseThrow(() -> new IllegalArgumentException("no such message set: " + kind)); //$NON-NLS-1$ + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isConjugate() { + return isConjugate; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocol getConjugate() { + return conjugate.get(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTPackage getPackage() { + Package protocolContainer = toUML().getNearestPackage(); + return (protocolContainer == null) + ? null + : UMLRTPackage.getInstance(protocolContainer.getNestingPackage()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Collaboration toUML() { + return (Collaboration) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public AnyReceiveEvent getAnyReceiveEvent() { + AnyReceiveEvent result = null; + + Package protocolContainer = toUML().getNearestPackage(); + if (protocolContainer != null) { + result = (AnyReceiveEvent) protocolContainer.getPackagedElement( + ANY_RECEIVE_EVENT_NAME, false, UMLPackage.Literals.ANY_RECEIVE_EVENT, false); + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocol> getAncestry() { + // TODO: Cache this + return doGetAncestry(); + } + + private List<UMLRTProtocol> doGetAncestry() { + return ancestry(toUML(), Collaboration.class).stream() + .map(UMLRTProtocolImpl::getInstance) + .filter(Objects::nonNull) + .map(this::forConjugation) + .collect(collectingAndThen(toList(), ECollections::unmodifiableEList)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocolMessage> getMessages(RTMessageKind kind) { + switch (kind) { + case IN: + return getInMessages(); + case OUT: + return getOutMessages(); + case IN_OUT: + return getInOutMessages(); + default: + throw new IllegalArgumentException(kind.getName()); + } + } + + UnaryOperator<UMLRTProtocolMessage> messageConjugation() { + return isConjugate() + ? UMLRTProtocolMessage::getConjugate + : UnaryOperator.identity(); + } + + /** + * Obtains the 'real' conjugation to encode in the UML model according + * to my {@linkplain #isConjugate() conjugation}. + * + * @param kind + * a message direction kind + * @return the UML model's value of the {@code kind} + * + * @see #isConjugate() + */ + private RTMessageKind forConjugation(RTMessageKind kind) { + if ((kind != null) && isConjugate()) { + switch (kind) { + case IN: + kind = RTMessageKind.OUT; + break; + case OUT: + kind = RTMessageKind.IN; + break; + default: + // INOUT is its own inverse + break; + } + } + return kind; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocolMessage> getMessages(RTMessageKind kind, boolean withExclusions) { + // TODO: Cache in the UML CacheAdapter? + return getFacades(MESSAGE_REFERENCES.get(forConjugation(kind)), withExclusions, messageConjugation()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<UMLRTProtocolMessage> getMessages(boolean withExclusions) { + // TODO: Cache in the UML CacheAdapter + return MESSAGE_REFERENCES.values().stream() + .flatMap(ref -> ref.facades(toUML(), withExclusions)) + .map(messageConjugation()) + .collect(collectingAndThen(toList(), Collections::unmodifiableList)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocolMessage createMessage(RTMessageKind kind, String name) { + UMLRTProtocolMessageImpl result = (UMLRTProtocolMessageImpl) create(MESSAGE_REFERENCES.get(forConjugation(kind)), name); + result.initReceiveEvent(); + return messageConjugation().apply(result); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocolMessage createMessage(RTMessageKind kind, String name, Type dataType) { + UMLRTProtocolMessage result = createMessage(kind, name); + result.toUML().createOwnedParameter("data", dataType); + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocolMessage createMessage(RTMessageKind kind, String name, List<String> parameterName, List<Type> parameterType) { + UMLRTProtocolMessage result = createMessage(kind, name); + + if ((parameterName != null) && (parameterType != null)) { + int count = parameterName.size(); + if (parameterType.size() != count) { + throw new IllegalArgumentException("parameter names and types mismatched"); //$NON-NLS-1$ + } + for (int i = 0; i < count; i++) { + result.toUML().createOwnedParameter(parameterName.get(i), parameterType.get(i)); + } + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Stream<UMLRTProtocol> getHierarchy() { + return hierarchy(toUML(), Collaboration.class) + .map(UMLRTProtocol::getInstance) + .filter(Objects::nonNull) + .map(this::forConjugation); + } + + UMLRTProtocol initContents() { + // Message set interfaces + createMessageSet(RTMessageKind.IN); + createMessageSet(RTMessageKind.OUT); + createMessageSet(RTMessageKind.IN_OUT); + + // Wildcard event + toUML().getNearestPackage().createPackagedElement( + ANY_RECEIVE_EVENT_NAME, UMLPackage.Literals.ANY_RECEIVE_EVENT); + + return this; + } + + private void createMessageSet(RTMessageKind direction) { + Package protocolContainer = toUML().getNearestPackage(); + + String name = getName(); + switch (direction) { + case OUT: + name = name + "~"; //$NON-NLS-1$ + break; + case IN_OUT: + name = name + "IO"; //$NON-NLS-1$ + break; + default: // IN + // Pass + break; + + } + + Interface messageSet = (Interface) protocolContainer.createOwnedType(name, UMLPackage.Literals.INTERFACE); + RTMessageSet stereo = (RTMessageSet) StereotypeApplicationHelper.getInstance(messageSet).applyStereotype(messageSet, UMLRealTimePackage.Literals.RT_MESSAGE_SET); + stereo.setRtMsgKind(direction); + + switch (direction) { + case IN: + toUML().createInterfaceRealization(null, messageSet); + break; + case OUT: + toUML().createUsage(messageSet); + break; + case IN_OUT: + toUML().createInterfaceRealization(null, messageSet); + toUML().createUsage(messageSet); + break; + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL__MESSAGE: + return getMessages(); + case UMLRTUMLRTPackage.PROTOCOL__PACKAGE: + return getPackage(); + case UMLRTUMLRTPackage.PROTOCOL__SUPER_PROTOCOL: + return getSuperProtocol(); + case UMLRTUMLRTPackage.PROTOCOL__SUB_PROTOCOL: + return getSubProtocols(); + case UMLRTUMLRTPackage.PROTOCOL__IN_MESSAGE: + return getInMessages(); + case UMLRTUMLRTPackage.PROTOCOL__OUT_MESSAGE: + return getOutMessages(); + case UMLRTUMLRTPackage.PROTOCOL__IN_OUT_MESSAGE: + return getInOutMessages(); + case UMLRTUMLRTPackage.PROTOCOL__IS_CONJUGATE: + return isConjugate(); + case UMLRTUMLRTPackage.PROTOCOL__CONJUGATE: + return getConjugate(); + case UMLRTUMLRTPackage.PROTOCOL__HIERARCHY: + return getHierarchy(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL__SUPER_PROTOCOL: + setSuperProtocol((UMLRTProtocol) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL__SUPER_PROTOCOL: + setSuperProtocol((UMLRTProtocol) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL__GENERAL: + return isSetGeneral(); + case UMLRTUMLRTPackage.PROTOCOL__SPECIFIC: + return isSetSpecifics(); + case UMLRTUMLRTPackage.PROTOCOL__MESSAGE: + return isSetMessages(); + case UMLRTUMLRTPackage.PROTOCOL__REDEFINABLE_ELEMENT: + return isSetRedefinableElements(); + case UMLRTUMLRTPackage.PROTOCOL__PACKAGE: + return getPackage() != null; + case UMLRTUMLRTPackage.PROTOCOL__SUPER_PROTOCOL: + return getSuperProtocol() != null; + case UMLRTUMLRTPackage.PROTOCOL__SUB_PROTOCOL: + return !getSubProtocols().isEmpty(); + case UMLRTUMLRTPackage.PROTOCOL__IN_MESSAGE: + return !getInMessages().isEmpty(); + case UMLRTUMLRTPackage.PROTOCOL__OUT_MESSAGE: + return !getOutMessages().isEmpty(); + case UMLRTUMLRTPackage.PROTOCOL__IN_OUT_MESSAGE: + return !getInOutMessages().isEmpty(); + case UMLRTUMLRTPackage.PROTOCOL__IS_CONJUGATE: + return isConjugate() != IS_CONJUGATE_EDEFAULT; + case UMLRTUMLRTPackage.PROTOCOL__CONJUGATE: + return getConjugate() != null; + case UMLRTUMLRTPackage.PROTOCOL__HIERARCHY: + return getHierarchy() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetGeneral() { + return super.isSetGeneral() + || eIsSet(UMLRTUMLRTPackage.PROTOCOL__SUPER_PROTOCOL); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetSpecifics() { + return super.isSetSpecifics() + || eIsSet(UMLRTUMLRTPackage.PROTOCOL__SUB_PROTOCOL); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isSetMessages() { + return eIsSet(UMLRTUMLRTPackage.PROTOCOL__IN_MESSAGE) + || eIsSet(UMLRTUMLRTPackage.PROTOCOL__OUT_MESSAGE) + || eIsSet(UMLRTUMLRTPackage.PROTOCOL__IN_OUT_MESSAGE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinableElements() { + return super.isSetRedefinableElements() + || isSetMessages(); + } + +} // UMLRTProtocolImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTProtocolMessageImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTProtocolMessageImpl.java new file mode 100644 index 0000000..6538ce8 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTProtocolMessageImpl.java
@@ -0,0 +1,507 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import static org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolImpl.isRTMessageSet; + +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Supplier; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageSet; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.util.CachedReference; +import org.eclipse.uml2.uml.CallEvent; +import org.eclipse.uml2.uml.Collaboration; +import org.eclipse.uml2.uml.Interface; +import org.eclipse.uml2.uml.Operation; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.Parameter; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Protocol Message</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#getRedefinedElement <em>Redefined Element</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#getRedefinitionContext <em>Redefinition Context</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#getKind <em>Kind</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#getRedefinedMessage <em>Redefined Message</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#getParameters <em>Parameter</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#isConjugate <em>Is Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#getConjugate <em>Conjugate</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTProtocolMessageImpl#getProtocol <em>Protocol</em>}</li> + * </ul> + * + * @generated + */ +public class UMLRTProtocolMessageImpl extends UMLRTNamedElementImpl implements UMLRTProtocolMessage { + static final FacadeType<Operation, EObject, UMLRTProtocolMessageImpl> TYPE = new FacadeType<>( + UMLRTProtocolMessageImpl.class, + UMLPackage.Literals.OPERATION, + null, + UMLRTProtocolMessageImpl::getInstance, + message -> (UMLRTProtocolMessageImpl) message.getRedefinedMessage(), + null); + + /** + * The default value of the '{@link #getKind() <em>Kind</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getKind() + * @generated + * @ordered + */ + protected static final RTMessageKind KIND_EDEFAULT = RTMessageKind.IN; + + /** + * The default value of the '{@link #isConjugate() <em>Is Conjugate</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isConjugate() + * @generated + * @ordered + */ + protected static final boolean IS_CONJUGATE_EDEFAULT = false; + + private final boolean isConjugate; + private final Supplier<UMLRTProtocolMessage> conjugate; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + protected UMLRTProtocolMessageImpl() { + super(); + + this.isConjugate = false; + this.conjugate = new CachedReference<>(() -> new UMLRTProtocolMessageImpl(this)); + } + + private UMLRTProtocolMessageImpl(UMLRTProtocolMessageImpl base) { + super(); + + this.isConjugate = true; + this.conjugate = () -> base; // The base has a hard ref from the model anyways + init(base.toUML(), base.toRT()); + } + + /** + * Obtains the protocol message façade for the message represented by the given + * UML operation. + * + * @param operation + * a UML operation representing a protocol message + * @return the base UML-RT protocol-message façade, or {@code null} if the operation + * is not actually a protocol message + */ + public static UMLRTProtocolMessageImpl getInstance(Operation operation) { + BasicFacadeAdapter<UMLRTProtocolMessageImpl> adapter = null; + + if ((operation != null) && isProtocolMessage(operation)) { + adapter = TYPE.getAdapter(operation); + if (adapter == null) { + adapter = new UMLRTProtocolMessageImpl().init(operation, null).new BasicFacadeAdapter<>(); + operation.eAdapters().add(adapter); + } + } + + return (adapter == null) ? null : adapter.getFacade(); + } + + static UMLRTProtocolMessage getInstance(Operation operation, boolean conjugate) { + UMLRTProtocolMessage result = getInstance(operation); + + return ((result == null) || !conjugate) + ? result + : result.getConjugate(); + } + + static boolean isProtocolMessage(Operation operation) { + return (operation.getNamespace() instanceof Interface) + && isRTMessageSet((Interface) operation.getNamespace()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.PROTOCOL_MESSAGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinedElement() { + UMLRTProtocolMessage redefinedMessage = getRedefinedMessage(); + if (redefinedMessage != null) { + return redefinedMessage; + } + return super.getRedefinedElement(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTNamedElement getRedefinitionContext() { + UMLRTProtocol protocol = getProtocol(); + if (protocol != null) { + return protocol; + } + return super.getRedefinitionContext(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public RTMessageKind getKind() { + return forConjugation(getMessageSet().map(RTMessageSet::getRtMsgKind).orElse(null)); + } + + Optional<RTMessageSet> getMessageSet() { + return Optional.ofNullable(toUML().getNamespace()) + .filter(Interface.class::isInstance).map(Interface.class::cast) + .map(UMLRTProtocolImpl::getRTMessageSet); + } + + /** + * Obtains the 'real' conjugation to encode in the UML model according + * to my {@linkplain #isConjugate() conjugation}. + * + * @param kind + * a message direction kind + * @return the UML model's value of the {@code kind} + * + * @see #isConjugate() + */ + private RTMessageKind forConjugation(RTMessageKind kind) { + if ((kind != null) && isConjugate()) { + switch (kind) { + case IN: + kind = RTMessageKind.OUT; + break; + case OUT: + kind = RTMessageKind.IN; + break; + default: + // INOUT is its own inverse + break; + } + } + return kind; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setKind(RTMessageKind newKind) { + if (getKind() != Objects.requireNonNull(newKind, "newKind")) { //$NON-NLS-1$ + ((UMLRTProtocolImpl) getProtocol()).requireMessageSet(forConjugation(newKind)) + .getOwnedOperations().add(toUML()); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocolMessage getRedefinedMessage() { + UMLRTProtocolMessage result; + + if (toUML() instanceof InternalUMLRTElement) { + Operation superOperation = (Operation) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); + result = UMLRTProtocolMessageImpl.getInstance(superOperation, isConjugate()); + } else { + UMLRTNamedElement redef = super.getRedefinedElement(); + result = (redef instanceof UMLRTProtocolMessage) ? (UMLRTProtocolMessage) redef : null; + if ((result != null) && isConjugate()) { + result = result.getConjugate(); + } + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public List<Parameter> getParameters() { + return toUML().getOwnedParameters(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Parameter getParameter(String name, Type type) { + return getParameter(name, type, false); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Parameter getParameter(String name, Type type, boolean ignoreCase) { + parameterLoop: for (Parameter parameter : getParameters()) { + if (name != null && !(ignoreCase ? name.equalsIgnoreCase(parameter.getName()) : name.equals(parameter.getName()))) { + continue parameterLoop; + } + if (type != null && !type.equals(parameter.getType())) { + continue parameterLoop; + } + return parameter; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isConjugate() { + return isConjugate; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocolMessage getConjugate() { + return conjugate.get(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTProtocol getProtocol() { + Package protocolContainer = toUML().getNearestPackage(); + + return UMLRTProtocol.getInstance((Collaboration) protocolContainer.getOwnedType( + protocolContainer.getName(), false, UMLPackage.Literals.COLLABORATION, false), + isConjugate()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Operation toUML() { + return (Operation) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public CallEvent toReceiveEvent() { + return toUML().getNearestPackage().getPackagedElements().stream() + .filter(CallEvent.class::isInstance).map(CallEvent.class::cast) + .filter(ev -> ev.getOperation() == toUML()) + .findAny() + .orElse(null); + } + + UMLRTProtocolMessageImpl initReceiveEvent() { + CallEvent event = (CallEvent) toUML().getNearestPackage().createPackagedElement(null, UMLPackage.Literals.CALL_EVENT); + event.setOperation(toUML()); + return this; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Parameter createParameter(String name, Type type) { + return toUML().createOwnedParameter(name, type); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__KIND: + return getKind(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__REDEFINED_MESSAGE: + return getRedefinedMessage(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__PARAMETER: + return getParameters(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__IS_CONJUGATE: + return isConjugate(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__CONJUGATE: + return getConjugate(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__PROTOCOL: + return getProtocol(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__KIND: + setKind((RTMessageKind) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__KIND: + setKind(KIND_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__REDEFINED_ELEMENT: + return isSetRedefinedElement(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__REDEFINITION_CONTEXT: + return isSetRedefinitionContext(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__KIND: + return getKind() != KIND_EDEFAULT; + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__REDEFINED_MESSAGE: + return getRedefinedMessage() != null; + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__PARAMETER: + return !getParameters().isEmpty(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__IS_CONJUGATE: + return isConjugate() != IS_CONJUGATE_EDEFAULT; + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__CONJUGATE: + return getConjugate() != null; + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__PROTOCOL: + return getProtocol() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinedElement() { + return super.isSetRedefinedElement() + || eIsSet(UMLRTUMLRTPackage.PROTOCOL_MESSAGE__REDEFINED_MESSAGE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSetRedefinitionContext() { + return super.isSetRedefinitionContext() + || eIsSet(UMLRTUMLRTPackage.PROTOCOL_MESSAGE__PROTOCOL); + } + +} // UMLRTProtocolMessageImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTReplicatedElementImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTReplicatedElementImpl.java new file mode 100644 index 0000000..0b751b6 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTReplicatedElementImpl.java
@@ -0,0 +1,255 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.uml2.uml.LiteralInteger; +import org.eclipse.uml2.uml.LiteralUnlimitedNatural; +import org.eclipse.uml2.uml.MultiplicityElement; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Replicated Element</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTReplicatedElementImpl#getReplicationFactor <em>Replication Factor</em>}</li> + * <li>{@link org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.UMLRTReplicatedElementImpl#isSymbolicReplicationFactor <em>Symbolic Replication Factor</em>}</li> + * </ul> + * + * @generated + */ +public abstract class UMLRTReplicatedElementImpl extends UMLRTNamedElementImpl implements UMLRTReplicatedElement { + /** + * The default value of the '{@link #getReplicationFactor() <em>Replication Factor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getReplicationFactor() + * @generated + * @ordered + */ + protected static final int REPLICATION_FACTOR_EDEFAULT = 0; + /** + * The default value of the '{@link #isSymbolicReplicationFactor() <em>Symbolic Replication Factor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isSymbolicReplicationFactor() + * @generated + * @ordered + */ + protected static final boolean SYMBOLIC_REPLICATION_FACTOR_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTReplicatedElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UMLRTUMLRTPackage.Literals.REPLICATED_ELEMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public int getReplicationFactor() { + return getReplicationFactor(toUML().getUpperValue()); + } + + static int getReplicationFactor(ValueSpecification value) { + return (value == null) ? 1 : integerValue(value); + } + + private static int integerValue(ValueSpecification value) { + int result; + + if (value instanceof LiteralUnlimitedNatural) { + result = ((LiteralUnlimitedNatural) value).getValue(); + } else if (value instanceof LiteralInteger) { + result = ((LiteralInteger) value).getValue(); + } else { + String stringValue = value.stringValue(); + if (isIntegerValued(stringValue)) { + result = Integer.valueOf(stringValue); + } else { + result = 1; + } + } + + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void setReplicationFactor(int newReplicationFactor) { + setReplicationFactor(toUML(), newReplicationFactor); + } + + static void setReplicationFactor(MultiplicityElement mult, int replication) { + if ((replication != getReplicationFactor(mult.getUpperValue())) + || (replication != getReplicationFactor(mult.getLowerValue()))) { + mult.setLower(replication); + + if (mult.getLower() != 0) { + mult.setUpper(replication); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public boolean isSymbolicReplicationFactor() { + return isSymbolicReplicationFactor(toUML().getUpperValue()); + } + + static boolean isSymbolicReplicationFactor(ValueSpecification value) { + // The null value is interpreted by default as 1, which is an integer + return (value != null) + && !(value instanceof LiteralUnlimitedNatural) + && !(value instanceof LiteralInteger) + && !isIntegerValuedExpression(value); + } + + private static boolean isIntegerValuedExpression(ValueSpecification value) { + String stringValue = value.stringValue(); + return isIntegerValued(stringValue); + } + + private static boolean isIntegerValued(String stringValue) { + return (stringValue != null) + && stringValue.chars().allMatch(ch -> (ch >= '0') && (ch <= '9')); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Property toUML() { + return (Property) super.toUML(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public UMLRTCapsule getCapsule() { + return UMLRTCapsule.getInstance(toUML().getClass_()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UMLRTUMLRTPackage.REPLICATED_ELEMENT__REPLICATION_FACTOR: + return getReplicationFactor(); + case UMLRTUMLRTPackage.REPLICATED_ELEMENT__SYMBOLIC_REPLICATION_FACTOR: + return isSymbolicReplicationFactor(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UMLRTUMLRTPackage.REPLICATED_ELEMENT__REPLICATION_FACTOR: + setReplicationFactor((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.REPLICATED_ELEMENT__REPLICATION_FACTOR: + setReplicationFactor(REPLICATION_FACTOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UMLRTUMLRTPackage.REPLICATED_ELEMENT__REPLICATION_FACTOR: + return getReplicationFactor() != REPLICATION_FACTOR_EDEFAULT; + case UMLRTUMLRTPackage.REPLICATED_ELEMENT__SYMBOLIC_REPLICATION_FACTOR: + return isSymbolicReplicationFactor() != SYMBOLIC_REPLICATION_FACTOR_EDEFAULT; + } + return super.eIsSet(featureID); + } + +} // UMLRTReplicatedElementImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTUMLRTFactoryImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTUMLRTFactoryImpl.java new file mode 100644 index 0000000..b487e61 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTUMLRTFactoryImpl.java
@@ -0,0 +1,398 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import java.util.List; +import java.util.stream.Stream; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTModel; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTFactory; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * + * @generated + */ +public class UMLRTUMLRTFactoryImpl extends EFactoryImpl implements UMLRTUMLRTFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static UMLRTUMLRTFactory init() { + try { + UMLRTUMLRTFactory theUMLRTFactory = (UMLRTUMLRTFactory) EPackage.Registry.INSTANCE.getEFactory(UMLRTUMLRTPackage.eNS_URI); + if (theUMLRTFactory != null) { + return theUMLRTFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new UMLRTUMLRTFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTUMLRTFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case UMLRTUMLRTPackage.PACKAGE: + return (EObject) createPackage(); + case UMLRTUMLRTPackage.CAPSULE: + return (EObject) createCapsule(); + case UMLRTUMLRTPackage.PORT: + return (EObject) createPort(); + case UMLRTUMLRTPackage.PROTOCOL: + return (EObject) createProtocol(); + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE: + return (EObject) createProtocolMessage(); + case UMLRTUMLRTPackage.CAPSULE_PART: + return (EObject) createCapsulePart(); + case UMLRTUMLRTPackage.CONNECTOR: + return (EObject) createConnector(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case UMLRTUMLRTPackage.UMLRT_INHERITANCE_KIND: + return createUMLRTInheritanceKindFromString(eDataType, initialValue); + case UMLRTUMLRTPackage.UMLRT_PORT_KIND: + return createUMLRTPortKindFromString(eDataType, initialValue); + case UMLRTUMLRTPackage.UMLRT_CAPSULE_PART_KIND: + return createUMLRTCapsulePartKindFromString(eDataType, initialValue); + case UMLRTUMLRTPackage.MODEL: + return createModelFromString(eDataType, initialValue); + case UMLRTUMLRTPackage.LIST: + return createListFromString(eDataType, initialValue); + case UMLRTUMLRTPackage.STREAM: + return createStreamFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case UMLRTUMLRTPackage.UMLRT_INHERITANCE_KIND: + return convertUMLRTInheritanceKindToString(eDataType, instanceValue); + case UMLRTUMLRTPackage.UMLRT_PORT_KIND: + return convertUMLRTPortKindToString(eDataType, instanceValue); + case UMLRTUMLRTPackage.UMLRT_CAPSULE_PART_KIND: + return convertUMLRTCapsulePartKindToString(eDataType, instanceValue); + case UMLRTUMLRTPackage.MODEL: + return convertModelToString(eDataType, instanceValue); + case UMLRTUMLRTPackage.LIST: + return convertListToString(eDataType, instanceValue); + case UMLRTUMLRTPackage.STREAM: + return convertStreamToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTPackage createPackage() { + UMLRTPackageImpl package_ = new UMLRTPackageImpl(); + return package_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsule createCapsule() { + UMLRTCapsuleImpl capsule = new UMLRTCapsuleImpl(); + return capsule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocol createProtocol() { + UMLRTProtocolImpl protocol = new UMLRTProtocolImpl(); + return protocol; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTPort createPort() { + UMLRTPortImpl port = new UMLRTPortImpl(); + return port; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTCapsulePart createCapsulePart() { + UMLRTCapsulePartImpl capsulePart = new UMLRTCapsulePartImpl(); + return capsulePart; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTConnector createConnector() { + UMLRTConnectorImpl connector = new UMLRTConnectorImpl(); + return connector; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTProtocolMessage createProtocolMessage() { + UMLRTProtocolMessageImpl protocolMessage = new UMLRTProtocolMessageImpl(); + return protocolMessage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTInheritanceKind createUMLRTInheritanceKindFromString(EDataType eDataType, String initialValue) { + UMLRTInheritanceKind result = UMLRTInheritanceKind.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String convertUMLRTInheritanceKindToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTPortKind createUMLRTPortKindFromString(EDataType eDataType, String initialValue) { + UMLRTPortKind result = UMLRTPortKind.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String convertUMLRTPortKindToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTCapsulePartKind createUMLRTCapsulePartKindFromString(EDataType eDataType, String initialValue) { + UMLRTCapsulePartKind result = UMLRTCapsulePartKind.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String convertUMLRTCapsulePartKindToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTModel createModelFromString(EDataType eDataType, String initialValue) { + return (UMLRTModel) super.createFromString(eDataType, initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String convertModelToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public List<?> createListFromString(EDataType eDataType, String initialValue) { + return (List<?>) super.createFromString(initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String convertListToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public Stream<?> createStreamFromString(EDataType eDataType, String initialValue) { + return (Stream<?>) super.createFromString(initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String convertStreamToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTUMLRTPackage getUMLRTPackage() { + return (UMLRTUMLRTPackage) getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @deprecated + * @generated + */ + @Deprecated + public static UMLRTUMLRTPackage getPackage() { + return UMLRTUMLRTPackage.eINSTANCE; + } + +} // UMLRTUMLRTFactoryImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTUMLRTPackageImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTUMLRTPackageImpl.java new file mode 100644 index 0000000..91d6073 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/UMLRTUMLRTPackageImpl.java
@@ -0,0 +1,2363 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import java.util.List; +import java.util.stream.Stream; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.ETypeParameter; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePartKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTInheritanceKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTModel; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPortKind; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTFactory; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; +import org.eclipse.uml2.types.TypesPackage; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @generated + */ +public class UMLRTUMLRTPackageImpl extends EPackageImpl implements UMLRTUMLRTPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass namedElementEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass packageEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass capsuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass classifierEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass protocolEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass replicatedElementEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass portEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass capsulePartEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass connectorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass protocolMessageEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EEnum umlrtInheritanceKindEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EEnum umlrtPortKindEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EEnum umlrtCapsulePartKindEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EDataType modelEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EDataType listEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EDataType streamEDataType = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p> + * Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage#eNS_URI + * @see #init() + * @generated + */ + private UMLRTUMLRTPackageImpl() { + super(eNS_URI, UMLRTUMLRTFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p> + * This method is used to initialize {@link UMLRTUMLRTPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static UMLRTUMLRTPackage init() { + if (isInited) { + return (UMLRTUMLRTPackage) EPackage.Registry.INSTANCE.getEPackage(UMLRTUMLRTPackage.eNS_URI); + } + + // Obtain or create and register package + UMLRTUMLRTPackageImpl theUMLRTPackage = (UMLRTUMLRTPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof UMLRTUMLRTPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new UMLRTUMLRTPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + UMLRealTimePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theUMLRTPackage.createPackageContents(); + + // Initialize created meta-data + theUMLRTPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theUMLRTPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(UMLRTUMLRTPackage.eNS_URI, theUMLRTPackage); + return theUMLRTPackage; + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getNamedElement() { + return namedElementEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getNamedElement_Model() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getNamedElement_InheritanceKind() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getNamedElement_Name() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(2); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getNamedElement_IsInherited() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(3); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getNamedElement_IsVirtualRedefinition() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(4); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getNamedElement_IsRedefinition() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(5); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getNamedElement_IsExcluded() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(6); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getNamedElement_RedefinedElement() { + return (EReference) namedElementEClass.getEStructuralFeatures().get(7); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getNamedElement_RedefinitionContext() { + return (EReference) namedElementEClass.getEStructuralFeatures().get(8); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getNamedElement_RedefinableElement() { + return (EReference) namedElementEClass.getEStructuralFeatures().get(9); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getNamedElement_InheritedElement() { + return (EReference) namedElementEClass.getEStructuralFeatures().get(10); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getNamedElement_RootDefinition() { + return (EReference) namedElementEClass.getEStructuralFeatures().get(11); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getNamedElement_ExcludedElement() { + return (EReference) namedElementEClass.getEStructuralFeatures().get(12); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getPackage() { + return packageEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPackage_NestedPackage() { + return (EReference) packageEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPackage_NestingPackage() { + return (EReference) packageEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPackage_Capsule() { + return (EReference) packageEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPackage_Protocol() { + return (EReference) packageEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getCapsule() { + return capsuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsule_Superclass() { + return (EReference) capsuleEClass.getEStructuralFeatures().get(0); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsule_Subclass() { + return (EReference) capsuleEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsule_Port() { + return (EReference) capsuleEClass.getEStructuralFeatures().get(2); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsule_Connector() { + return (EReference) capsuleEClass.getEStructuralFeatures().get(4); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsule_CapsulePart() { + return (EReference) capsuleEClass.getEStructuralFeatures().get(3); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getCapsule_Hierarchy() { + return (EAttribute) capsuleEClass.getEStructuralFeatures().get(5); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsule_Package() { + return (EReference) capsuleEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getClassifier() { + return classifierEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getClassifier_General() { + return (EReference) classifierEClass.getEStructuralFeatures().get(0); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getClassifier_Specific() { + return (EReference) classifierEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getProtocol() { + return protocolEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_SuperProtocol() { + return (EReference) protocolEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_SubProtocol() { + return (EReference) protocolEClass.getEStructuralFeatures().get(2); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_Message() { + return (EReference) protocolEClass.getEStructuralFeatures().get(3); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_InMessage() { + return (EReference) protocolEClass.getEStructuralFeatures().get(4); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_OutMessage() { + return (EReference) protocolEClass.getEStructuralFeatures().get(5); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_InOutMessage() { + return (EReference) protocolEClass.getEStructuralFeatures().get(6); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getProtocol_IsConjugate() { + return (EAttribute) protocolEClass.getEStructuralFeatures().get(7); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_Conjugate() { + return (EReference) protocolEClass.getEStructuralFeatures().get(8); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getProtocol_Hierarchy() { + return (EAttribute) protocolEClass.getEStructuralFeatures().get(9); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocol_Package() { + return (EReference) protocolEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getReplicatedElement() { + return replicatedElementEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getReplicatedElement_ReplicationFactor() { + return (EAttribute) replicatedElementEClass.getEStructuralFeatures().get(0); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getReplicatedElement_SymbolicReplicationFactor() { + return (EAttribute) replicatedElementEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getPort() { + return portEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Kind() { + return (EAttribute) portEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPort_RedefinedPort() { + return (EReference) portEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPort_Type() { + return (EReference) portEClass.getEStructuralFeatures().get(2); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPort_PartsWithPort() { + return (EReference) portEClass.getEStructuralFeatures().get(3); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Service() { + return (EAttribute) portEClass.getEStructuralFeatures().get(4); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Behavior() { + return (EAttribute) portEClass.getEStructuralFeatures().get(5); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Conjugated() { + return (EAttribute) portEClass.getEStructuralFeatures().get(6); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Wired() { + return (EAttribute) portEClass.getEStructuralFeatures().get(7); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Publish() { + return (EAttribute) portEClass.getEStructuralFeatures().get(8); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Notification() { + return (EAttribute) portEClass.getEStructuralFeatures().get(9); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_Registration() { + return (EAttribute) portEClass.getEStructuralFeatures().get(10); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_RegistrationOverride() { + return (EAttribute) portEClass.getEStructuralFeatures().get(11); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_IsConnected() { + return (EAttribute) portEClass.getEStructuralFeatures().get(12); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_IsConnectedInside() { + return (EAttribute) portEClass.getEStructuralFeatures().get(13); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getPort_IsConnectedOutside() { + return (EAttribute) portEClass.getEStructuralFeatures().get(14); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPort_Connector() { + return (EReference) portEClass.getEStructuralFeatures().get(15); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPort_InsideConnector() { + return (EReference) portEClass.getEStructuralFeatures().get(16); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPort_OutsideConnector() { + return (EReference) portEClass.getEStructuralFeatures().get(17); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getPort_Capsule() { + return (EReference) portEClass.getEStructuralFeatures().get(18); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getCapsulePart() { + return capsulePartEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getCapsulePart_Kind() { + return (EAttribute) capsulePartEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getCapsulePart_Optional() { + return (EAttribute) capsulePartEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsulePart_RedefinedPart() { + return (EReference) capsulePartEClass.getEStructuralFeatures().get(2); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsulePart_Type() { + return (EReference) capsulePartEClass.getEStructuralFeatures().get(4); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCapsulePart_Capsule() { + return (EReference) capsulePartEClass.getEStructuralFeatures().get(3); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getConnector() { + return connectorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getConnector_RedefinedConnector() { + return (EReference) connectorEClass.getEStructuralFeatures().get(0); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getConnector_Capsule() { + return (EReference) connectorEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getConnector_Source() { + return (EReference) connectorEClass.getEStructuralFeatures().get(2); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getConnector_SourcePartWithPort() { + return (EReference) connectorEClass.getEStructuralFeatures().get(3); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getConnector_SourceReplicationFactor() { + return (EAttribute) connectorEClass.getEStructuralFeatures().get(4); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getConnector_Target() { + return (EReference) connectorEClass.getEStructuralFeatures().get(5); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getConnector_TargetPartWithPort() { + return (EReference) connectorEClass.getEStructuralFeatures().get(6); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getConnector_TargetReplicationFactor() { + return (EAttribute) connectorEClass.getEStructuralFeatures().get(7); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getProtocolMessage() { + return protocolMessageEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getProtocolMessage_Kind() { + return (EAttribute) protocolMessageEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocolMessage_RedefinedMessage() { + return (EReference) protocolMessageEClass.getEStructuralFeatures().get(1); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocolMessage_Parameter() { + return (EReference) protocolMessageEClass.getEStructuralFeatures().get(2); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getProtocolMessage_IsConjugate() { + return (EAttribute) protocolMessageEClass.getEStructuralFeatures().get(3); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocolMessage_Conjugate() { + return (EReference) protocolMessageEClass.getEStructuralFeatures().get(4); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getProtocolMessage_Protocol() { + return (EReference) protocolMessageEClass.getEStructuralFeatures().get(5); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEnum getUMLRTInheritanceKind() { + return umlrtInheritanceKindEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEnum getUMLRTPortKind() { + return umlrtPortKindEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEnum getUMLRTCapsulePartKind() { + return umlrtCapsulePartKindEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EDataType getModel() { + return modelEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EDataType getList() { + return listEDataType; + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EDataType getStream() { + return streamEDataType; + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public UMLRTUMLRTFactory getUMLRTFactory() { + return (UMLRTUMLRTFactory) getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public void createPackageContents() { + if (isCreated) { + return; + } + isCreated = true; + + // Create classes and their features + namedElementEClass = createEClass(NAMED_ELEMENT); + createEAttribute(namedElementEClass, NAMED_ELEMENT__MODEL); + createEAttribute(namedElementEClass, NAMED_ELEMENT__INHERITANCE_KIND); + createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME); + createEAttribute(namedElementEClass, NAMED_ELEMENT__IS_INHERITED); + createEAttribute(namedElementEClass, NAMED_ELEMENT__IS_VIRTUAL_REDEFINITION); + createEAttribute(namedElementEClass, NAMED_ELEMENT__IS_REDEFINITION); + createEAttribute(namedElementEClass, NAMED_ELEMENT__IS_EXCLUDED); + createEReference(namedElementEClass, NAMED_ELEMENT__REDEFINED_ELEMENT); + createEReference(namedElementEClass, NAMED_ELEMENT__REDEFINITION_CONTEXT); + createEReference(namedElementEClass, NAMED_ELEMENT__REDEFINABLE_ELEMENT); + createEReference(namedElementEClass, NAMED_ELEMENT__INHERITED_ELEMENT); + createEReference(namedElementEClass, NAMED_ELEMENT__ROOT_DEFINITION); + createEReference(namedElementEClass, NAMED_ELEMENT__EXCLUDED_ELEMENT); + + packageEClass = createEClass(PACKAGE); + createEReference(packageEClass, PACKAGE__NESTED_PACKAGE); + createEReference(packageEClass, PACKAGE__NESTING_PACKAGE); + createEReference(packageEClass, PACKAGE__CAPSULE); + createEReference(packageEClass, PACKAGE__PROTOCOL); + + capsuleEClass = createEClass(CAPSULE); + createEReference(capsuleEClass, CAPSULE__SUPERCLASS); + createEReference(capsuleEClass, CAPSULE__SUBCLASS); + createEReference(capsuleEClass, CAPSULE__PORT); + createEReference(capsuleEClass, CAPSULE__CAPSULE_PART); + createEReference(capsuleEClass, CAPSULE__CONNECTOR); + createEAttribute(capsuleEClass, CAPSULE__HIERARCHY); + createEReference(capsuleEClass, CAPSULE__PACKAGE); + + classifierEClass = createEClass(CLASSIFIER); + createEReference(classifierEClass, CLASSIFIER__GENERAL); + createEReference(classifierEClass, CLASSIFIER__SPECIFIC); + + portEClass = createEClass(PORT); + createEAttribute(portEClass, PORT__KIND); + createEReference(portEClass, PORT__REDEFINED_PORT); + createEReference(portEClass, PORT__TYPE); + createEReference(portEClass, PORT__PARTS_WITH_PORT); + createEAttribute(portEClass, PORT__SERVICE); + createEAttribute(portEClass, PORT__BEHAVIOR); + createEAttribute(portEClass, PORT__CONJUGATED); + createEAttribute(portEClass, PORT__WIRED); + createEAttribute(portEClass, PORT__PUBLISH); + createEAttribute(portEClass, PORT__NOTIFICATION); + createEAttribute(portEClass, PORT__REGISTRATION); + createEAttribute(portEClass, PORT__REGISTRATION_OVERRIDE); + createEAttribute(portEClass, PORT__IS_CONNECTED); + createEAttribute(portEClass, PORT__IS_CONNECTED_INSIDE); + createEAttribute(portEClass, PORT__IS_CONNECTED_OUTSIDE); + createEReference(portEClass, PORT__CONNECTOR); + createEReference(portEClass, PORT__INSIDE_CONNECTOR); + createEReference(portEClass, PORT__OUTSIDE_CONNECTOR); + createEReference(portEClass, PORT__CAPSULE); + + replicatedElementEClass = createEClass(REPLICATED_ELEMENT); + createEAttribute(replicatedElementEClass, REPLICATED_ELEMENT__REPLICATION_FACTOR); + createEAttribute(replicatedElementEClass, REPLICATED_ELEMENT__SYMBOLIC_REPLICATION_FACTOR); + + protocolEClass = createEClass(PROTOCOL); + createEReference(protocolEClass, PROTOCOL__PACKAGE); + createEReference(protocolEClass, PROTOCOL__SUPER_PROTOCOL); + createEReference(protocolEClass, PROTOCOL__SUB_PROTOCOL); + createEReference(protocolEClass, PROTOCOL__MESSAGE); + createEReference(protocolEClass, PROTOCOL__IN_MESSAGE); + createEReference(protocolEClass, PROTOCOL__OUT_MESSAGE); + createEReference(protocolEClass, PROTOCOL__IN_OUT_MESSAGE); + createEAttribute(protocolEClass, PROTOCOL__IS_CONJUGATE); + createEReference(protocolEClass, PROTOCOL__CONJUGATE); + createEAttribute(protocolEClass, PROTOCOL__HIERARCHY); + + protocolMessageEClass = createEClass(PROTOCOL_MESSAGE); + createEAttribute(protocolMessageEClass, PROTOCOL_MESSAGE__KIND); + createEReference(protocolMessageEClass, PROTOCOL_MESSAGE__REDEFINED_MESSAGE); + createEReference(protocolMessageEClass, PROTOCOL_MESSAGE__PARAMETER); + createEAttribute(protocolMessageEClass, PROTOCOL_MESSAGE__IS_CONJUGATE); + createEReference(protocolMessageEClass, PROTOCOL_MESSAGE__CONJUGATE); + createEReference(protocolMessageEClass, PROTOCOL_MESSAGE__PROTOCOL); + + capsulePartEClass = createEClass(CAPSULE_PART); + createEAttribute(capsulePartEClass, CAPSULE_PART__KIND); + createEAttribute(capsulePartEClass, CAPSULE_PART__OPTIONAL); + createEReference(capsulePartEClass, CAPSULE_PART__REDEFINED_PART); + createEReference(capsulePartEClass, CAPSULE_PART__CAPSULE); + createEReference(capsulePartEClass, CAPSULE_PART__TYPE); + + connectorEClass = createEClass(CONNECTOR); + createEReference(connectorEClass, CONNECTOR__REDEFINED_CONNECTOR); + createEReference(connectorEClass, CONNECTOR__CAPSULE); + createEReference(connectorEClass, CONNECTOR__SOURCE); + createEReference(connectorEClass, CONNECTOR__SOURCE_PART_WITH_PORT); + createEAttribute(connectorEClass, CONNECTOR__SOURCE_REPLICATION_FACTOR); + createEReference(connectorEClass, CONNECTOR__TARGET); + createEReference(connectorEClass, CONNECTOR__TARGET_PART_WITH_PORT); + createEAttribute(connectorEClass, CONNECTOR__TARGET_REPLICATION_FACTOR); + + // Create enums + umlrtInheritanceKindEEnum = createEEnum(UMLRT_INHERITANCE_KIND); + umlrtPortKindEEnum = createEEnum(UMLRT_PORT_KIND); + umlrtCapsulePartKindEEnum = createEEnum(UMLRT_CAPSULE_PART_KIND); + + // Create data types + modelEDataType = createEDataType(MODEL); + listEDataType = createEDataType(LIST); + streamEDataType = createEDataType(STREAM); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) { + return; + } + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); + UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + UMLRealTimePackage theUMLRealTimePackage = (UMLRealTimePackage) EPackage.Registry.INSTANCE.getEPackage(UMLRealTimePackage.eNS_URI); + + // Create type parameters + addETypeParameter(listEDataType, "E"); //$NON-NLS-1$ + addETypeParameter(streamEDataType, "E"); //$NON-NLS-1$ + + // Set bounds for type parameters + + // Add supertypes to classes + packageEClass.getESuperTypes().add(this.getNamedElement()); + capsuleEClass.getESuperTypes().add(this.getClassifier()); + classifierEClass.getESuperTypes().add(this.getNamedElement()); + portEClass.getESuperTypes().add(this.getReplicatedElement()); + replicatedElementEClass.getESuperTypes().add(this.getNamedElement()); + protocolEClass.getESuperTypes().add(this.getClassifier()); + protocolMessageEClass.getESuperTypes().add(this.getNamedElement()); + capsulePartEClass.getESuperTypes().add(this.getReplicatedElement()); + connectorEClass.getESuperTypes().add(this.getNamedElement()); + + // Initialize classes and features; add operations and parameters + initEClass(namedElementEClass, UMLRTNamedElement.class, "NamedElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getNamedElement_Model(), this.getModel(), "model", null, 1, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getNamedElement_InheritanceKind(), this.getUMLRTInheritanceKind(), "inheritanceKind", null, 1, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getNamedElement_Name(), theTypesPackage.getString(), "name", null, 0, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getNamedElement_IsInherited(), theTypesPackage.getBoolean(), "isInherited", null, 1, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getNamedElement_IsVirtualRedefinition(), theTypesPackage.getBoolean(), "isVirtualRedefinition", null, 1, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getNamedElement_IsRedefinition(), theTypesPackage.getBoolean(), "isRedefinition", null, 1, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getNamedElement_IsExcluded(), theTypesPackage.getBoolean(), "isExcluded", null, 1, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getNamedElement_RedefinedElement(), this.getNamedElement(), null, "redefinedElement", null, 0, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getNamedElement_RedefinitionContext(), this.getNamedElement(), this.getNamedElement_RedefinableElement(), "redefinitionContext", null, 0, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); + initEReference(getNamedElement_RedefinableElement(), this.getNamedElement(), this.getNamedElement_RedefinitionContext(), "redefinableElement", null, 0, -1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); + initEReference(getNamedElement_InheritedElement(), this.getNamedElement(), null, "inheritedElement", null, 0, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getNamedElement_RootDefinition(), this.getNamedElement(), null, "rootDefinition", null, 0, 1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getNamedElement_ExcludedElement(), this.getNamedElement(), null, "excludedElement", null, 0, -1, UMLRTNamedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + + addEOperation(namedElementEClass, theUMLPackage.getNamedElement(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + EOperation op = addEOperation(namedElementEClass, theTypesPackage.getBoolean(), "redefines", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getNamedElement(), "element", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(namedElementEClass, null, "getRedefinitionOf", 0, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + ETypeParameter t1 = addETypeParameter(op, "T"); //$NON-NLS-1$ + EGenericType g1 = createEGenericType(this.getNamedElement()); + t1.getEBounds().add(g1); + g1 = createEGenericType(t1); + addEParameter(op, g1, "element", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + g1 = createEGenericType(t1); + initEOperation(op, g1); + + addEOperation(namedElementEClass, this.getNamedElement(), "getRedefinitionChain", 1, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(namedElementEClass, null, "getExcludedElement", 0, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + t1 = addETypeParameter(op, "T"); //$NON-NLS-1$ + g1 = createEGenericType(this.getNamedElement()); + t1.getEBounds().add(g1); + addEParameter(op, theTypesPackage.getString(), "name", 0, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + g1 = createEGenericType(theEcorePackage.getEJavaClass()); + EGenericType g2 = createEGenericType(t1); + g1.getETypeArguments().add(g2); + addEParameter(op, g1, "type", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + g1 = createEGenericType(t1); + initEOperation(op, g1); + + addEOperation(namedElementEClass, theTypesPackage.getBoolean(), "exclude", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(namedElementEClass, theTypesPackage.getBoolean(), "reinherit", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(namedElementEClass, null, "reify", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(namedElementEClass, null, "destroy", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(packageEClass, UMLRTPackage.class, "Package", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getPackage_NestedPackage(), this.getPackage(), this.getPackage_NestingPackage(), "nestedPackage", null, 0, -1, UMLRTPackage.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getPackage_NestingPackage(), this.getPackage(), this.getPackage_NestedPackage(), "nestingPackage", null, 0, 1, UMLRTPackage.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getPackage_Capsule(), this.getCapsule(), this.getCapsule_Package(), "capsule", null, 0, -1, UMLRTPackage.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getPackage_Protocol(), this.getProtocol(), this.getProtocol_Package(), "protocol", null, 0, -1, UMLRTPackage.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + + addEOperation(packageEClass, theUMLPackage.getPackage(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(packageEClass, this.getPackage(), "createNestedPackage", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(packageEClass, this.getCapsule(), "createCapsule", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(packageEClass, this.getProtocol(), "createProtocol", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(capsuleEClass, UMLRTCapsule.class, "Capsule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getCapsule_Superclass(), this.getCapsule(), this.getCapsule_Subclass(), "superclass", null, 0, 1, UMLRTCapsule.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getCapsule_Subclass(), this.getCapsule(), this.getCapsule_Superclass(), "subclass", null, 0, -1, UMLRTCapsule.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getCapsule_Port(), this.getPort(), this.getPort_Capsule(), "port", null, 0, -1, UMLRTCapsule.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getCapsule_CapsulePart(), this.getCapsulePart(), this.getCapsulePart_Capsule(), "capsulePart", null, 0, -1, UMLRTCapsule.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getCapsule_Connector(), this.getConnector(), this.getConnector_Capsule(), "connector", null, 0, -1, UMLRTCapsule.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + g1 = createEGenericType(this.getStream()); + g2 = createEGenericType(this.getCapsule()); + g1.getETypeArguments().add(g2); + initEAttribute(getCapsule_Hierarchy(), g1, "hierarchy", null, 1, 1, UMLRTCapsule.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getCapsule_Package(), this.getPackage(), this.getPackage_Capsule(), "package", null, 1, 1, UMLRTCapsule.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + + addEOperation(capsuleEClass, theUMLPackage.getClass_(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(capsuleEClass, this.getCapsule(), "getAncestry", 1, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsuleEClass, this.getPort(), "getPorts", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getBoolean(), "withExclusions", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsuleEClass, this.getCapsulePart(), "getCapsuleParts", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getBoolean(), "withExclusions", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsuleEClass, this.getConnector(), "getConnectors", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getBoolean(), "withExclusions", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsuleEClass, this.getPort(), "createPort", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getProtocol(), "type", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsuleEClass, this.getPort(), "createPort", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getProtocol(), "type", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getUMLRTPortKind(), "kind", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsuleEClass, this.getCapsulePart(), "createCapsulePart", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getCapsule(), "type", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsuleEClass, this.getConnector(), "createConnector", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getPort(), "source", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getCapsulePart(), "sourcePartWithPort", 0, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getPort(), "target", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getCapsulePart(), "targetPartWithPort", 0, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(classifierEClass, UMLRTClassifier.class, "Classifier", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getClassifier_General(), this.getClassifier(), this.getClassifier_Specific(), "general", null, 0, 1, UMLRTClassifier.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getClassifier_Specific(), this.getClassifier(), this.getClassifier_General(), "specific", null, 0, -1, UMLRTClassifier.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + + addEOperation(classifierEClass, theUMLPackage.getClassifier(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(classifierEClass, this.getPackage(), "getPackage", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(classifierEClass, null, "getAncestry", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + g1 = createEGenericType(this.getList()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + EGenericType g3 = createEGenericType(this.getClassifier()); + g2.setEUpperBound(g3); + initEOperation(op, g1); + + op = addEOperation(classifierEClass, null, "getHierarchy", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + g1 = createEGenericType(this.getStream()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + g3 = createEGenericType(this.getClassifier()); + g2.setEUpperBound(g3); + initEOperation(op, g1); + + op = addEOperation(classifierEClass, theTypesPackage.getBoolean(), "isSuperTypeOf", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getClassifier(), "classifier", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(classifierEClass, null, "setGeneral", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getClassifier(), "general", 0, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(portEClass, UMLRTPort.class, "Port", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getPort_Kind(), this.getUMLRTPortKind(), "kind", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getPort_RedefinedPort(), this.getPort(), null, "redefinedPort", null, 0, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getPort_Type(), this.getProtocol(), null, "type", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getPort_PartsWithPort(), this.getCapsulePart(), null, "partsWithPort", null, 0, -1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_Service(), theTypesPackage.getBoolean(), "service", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_Behavior(), theTypesPackage.getBoolean(), "behavior", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_Conjugated(), theTypesPackage.getBoolean(), "conjugated", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_Wired(), theTypesPackage.getBoolean(), "wired", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_Publish(), theTypesPackage.getBoolean(), "publish", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_Notification(), theTypesPackage.getBoolean(), "notification", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_Registration(), theUMLRealTimePackage.getPortRegistrationType(), "registration", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_RegistrationOverride(), theTypesPackage.getString(), "registrationOverride", null, 0, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_IsConnected(), theTypesPackage.getBoolean(), "isConnected", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_IsConnectedInside(), theTypesPackage.getBoolean(), "isConnectedInside", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getPort_IsConnectedOutside(), theTypesPackage.getBoolean(), "isConnectedOutside", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getPort_Connector(), this.getConnector(), null, "connector", null, 0, -1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getPort_InsideConnector(), this.getConnector(), null, "insideConnector", null, 0, -1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getPort_OutsideConnector(), this.getConnector(), null, "outsideConnector", null, 0, -1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getPort_Capsule(), this.getCapsule(), this.getCapsule_Port(), "capsule", null, 1, 1, UMLRTPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(portEClass, theUMLPackage.getPort(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(replicatedElementEClass, UMLRTReplicatedElement.class, "ReplicatedElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getReplicatedElement_ReplicationFactor(), theTypesPackage.getInteger(), "replicationFactor", null, 1, 1, UMLRTReplicatedElement.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getReplicatedElement_SymbolicReplicationFactor(), theTypesPackage.getBoolean(), "symbolicReplicationFactor", null, 1, 1, UMLRTReplicatedElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + + addEOperation(replicatedElementEClass, theUMLPackage.getProperty(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(replicatedElementEClass, this.getCapsule(), "getCapsule", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(protocolEClass, UMLRTProtocol.class, "Protocol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getProtocol_Package(), this.getPackage(), this.getPackage_Protocol(), "package", null, 1, 1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getProtocol_SuperProtocol(), this.getProtocol(), this.getProtocol_SubProtocol(), "superProtocol", null, 0, 1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getProtocol_SubProtocol(), this.getProtocol(), this.getProtocol_SuperProtocol(), "subProtocol", null, 0, -1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getProtocol_Message(), this.getProtocolMessage(), this.getProtocolMessage_Protocol(), "message", null, 0, -1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getProtocol_InMessage(), this.getProtocolMessage(), null, "inMessage", null, 0, -1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getProtocol_OutMessage(), this.getProtocolMessage(), null, "outMessage", null, 0, -1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getProtocol_InOutMessage(), this.getProtocolMessage(), null, "inOutMessage", null, 0, -1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEAttribute(getProtocol_IsConjugate(), theTypesPackage.getBoolean(), "isConjugate", null, 1, 1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getProtocol_Conjugate(), this.getProtocol(), null, "conjugate", null, 1, 1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + g1 = createEGenericType(this.getStream()); + g2 = createEGenericType(this.getProtocol()); + g1.getETypeArguments().add(g2); + initEAttribute(getProtocol_Hierarchy(), g1, "hierarchy", null, 1, 1, UMLRTProtocol.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(protocolEClass, theUMLPackage.getCollaboration(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(protocolEClass, theUMLPackage.getAnyReceiveEvent(), "getAnyReceiveEvent", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(protocolEClass, this.getProtocol(), "getAncestry", 1, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(protocolEClass, this.getProtocolMessage(), "getMessages", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLRealTimePackage.getRTMessageKind(), "kind", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(protocolEClass, this.getProtocolMessage(), "getMessages", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLRealTimePackage.getRTMessageKind(), "kind", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getBoolean(), "withExclusions", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(protocolEClass, this.getProtocolMessage(), "getMessages", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getBoolean(), "withExclusions", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(protocolEClass, this.getProtocolMessage(), "createMessage", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLRealTimePackage.getRTMessageKind(), "kind", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(protocolEClass, this.getProtocolMessage(), "createMessage", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLRealTimePackage.getRTMessageKind(), "kind", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLPackage.getType(), "dataType", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(protocolEClass, this.getProtocolMessage(), "createMessage", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLRealTimePackage.getRTMessageKind(), "kind", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "parameterName", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLPackage.getType(), "parameterType", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(protocolMessageEClass, UMLRTProtocolMessage.class, "ProtocolMessage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getProtocolMessage_Kind(), theUMLRealTimePackage.getRTMessageKind(), "kind", null, 1, 1, UMLRTProtocolMessage.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getProtocolMessage_RedefinedMessage(), this.getProtocolMessage(), null, "redefinedMessage", null, 0, 1, UMLRTProtocolMessage.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getProtocolMessage_Parameter(), theUMLPackage.getParameter(), null, "parameter", null, 0, -1, UMLRTProtocolMessage.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEAttribute(getProtocolMessage_IsConjugate(), theTypesPackage.getBoolean(), "isConjugate", null, 1, 1, UMLRTProtocolMessage.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getProtocolMessage_Conjugate(), this.getProtocolMessage(), null, "conjugate", null, 1, 1, UMLRTProtocolMessage.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getProtocolMessage_Protocol(), this.getProtocol(), this.getProtocol_Message(), "protocol", null, 1, 1, UMLRTProtocolMessage.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + + addEOperation(protocolMessageEClass, theUMLPackage.getOperation(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(protocolMessageEClass, theUMLPackage.getCallEvent(), "toReceiveEvent", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(protocolMessageEClass, theUMLPackage.getParameter(), "createParameter", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theTypesPackage.getString(), "name", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theUMLPackage.getType(), "type", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(capsulePartEClass, UMLRTCapsulePart.class, "CapsulePart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getCapsulePart_Kind(), this.getUMLRTCapsulePartKind(), "kind", null, 1, 1, UMLRTCapsulePart.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getCapsulePart_Optional(), theTypesPackage.getBoolean(), "optional", null, 1, 1, UMLRTCapsulePart.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getCapsulePart_RedefinedPart(), this.getCapsulePart(), null, "redefinedPart", null, 0, 1, UMLRTCapsulePart.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getCapsulePart_Capsule(), this.getCapsule(), this.getCapsule_CapsulePart(), "capsule", null, 1, 1, UMLRTCapsulePart.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + IS_DERIVED, !IS_ORDERED); + initEReference(getCapsulePart_Type(), this.getCapsule(), null, "type", null, 1, 1, UMLRTCapsulePart.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(capsulePartEClass, this.getConnector(), "getConnectorsOf", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getPort(), "port", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(capsulePartEClass, this.getConnector(), "getConnectorsOfPorts", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(connectorEClass, UMLRTConnector.class, "Connector", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getConnector_RedefinedConnector(), this.getConnector(), null, "redefinedConnector", null, 0, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getConnector_Capsule(), this.getCapsule(), this.getCapsule_Connector(), "capsule", null, 1, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEReference(getConnector_Source(), this.getPort(), null, "source", null, 1, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getConnector_SourcePartWithPort(), this.getCapsulePart(), null, "sourcePartWithPort", null, 0, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEAttribute(getConnector_SourceReplicationFactor(), theTypesPackage.getInteger(), "sourceReplicationFactor", null, 1, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getConnector_Target(), this.getPort(), null, "target", null, 1, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getConnector_TargetPartWithPort(), this.getCapsulePart(), null, "targetPartWithPort", null, 0, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, //$NON-NLS-1$ + !IS_ORDERED); + initEAttribute(getConnector_TargetReplicationFactor(), theTypesPackage.getInteger(), "targetReplicationFactor", null, 1, 1, UMLRTConnector.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + addEOperation(connectorEClass, theUMLPackage.getConnector(), "toUML", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + // Initialize enums and add enum literals + initEEnum(umlrtInheritanceKindEEnum, UMLRTInheritanceKind.class, "UMLRTInheritanceKind"); //$NON-NLS-1$ + addEEnumLiteral(umlrtInheritanceKindEEnum, UMLRTInheritanceKind.INHERITED); + addEEnumLiteral(umlrtInheritanceKindEEnum, UMLRTInheritanceKind.REDEFINED); + addEEnumLiteral(umlrtInheritanceKindEEnum, UMLRTInheritanceKind.EXCLUDED); + addEEnumLiteral(umlrtInheritanceKindEEnum, UMLRTInheritanceKind.NONE); + + initEEnum(umlrtPortKindEEnum, UMLRTPortKind.class, "UMLRTPortKind"); //$NON-NLS-1$ + addEEnumLiteral(umlrtPortKindEEnum, UMLRTPortKind.EXTERNAL_BEHAVIOR); + addEEnumLiteral(umlrtPortKindEEnum, UMLRTPortKind.INTERNAL_BEHAVIOR); + addEEnumLiteral(umlrtPortKindEEnum, UMLRTPortKind.RELAY); + addEEnumLiteral(umlrtPortKindEEnum, UMLRTPortKind.SAP); + addEEnumLiteral(umlrtPortKindEEnum, UMLRTPortKind.SPP); + addEEnumLiteral(umlrtPortKindEEnum, UMLRTPortKind.NULL); + + initEEnum(umlrtCapsulePartKindEEnum, UMLRTCapsulePartKind.class, "UMLRTCapsulePartKind"); //$NON-NLS-1$ + addEEnumLiteral(umlrtCapsulePartKindEEnum, UMLRTCapsulePartKind.FIXED); + addEEnumLiteral(umlrtCapsulePartKindEEnum, UMLRTCapsulePartKind.OPTIONAL); + addEEnumLiteral(umlrtCapsulePartKindEEnum, UMLRTCapsulePartKind.PLUG_IN); + addEEnumLiteral(umlrtCapsulePartKindEEnum, UMLRTCapsulePartKind.NULL); + + // Initialize data types + initEDataType(modelEDataType, UMLRTModel.class, "Model", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(listEDataType, List.class, "List", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(streamEDataType, Stream.class, "Stream", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName + createEmofAnnotations(); + // union + createUnionAnnotations(); + // http://www.eclipse.org/uml2/2.0.0/UML + createUMLAnnotations(); + // redefines + createRedefinesAnnotations(); + // subsets + createSubsetsAnnotations(); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/uml2/2.0.0/UML</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void createUMLAnnotations() { + String source = "http://www.eclipse.org/uml2/2.0.0/UML"; //$NON-NLS-1$ + addAnnotation(umlrtInheritanceKindEEnum, + source, + new String[] { + "originalName", "InheritanceKind" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_PartsWithPort(), + source, + new String[] { + "originalName", "partWithPort" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_Service(), + source, + new String[] { + "originalName", "isService" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_Behavior(), + source, + new String[] { + "originalName", "isBehavior" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_Conjugated(), + source, + new String[] { + "originalName", "isConjugated" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_Wired(), + source, + new String[] { + "originalName", "isWired" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_Publish(), + source, + new String[] { + "originalName", "isPublish" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_Notification(), + source, + new String[] { + "originalName", "isNotification" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getReplicatedElement_SymbolicReplicationFactor(), + source, + new String[] { + "originalName", "isSymbolicReplicationFactor" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(umlrtPortKindEEnum, + source, + new String[] { + "originalName", "PortKind" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getCapsulePart_Optional(), + source, + new String[] { + "originalName", "isOptional" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(umlrtCapsulePartKindEEnum, + source, + new String[] { + "originalName", "CapsulePartKind" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(umlrtCapsulePartKindEEnum.getELiterals().get(2), + source, + new String[] { + "originalName", "plugin" //$NON-NLS-1$ //$NON-NLS-2$ + }); + } + + /** + * Initializes the annotations for <b>redefines</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void createRedefinesAnnotations() { + String source = "redefines"; //$NON-NLS-1$ + addAnnotation(packageEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(capsuleEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/toUML") //$NON-NLS-1$ + }); + addAnnotation(capsuleEClass.getEOperations().get(1), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/getAncestry") //$NON-NLS-1$ + }); + addAnnotation(classifierEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(portEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//ReplicatedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(replicatedElementEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(protocolEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/toUML") //$NON-NLS-1$ + }); + addAnnotation(protocolEClass.getEOperations().get(1), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(protocolEClass.getEOperations().get(2), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/getAncestry") //$NON-NLS-1$ + }); + addAnnotation(protocolEClass.getEOperations().get(3), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(protocolMessageEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(protocolMessageEClass.getEOperations().get(1), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + addAnnotation(connectorEClass.getEOperations().get(0), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/toUML") //$NON-NLS-1$ + }); + } + + + /** + * Initializes the annotations for <b>http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void createEmofAnnotations() { + String source = "http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"; //$NON-NLS-1$ + addAnnotation(getNamedElement_RedefinedElement(), + source, + new String[] { + "body", "redefiningElement" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getNamedElement_InheritedElement(), + source, + new String[] { + "body", "inheritingElement" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getNamedElement_RootDefinition(), + source, + new String[] { + "body", "redefinitionTree" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getNamedElement_ExcludedElement(), + source, + new String[] { + "body", "excludingElement" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_RedefinedPort(), + source, + new String[] { + "body", "redefiningPort" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_PartsWithPort(), + source, + new String[] { + "body", "portOnPart" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_InsideConnector(), + source, + new String[] { + "body", "inside" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getPort_OutsideConnector(), + source, + new String[] { + "body", "outside" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getProtocol_InMessage(), + source, + new String[] { + "body", "inProtocol" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getProtocol_OutMessage(), + source, + new String[] { + "body", "outProtocol" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getProtocol_InOutMessage(), + source, + new String[] { + "body", "inOutProtocol" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getProtocol_Conjugate(), + source, + new String[] { + "body", "base" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getProtocolMessage_RedefinedMessage(), + source, + new String[] { + "body", "redefiningMessage" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getProtocolMessage_Parameter(), + source, + new String[] { + "body", "message" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getProtocolMessage_Conjugate(), + source, + new String[] { + "body", "base" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getCapsulePart_RedefinedPart(), + source, + new String[] { + "body", "redefiningPart" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getConnector_RedefinedConnector(), + source, + new String[] { + "body", "redefiningConnector" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getConnector_Source(), + source, + new String[] { + "body", "sourceOf" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getConnector_SourcePartWithPort(), + source, + new String[] { + "body", "sourceOf" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getConnector_Target(), + source, + new String[] { + "body", "targetOf" //$NON-NLS-1$ //$NON-NLS-2$ + }); + addAnnotation(getConnector_TargetPartWithPort(), + source, + new String[] { + "body", "targetOf" //$NON-NLS-1$ //$NON-NLS-2$ + }); + } + + + /** + * Initializes the annotations for <b>union</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void createUnionAnnotations() { + String source = "union"; //$NON-NLS-1$ + addAnnotation(getNamedElement_RedefinedElement(), + source, + new String[] { + }); + addAnnotation(getNamedElement_RedefinitionContext(), + source, + new String[] { + }); + addAnnotation(getNamedElement_RedefinableElement(), + source, + new String[] { + }); + addAnnotation(getClassifier_General(), + source, + new String[] { + }); + addAnnotation(getClassifier_Specific(), + source, + new String[] { + }); + addAnnotation(getPort_Connector(), + source, + new String[] { + }); + addAnnotation(getProtocol_Message(), + source, + new String[] { + }); + } + + + /** + * Initializes the annotations for <b>subsets</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void createSubsetsAnnotations() { + String source = "subsets"; //$NON-NLS-1$ + addAnnotation(getCapsule_Superclass(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/general") //$NON-NLS-1$ + }); + addAnnotation(getCapsule_Subclass(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/specific") //$NON-NLS-1$ + }); + addAnnotation(getCapsule_Port(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinableElement") //$NON-NLS-1$ + }); + addAnnotation(getCapsule_CapsulePart(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinableElement") //$NON-NLS-1$ + }); + addAnnotation(getCapsule_Connector(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinableElement") //$NON-NLS-1$ + }); + addAnnotation(getPort_RedefinedPort(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinedElement") //$NON-NLS-1$ + }); + addAnnotation(getPort_InsideConnector(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Port/connector") //$NON-NLS-1$ + }); + addAnnotation(getPort_OutsideConnector(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Port/connector") //$NON-NLS-1$ + }); + addAnnotation(getPort_Capsule(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinitionContext") //$NON-NLS-1$ + }); + addAnnotation(getProtocol_SuperProtocol(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/general") //$NON-NLS-1$ + }); + addAnnotation(getProtocol_SubProtocol(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Classifier/specific") //$NON-NLS-1$ + }); + addAnnotation(getProtocol_Message(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinableElement") //$NON-NLS-1$ + }); + addAnnotation(getProtocol_InMessage(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Protocol/message") //$NON-NLS-1$ + }); + addAnnotation(getProtocol_OutMessage(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Protocol/message") //$NON-NLS-1$ + }); + addAnnotation(getProtocol_InOutMessage(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//Protocol/message") //$NON-NLS-1$ + }); + addAnnotation(getProtocolMessage_RedefinedMessage(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinedElement") //$NON-NLS-1$ + }); + addAnnotation(getProtocolMessage_Protocol(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinitionContext") //$NON-NLS-1$ + }); + addAnnotation(getCapsulePart_RedefinedPart(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinedElement") //$NON-NLS-1$ + }); + addAnnotation(getCapsulePart_Capsule(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinitionContext") //$NON-NLS-1$ + }); + addAnnotation(getConnector_RedefinedConnector(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinedElement") //$NON-NLS-1$ + }); + addAnnotation(getConnector_Capsule(), + source, + new String[] { + }, + new URI[] { + URI.createURI(eNS_URI).appendFragment("//NamedElement/redefinitionContext") //$NON-NLS-1$ + }); + } + +} // UMLRTUMLRTPackageImpl
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTAdapterFactory.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTAdapterFactory.java new file mode 100644 index 0000000..4054bd7 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTAdapterFactory.java
@@ -0,0 +1,329 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage + * @generated + */ +public class UMLRTAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected static UMLRTUMLRTPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTAdapterFactory() { + if (modelPackage == null) { + modelPackage = UMLRTUMLRTPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected UMLRTSwitch<Adapter> modelSwitch = new UMLRTSwitch<Adapter>() { + @Override + public Adapter caseNamedElement(UMLRTNamedElement object) { + return createNamedElementAdapter(); + } + + @Override + public Adapter casePackage(UMLRTPackage object) { + return createPackageAdapter(); + } + + @Override + public Adapter caseCapsule(UMLRTCapsule object) { + return createCapsuleAdapter(); + } + + @Override + public Adapter caseClassifier(UMLRTClassifier object) { + return createClassifierAdapter(); + } + + @Override + public Adapter casePort(UMLRTPort object) { + return createPortAdapter(); + } + + @Override + public Adapter caseReplicatedElement(UMLRTReplicatedElement object) { + return createReplicatedElementAdapter(); + } + + @Override + public Adapter caseProtocol(UMLRTProtocol object) { + return createProtocolAdapter(); + } + + @Override + public Adapter caseProtocolMessage(UMLRTProtocolMessage object) { + return createProtocolMessageAdapter(); + } + + @Override + public Adapter caseCapsulePart(UMLRTCapsulePart object) { + return createCapsulePartAdapter(); + } + + @Override + public Adapter caseConnector(UMLRTConnector object) { + return createConnectorAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param target + * the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement <em>Named Element</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement + * @generated + */ + public Adapter createNamedElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage <em>Package</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage + * @generated + */ + public Adapter createPackageAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier <em>Classifier</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier + * @generated + */ + public Adapter createClassifierAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule <em>Capsule</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule + * @generated + */ + public Adapter createCapsuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement <em>Replicated Element</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement + * @generated + */ + public Adapter createReplicatedElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTPort <em>Port</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTPort + * @generated + */ + public Adapter createPortAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart <em>Capsule Part</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart + * @generated + */ + public Adapter createCapsulePartAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector <em>Connector</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector + * @generated + */ + public Adapter createConnectorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol <em>Protocol</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol + * @generated + */ + public Adapter createProtocolAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage <em>Protocol Message</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage + * @generated + */ + public Adapter createProtocolMessageAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} // UMLRTAdapterFactory
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTDerivedUnionAdapter.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTDerivedUnionAdapter.java new file mode 100644 index 0000000..c0ebc08 --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTDerivedUnionAdapter.java
@@ -0,0 +1,315 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.util; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.notify.impl.AdapterImpl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; + +/** + * <!-- begin-user-doc --> + * An adapter that propagates notifications for derived unions. + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage + * @generated + */ +public class UMLRTDerivedUnionAdapter extends AdapterImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected static UMLRTUMLRTPackage modelPackage; + + /** + * Creates an instance of the adapter. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTDerivedUnionAdapter() { + if (modelPackage == null) { + modelPackage = UMLRTUMLRTPackage.eINSTANCE; + } + } + + /** + * Calls <code>notifyChanged</code> with the appropriate model class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + Object notifier = notification.getNotifier(); + if (notifier instanceof EObject) { + EClass eClass = ((EObject) notifier).eClass(); + if (eClass.eContainer() == modelPackage) { + notifyChanged(notification, eClass); + } + } + } + + /** + * Calls <code>notifyXXXChanged</code> for the corresponding class of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyChanged(Notification notification, EClass eClass) { + switch (eClass.getClassifierID()) { + case UMLRTUMLRTPackage.PACKAGE: + notifyPackageChanged(notification, eClass); + break; + case UMLRTUMLRTPackage.CAPSULE: + notifyCapsuleChanged(notification, eClass); + break; + case UMLRTUMLRTPackage.PORT: + notifyPortChanged(notification, eClass); + break; + case UMLRTUMLRTPackage.PROTOCOL: + notifyProtocolChanged(notification, eClass); + break; + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE: + notifyProtocolMessageChanged(notification, eClass); + break; + case UMLRTUMLRTPackage.CAPSULE_PART: + notifyCapsulePartChanged(notification, eClass); + break; + case UMLRTUMLRTPackage.CONNECTOR: + notifyConnectorChanged(notification, eClass); + break; + } + } + + /** + * Does nothing; clients may override so that it does something. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @param derivedUnion + * the derived union affected by the change. + * @generated + */ + public void notifyChanged(Notification notification, EClass eClass, EStructuralFeature derivedUnion) { + // Do nothing. + } + + /** + * Calls <code>notifyChanged</code> for each affected derived union. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyPackageChanged(Notification notification, EClass eClass) { + switch (notification.getFeatureID(UMLRTPackage.class)) { + } + } + + /** + * Calls <code>notifyChanged</code> for each affected derived union. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyCapsuleChanged(Notification notification, EClass eClass) { + switch (notification.getFeatureID(UMLRTCapsule.class)) { + case UMLRTUMLRTPackage.CAPSULE__SUPERCLASS: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.CLASSIFIER__GENERAL); + break; + case UMLRTUMLRTPackage.CAPSULE__SUBCLASS: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC); + break; + case UMLRTUMLRTPackage.CAPSULE__PORT: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + break; + case UMLRTUMLRTPackage.CAPSULE__CAPSULE_PART: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + break; + case UMLRTUMLRTPackage.CAPSULE__CONNECTOR: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + break; + } + } + + /** + * Calls <code>notifyChanged</code> for each affected derived union. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyPortChanged(Notification notification, EClass eClass) { + switch (notification.getFeatureID(UMLRTPort.class)) { + case UMLRTUMLRTPackage.PORT__REDEFINED_PORT: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINED_ELEMENT); + break; + case UMLRTUMLRTPackage.PORT__INSIDE_CONNECTOR: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.PORT__CONNECTOR); + break; + case UMLRTUMLRTPackage.PORT__OUTSIDE_CONNECTOR: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.PORT__CONNECTOR); + break; + case UMLRTUMLRTPackage.PORT__CAPSULE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINITION_CONTEXT); + break; + } + } + + /** + * Calls <code>notifyChanged</code> for each affected derived union. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyProtocolChanged(Notification notification, EClass eClass) { + switch (notification.getFeatureID(UMLRTProtocol.class)) { + case UMLRTUMLRTPackage.PROTOCOL__SUPER_PROTOCOL: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.CLASSIFIER__GENERAL); + break; + case UMLRTUMLRTPackage.PROTOCOL__SUB_PROTOCOL: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.CLASSIFIER__SPECIFIC); + break; + case UMLRTUMLRTPackage.PROTOCOL__MESSAGE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + break; + case UMLRTUMLRTPackage.PROTOCOL__IN_MESSAGE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE); + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + break; + case UMLRTUMLRTPackage.PROTOCOL__OUT_MESSAGE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE); + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + break; + case UMLRTUMLRTPackage.PROTOCOL__IN_OUT_MESSAGE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.PROTOCOL__MESSAGE); + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINABLE_ELEMENT); + break; + } + } + + /** + * Calls <code>notifyChanged</code> for each affected derived union. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyProtocolMessageChanged(Notification notification, EClass eClass) { + switch (notification.getFeatureID(UMLRTProtocolMessage.class)) { + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__REDEFINED_MESSAGE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINED_ELEMENT); + break; + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE__PROTOCOL: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINITION_CONTEXT); + break; + } + } + + /** + * Calls <code>notifyChanged</code> for each affected derived union. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyConnectorChanged(Notification notification, EClass eClass) { + switch (notification.getFeatureID(UMLRTConnector.class)) { + case UMLRTUMLRTPackage.CONNECTOR__REDEFINED_CONNECTOR: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINED_ELEMENT); + break; + case UMLRTUMLRTPackage.CONNECTOR__CAPSULE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINITION_CONTEXT); + break; + } + } + + /** + * Calls <code>notifyChanged</code> for each affected derived union. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param notification + * a description of the change. + * @param eClass + * the Ecore class of the notifier. + * @generated + */ + protected void notifyCapsulePartChanged(Notification notification, EClass eClass) { + switch (notification.getFeatureID(UMLRTCapsulePart.class)) { + case UMLRTUMLRTPackage.CAPSULE_PART__REDEFINED_PART: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINED_ELEMENT); + break; + case UMLRTUMLRTPackage.CAPSULE_PART__CAPSULE: + notifyChanged(notification, eClass, UMLRTUMLRTPackage.Literals.NAMED_ELEMENT__REDEFINITION_CONTEXT); + break; + } + } + +} // UMLRTDerivedUnionAdapter
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTSwitch.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTSwitch.java new file mode 100644 index 0000000..4f7237f --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src-facade/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTSwitch.java
@@ -0,0 +1,464 @@ +/** + * Copyright (c) 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - initial API and implementation + * + */ +package org.eclipse.papyrusrt.umlrt.uml.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTModel; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrusrt.umlrt.uml.internal.facade.UMLRTUMLRTPackage + * @generated + */ +public class UMLRTSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected static UMLRTUMLRTPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public UMLRTSwitch() { + if (modelPackage == null) { + modelPackage = UMLRTUMLRTPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param ePackage + * the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Dispatches the target object to the appropriate <code>caseXXX</code> methods. + * + * @param object + * the model object to pass to the appropriate <code>caseXXX</code>. + * @return the first non-null result returned by a <code>caseXXX</code> call. + */ + public T doSwitch(Object object) { + T result = null; + + if (object instanceof UMLRTModel) { + result = caseModel((UMLRTModel) object); + } + if (result == null) { + if (object instanceof EObject) { + result = doSwitch((EObject) object); + } + if (result == null) { + result = defaultCase(object); + } + } + return result; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case UMLRTUMLRTPackage.NAMED_ELEMENT: { + UMLRTNamedElement namedElement = (UMLRTNamedElement) theEObject; + T result = caseNamedElement(namedElement); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.PACKAGE: { + UMLRTPackage package_ = (UMLRTPackage) theEObject; + T result = casePackage(package_); + if (result == null) { + result = caseNamedElement(package_); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.CAPSULE: { + UMLRTCapsule capsule = (UMLRTCapsule) theEObject; + T result = caseCapsule(capsule); + if (result == null) { + result = caseClassifier(capsule); + } + if (result == null) { + result = caseNamedElement(capsule); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.CLASSIFIER: { + UMLRTClassifier classifier = (UMLRTClassifier) theEObject; + T result = caseClassifier(classifier); + if (result == null) { + result = caseNamedElement(classifier); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.PORT: { + UMLRTPort port = (UMLRTPort) theEObject; + T result = casePort(port); + if (result == null) { + result = caseReplicatedElement(port); + } + if (result == null) { + result = caseNamedElement(port); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.REPLICATED_ELEMENT: { + UMLRTReplicatedElement replicatedElement = (UMLRTReplicatedElement) theEObject; + T result = caseReplicatedElement(replicatedElement); + if (result == null) { + result = caseNamedElement(replicatedElement); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.PROTOCOL: { + UMLRTProtocol protocol = (UMLRTProtocol) theEObject; + T result = caseProtocol(protocol); + if (result == null) { + result = caseClassifier(protocol); + } + if (result == null) { + result = caseNamedElement(protocol); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.PROTOCOL_MESSAGE: { + UMLRTProtocolMessage protocolMessage = (UMLRTProtocolMessage) theEObject; + T result = caseProtocolMessage(protocolMessage); + if (result == null) { + result = caseNamedElement(protocolMessage); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.CAPSULE_PART: { + UMLRTCapsulePart capsulePart = (UMLRTCapsulePart) theEObject; + T result = caseCapsulePart(capsulePart); + if (result == null) { + result = caseReplicatedElement(capsulePart); + } + if (result == null) { + result = caseNamedElement(capsulePart); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case UMLRTUMLRTPackage.CONNECTOR: { + UMLRTConnector connector = (UMLRTConnector) theEObject; + T result = caseConnector(connector); + if (result == null) { + result = caseNamedElement(connector); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Named Element</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedElement(UMLRTNamedElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Package</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Package</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePackage(UMLRTPackage object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Classifier</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Classifier</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseClassifier(UMLRTClassifier object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Capsule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Capsule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCapsule(UMLRTCapsule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Replicated Element</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Replicated Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReplicatedElement(UMLRTReplicatedElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Port</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Port</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePort(UMLRTPort object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Capsule Part</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Capsule Part</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCapsulePart(UMLRTCapsulePart object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Connector</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Connector</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConnector(UMLRTConnector object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Protocol</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Protocol</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseProtocol(UMLRTProtocol object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Protocol Message</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Protocol Message</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseProtocolMessage(UMLRTProtocolMessage object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Model</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Model</em>'. + * @see #doSwitch(java.lang.Object) doSwitch(Object) + * @generated NOT + */ + public T caseModel(UMLRTModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is almost the last case anyway. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated NOT + */ + @Override + public T defaultCase(EObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Object</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Object</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated NOT + */ + public T defaultCase(Object object) { + return null; + } + +} // UMLRTSwitch
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeObject.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeObject.java index c09f3e2..e9b6d35 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeObject.java +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeObject.java
@@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. + * Copyright (c) 2017 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -7,189 +7,59 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Christian W. Damus - Initial API and implementation + * CEA LIST - Initial API and implementation * *****************************************************************************/ package org.eclipse.papyrusrt.umlrt.uml; -import java.util.List; -import java.util.Optional; -import java.util.function.UnaryOperator; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrusrt.umlrt.uml.internal.impl.UMLRTUMLFactoryImpl; -import org.eclipse.papyrusrt.umlrt.uml.util.UMLRTExtensionUtil; +import org.eclipse.papyrusrt.umlrt.uml.internal.util.ReificationAdapter; +import org.eclipse.papyrusrt.umlrt.uml.util.ReificationListener; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.NamedElement; /** - * A façade for UML {@link Element}s that represent UML-RT concepts, - * providing a view of the element more in keeping with the UML-RT semantics. + * @author damus + * */ -abstract class FacadeObject { +public interface FacadeObject { - private final Element element; - private final EObject stereotype; + Element toUML(); - FacadeObject(Element element, EObject stereotype) { - super(); - - this.element = element; - this.stereotype = stereotype; - } - - static <T extends Element, U extends EObject, F extends FacadeObject> // - F getFacade(T element, FacadeType<T, U, F> type) { - FacadeObject.BasicFacadeAdapter<F> adapter = null; - - if (element != null) { - adapter = type.getAdapter(element); - if (adapter == null) { - U stereotype = type.getStereotypeApplication(element); - if (stereotype != null) { - adapter = type.createAdapter(stereotype); - adapter.addAdapter(element); - } - } - } - - return (adapter == null) ? null : type.getFacade(adapter); - } - - Element toUML() { - return element; - } - - EObject toRT() { - return stereotype; - } - - boolean isExcluded() { - return false; - } - - void destroy() { - // The destroy() API tears down cross-references, so - // don't let that auto-reify anything - Optional.ofNullable(toUML()).ifPresent( - uml -> UMLRTExtensionUtil.run(uml, uml::destroy)); - } - - <T extends Element, U extends EObject, F extends FacadeObject> // - List<F> getFacades(FacadeReference<T, U, F> reference) { - return reference.getFacades(element); - } - - <T extends Element, U extends EObject, F extends FacadeObject> // - List<F> getFacades(FacadeReference<T, U, F> reference, boolean withExclusions) { - return reference.getFacades(element, withExclusions); - } - - <T extends Element, U extends EObject, F extends FacadeObject> // - List<F> getFacades(FacadeReference<T, U, F> reference, boolean withExclusions, UnaryOperator<F> andThen) { - return reference.getFacades(element, withExclusions, andThen); - } - - <T extends Element, U extends EObject, F extends FacadeObject> // - List<F> getFacades(FacadeReference<T, U, F> reference, UnaryOperator<F> andThen) { - return reference.getFacades(element, andThen); - } - - <T extends NamedElement, U extends EObject, F extends FacadeObject> // - F get(FacadeReference<T, U, F> reference, String name) { - return reference.getAll(toUML()) - .filter(e -> name.equals(e.getName())) - .findAny() - .map(reference.getType()::getFacade) - .orElse(null); - } - - <T extends Element, U extends EObject, F extends FacadeObject> // - F getRedefinitionOf(F inherited, FacadeReference<T, U, F> reference) { - return reference.getRedefinitionOf(inherited, element); - } - - <T extends NamedElement, U extends EObject, F extends FacadeObject> // - F create(FacadeReference<T, U, F> reference, String name) { - @SuppressWarnings("unchecked") - T result = (T) UMLRTUMLFactoryImpl.eINSTANCE.create(reference.getEReferenceType()); - - if ((name != null) && (result != null)) { - result.setName(name); - } - - reference.getUML(toUML()).add(result); - reference.getType().applyStereotype(result); - - return reference.getType().getFacade(result); - } - - @Override - public String toString() { - return String.format("%s()", getClass().getSimpleName()); //$NON-NLS-1$ - } - - // - // Nested types - // + boolean isExcluded(); /** - * An adapter that attaches the façade object to its underlying UML - * element (providing canonicalization of the mapping) and allows it to - * react to changes in the UML (for example, to invalidate cached information - * or to send change events). + * Adds a reification {@code listener}. Has no effect if this listener + * was already added previously. + * + * @param listener + * the listener to receive notifications when I am reified + * or virtualized */ - protected class BasicFacadeAdapter<F extends FacadeObject> extends AdapterImpl { - BasicFacadeAdapter() { - super(); - } - - @SuppressWarnings("unchecked") - final F getFacade() { - return (F) FacadeObject.this; - } - - @Override - public final boolean isAdapterForType(Object type) { - return type == FacadeObject.this.getClass(); - } - - protected boolean addAdapter(Notifier notifier) { - EList<Adapter> eAdapters = notifier.eAdapters(); - return !eAdapters.contains(this) && eAdapters.add(this); - } - - protected boolean removeAdapter(Notifier notifier) { - return notifier.eAdapters().remove(this); - } - - @Override - public void setTarget(Notifier newTarget) { - super.setTarget(newTarget); - - if (newTarget != null) { - // Ensure that we get stereotype application changes - UMLRTModel.getInstance(((EObject) newTarget).eResource()); + default void addReificationListener(ReificationListener listener) { + Element element = toUML(); + if (element instanceof NamedElement) { + ReificationAdapter adapter = ReificationAdapter.getInstance(element); + if (adapter != null) { + adapter.addListener((NamedElement) element, listener); } } + } - protected void handleNotification(Notification msg) { - // Pass - } - - @Override - final public void notifyChanged(Notification msg) { - if (msg.isTouch()) { - return; + /** + * Removes a reification {@code listener}. Has no effect if this listener + * was not added previously. + * + * @param listener + * the listener to remove + */ + default void removeReificationListener(ReificationListener listener) { + Element element = toUML(); + if (element instanceof NamedElement) { + ReificationAdapter adapter = ReificationAdapter.getInstance(element); + if (adapter != null) { + adapter.removeListener((NamedElement) element, listener); } - - handleNotification(msg); } }
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsule.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsule.java deleted file mode 100644 index 5b90292..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsule.java +++ /dev/null
@@ -1,400 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toList; - -import java.util.Collections; -import java.util.List; -import java.util.stream.Stream; - -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.Capsule; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.CapsulePart; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTConnector; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTPort; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; -import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtUMLExtPackage; -import org.eclipse.uml2.uml.Class; -import org.eclipse.uml2.uml.Connector; -import org.eclipse.uml2.uml.ConnectorEnd; -import org.eclipse.uml2.uml.Port; -import org.eclipse.uml2.uml.Property; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.util.UMLUtil; - -/** - * A façade for UML {@link Class} elements that represent UML-RT {@link Capsule Capsule}s, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public class UMLRTCapsule extends UMLRTClassifier { - - static final FacadeType<Class, Capsule, UMLRTCapsule> TYPE = new FacadeType<>( - UMLRTCapsule.class, - UMLPackage.Literals.CLASS, - UMLRealTimePackage.Literals.CAPSULE, - UMLRTCapsule::getInstance, - UMLRTCapsule::getSuperclass, - UMLRTCapsule::new); - - private static final FacadeReference<Port, RTPort, UMLRTPort> PORT_REFERENCE = new FacadeReference<>( - UMLRTPort.TYPE, - UMLPackage.Literals.ENCAPSULATED_CLASSIFIER__OWNED_PORT, - ExtUMLExtPackage.Literals.ENCAPSULATED_CLASSIFIER__IMPLICIT_PORT, - UMLPackage.Literals.PORT); - - private static final FacadeReference<Property, CapsulePart, UMLRTCapsulePart> CAPSULE_PART_REFERENCE = new FacadeReference<>( - UMLRTCapsulePart.TYPE, - UMLPackage.Literals.STRUCTURED_CLASSIFIER__OWNED_ATTRIBUTE, - ExtUMLExtPackage.Literals.STRUCTURED_CLASSIFIER__IMPLICIT_ATTRIBUTE, - UMLPackage.Literals.PROPERTY); - - private static final FacadeReference<Connector, RTConnector, UMLRTConnector> CONNECTOR_REFERENCE = new FacadeReference<>( - UMLRTConnector.TYPE, - UMLPackage.Literals.STRUCTURED_CLASSIFIER__OWNED_CONNECTOR, - ExtUMLExtPackage.Literals.STRUCTURED_CLASSIFIER__IMPLICIT_CONNECTOR, - UMLPackage.Literals.CONNECTOR); - - protected UMLRTCapsule(Capsule capsule) { - super(capsule.getBase_Class(), capsule); - } - - /** - * Obtains the canonical instance of the capsule façade for a class. - * - * @param class_ - * a class in the UML model - * - * @return its capsule façade, or {@code null} if the class is not a valid capsule - */ - public static UMLRTCapsule getInstance(Class class_) { - return getFacade(class_, TYPE); - } - - /** - * Obtains the UML representation of the capsule. - * - * @return the UML representation - */ - @Override - public Class toUML() { - return (Class) super.toUML(); - } - - @Override - protected Capsule toRT() { - return (Capsule) super.toRT(); - } - - @Override - public UMLRTCapsule getGeneral() { - return (UMLRTCapsule) super.getGeneral(); - } - - /** - * Obtains the capsule that is my supertype, if any. - * - * @return my supertype, or {@code null} if I am a root capsule type - */ - public UMLRTCapsule getSuperclass() { - return getGeneral(); - } - - /** - * Assigns the capsule that is my supertype. UML-RT recognizes - * only single inheritance, so if the UML model has any other - * generalizations, they are destroyed. - * - * @param capsule - * my new supertype, or {@code null} if I am to be a root type - */ - public void setSuperclass(UMLRTCapsule capsule) { - setGeneral(capsule); - } - - /** - * Obtains the currently loaded capsules that are my direct subtypes. - * Note that there may be other sub-types in resources that are not - * currently loaded. - * - * @return my known subtypes - */ - public List<UMLRTCapsule> getSubclasses() { - return getSpecifics(false) - .filter(UMLRTCapsule.class::isInstance) - .map(UMLRTCapsule.class::cast) - .collect(collectingAndThen(toList(), Collections::unmodifiableList)); - } - - /** - * Gets the entire capsule specialization hierarchy, rooted at myself, - * as a stream. Note that there may be other types in the hierarchy in - * resources that are not currently loaded; these will not be included - * in the result. - * - * @return my capsule class hierarchy - */ - @Override - public Stream<UMLRTCapsule> getHierarchy() { - return super.getHierarchy() - .filter(UMLRTCapsule.class::isInstance) - .map(UMLRTCapsule.class::cast); - } - - /** - * Gets the entire capsule generalization chain, rooted at myself. - * - * @return my capsule generalization chain, in order from myself to my most general supertype - */ - @Override - public List<UMLRTCapsule> getAncestry() { - return ancestry(UMLRTCapsule.class); - } - - static boolean isCapsule(Class class_) { - return getCapsule(class_) != null; - } - - static Capsule getCapsule(Class class_) { - return UMLUtil.getStereotypeApplication(class_, Capsule.class); - } - - /** - * Obtains my ports, including any that are inherited from my supercapsule - * if I have one but not any that I {@linkplain #exclude() exclude}. - * - * @return all of my effective ports - */ - public List<UMLRTPort> getPorts() { - return getFacades(PORT_REFERENCE); - } - - /** - * Obtains my ports, including any that are inherited from my supercapsule - * if I have one but also optionally any that I {@linkplain #exclude() exclude}. - * - * @param withExcluded - * whether to return also excluded ports - * @return all of my ports, optionally also with exclusions - */ - public List<UMLRTPort> getPorts(boolean withExcluded) { - return getFacades(PORT_REFERENCE, withExcluded); - } - - /** - * Obtains the {@code name}d port, possibly inherited from my supercapsule, - * even if I have {@linkplain #exclude() excluded} it. - * - * @param name - * the port name to find - * @return the named port, or {@code null} if I have no port of that {@code name} - */ - public UMLRTPort getPort(String name) { - return get(PORT_REFERENCE, name); - } - - /** - * Creates a new external behavior port of the given protocol type. - * It is named automatically according to the protocol name. If the protocol - * is a {@link UMLRTProtocol#isConjugate() conjugate}, then the resulting - * port will be {@link UMLRTPort#isConjugated() conjugated}. - * - * @param protocol - * the port type - * - * @return the port - * - * @see #createPort(UMLRTProtocol, UMLRTPortKind) - */ - public UMLRTPort createPort(UMLRTProtocol protocol) { - return createPort(protocol, UMLRTPortKind.EXTERNAL_BEHAVIOR); - } - - /** - * Creates a new port of the given protocol type. It is named automatically - * according to the protocol name. If the protocol is a - * {@link UMLRTProtocol#isConjugate() conjugate}, then the resulting port - * will be {@link UMLRTPort#isConjugated() conjugated}. - * - * @param protocol - * the port type - * @param kind - * its kind - * - * @return the port - * - * @see #createPort(UMLRTProtocol) - */ - public UMLRTPort createPort(UMLRTProtocol protocol, UMLRTPortKind kind) { - String baseProtocolName = protocol.isConjugate() - ? protocol.getConjugate().getName() // want the base protocol name - : protocol.getName(); - String portName = initialLower(baseProtocolName); - UMLRTPort result = create(PORT_REFERENCE, portName); - result.setType(protocol); - result.setKind(kind); - return result; - } - - /** - * Obtains my parts, including any that are inherited from my supercapsule - * if I have one but not any that I {@linkplain #exclude() exclude}. - * - * @return all of my effective capsule-parts - */ - public List<UMLRTCapsulePart> getCapsuleParts() { - return getFacades(CAPSULE_PART_REFERENCE); - } - - /** - * Obtains my parts, including any that are inherited from my supercapsule - * if I have one but also optionally any that I {@linkplain #exclude() exclude}. - * - * @param withExcluded - * whether to return also excluded capsule-parts - * @return all of my capsule-parts, optionally also with exclusions - */ - public List<UMLRTCapsulePart> getCapsuleParts(boolean withExcluded) { - return getFacades(CAPSULE_PART_REFERENCE, withExcluded); - } - - /** - * Obtains the {@code name}d part, possibly inherited from my supercapsule, - * even if I have {@linkplain #exclude() excluded} it. - * - * @param name - * the part name to find - * @return the named capsule-part, or {@code null} if I have no part of that {@code name} - */ - public UMLRTCapsulePart getCapsulePart(String name) { - return get(CAPSULE_PART_REFERENCE, name); - } - - /** - * Creates a new part of the given capsule type. It is named automatically - * according to the capsule name. - * - * @param capsule - * the part type - * - * @return the capsule-part - * - * @see #createPort(UMLRTCapsule) - */ - public UMLRTCapsulePart createCapsulePart(UMLRTCapsule capsule) { - String partName = initialLower(capsule.getName()); - UMLRTCapsulePart result = create(CAPSULE_PART_REFERENCE, partName); - result.setType(capsule); - return result; - } - - /** - * Obtains my connectors, including any that are inherited from my supercapsule - * if I have one but not any that I {@linkplain #exclude() exclude}. - * - * @return all of my effective connectors - */ - public List<UMLRTConnector> getConnectors() { - return getFacades(CONNECTOR_REFERENCE); - } - - /** - * Obtains my connectors, including any that are inherited from my supercapsule - * if I have one but also optionally any that I {@linkplain #exclude() exclude}. - * - * @param withExcluded - * whether to return also excluded connectors - * @return all of my connectors, optionally also with exclusions - */ - public List<UMLRTConnector> getConnectors(boolean withExcluded) { - return getFacades(CONNECTOR_REFERENCE, withExcluded); - } - - /** - * Obtains the {@code name}d connector, possibly inherited from my supercapsule, - * even if I have {@linkplain #exclude() excluded} it. - * - * @param name - * the connector name to find - * @return the named connector, or {@code null} if I have no connector of that {@code name} - */ - public UMLRTConnector getConnector(String name) { - return get(CONNECTOR_REFERENCE, name); - } - - /** - * Creates a new connector between two ports, with parts as appropriate. - * - * @param name - * the connector name - * @param source - * the port to connect - * @param sourcePartWithPort - * the part that has the {@code source} port, or {@code null} - * if the {@code source} is a port of this capsule - * @param target - * the port to which to connect the {@code source} - * @param targetPartWithPort - * the part that has the {@code target} port, or {@code null} - * if the {@code target} is a port of this capsule - * - * @return the new connector - */ - public UMLRTConnector createConnector(String name, UMLRTPort source, UMLRTCapsulePart sourcePartWithPort, - UMLRTPort target, UMLRTCapsulePart targetPartWithPort) { - - UMLRTConnector result = create(CONNECTOR_REFERENCE, name); - ConnectorEnd sourceEnd = result.toUML().createEnd(); - sourceEnd.setRole(source.toUML()); - if (sourcePartWithPort != null) { - sourceEnd.setPartWithPort(sourcePartWithPort.toUML()); - } - - ConnectorEnd targetEnd = result.toUML().createEnd(); - targetEnd.setRole(target.toUML()); - if (targetPartWithPort != null) { - targetEnd.setPartWithPort(targetPartWithPort.toUML()); - } - - return result; - } - - /** - * Obtains my local redefinition of the given inherited element, even if it - * just the local façade representation of that element inherited as is. - * If the element is a local definition, then it is returned as is. - * - * @param inheritedElement - * an element that I (would) inherit from my supertype - * - * @return my local redefinition or purely inherited view of the element, - * or {@code null} if either I do not inherit the element or I - * {@linkplain #exclude() exclude} it - */ - @SuppressWarnings("unchecked") - public <T extends UMLRTNamedElement> T getRedefinitionOf(T inheritedElement) { - T result = null; - - if (inheritedElement instanceof UMLRTPort) { - result = (T) getRedefinitionOf((UMLRTPort) inheritedElement, PORT_REFERENCE); - } else if (inheritedElement instanceof UMLRTCapsulePart) { - result = (T) getRedefinitionOf((UMLRTCapsulePart) inheritedElement, CAPSULE_PART_REFERENCE); - } else if (inheritedElement instanceof UMLRTConnector) { - result = (T) getRedefinitionOf((UMLRTConnector) inheritedElement, CONNECTOR_REFERENCE); - } - - return result; - } - -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePart.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePart.java deleted file mode 100644 index 3710a6c..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePart.java +++ /dev/null
@@ -1,296 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toList; - -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.function.Predicate; -import java.util.stream.Stream; - -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.CapsulePart; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; -import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; -import org.eclipse.uml2.common.util.CacheAdapter; -import org.eclipse.uml2.uml.AggregationKind; -import org.eclipse.uml2.uml.Class; -import org.eclipse.uml2.uml.ConnectableElement; -import org.eclipse.uml2.uml.Connector; -import org.eclipse.uml2.uml.ConnectorEnd; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.LiteralUnlimitedNatural; -import org.eclipse.uml2.uml.Port; -import org.eclipse.uml2.uml.Property; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * A façade for UML {@link Property} elements that represent UML-RT {@link CapsulePart}s, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public class UMLRTCapsulePart extends UMLRTReplicatedElement { - static final FacadeType<Property, CapsulePart, UMLRTCapsulePart> TYPE = new FacadeType<>( - UMLRTCapsulePart.class, - UMLPackage.Literals.PROPERTY, - UMLRealTimePackage.Literals.CAPSULE_PART, - UMLRTCapsulePart::getInstance, - UMLRTCapsulePart::getRedefinedPart, - UMLRTCapsulePart::new); - - protected UMLRTCapsulePart(CapsulePart capsulePart) { - super(capsulePart.getBase_Property(), capsulePart); - } - - /** - * Obtains the canonical instance of the capsule-part façade for a property. - * - * @param part - * a property in the UML model - * - * @return its capsule-part façade, or {@code null} if the property is not a valid capsule-part - */ - public static UMLRTCapsulePart getInstance(Property part) { - return getFacade(part, TYPE); - } - - /** - * Obtains the capsule that is my type, if any. - * - * @return my capsule type, or {@code null} if I have none - */ - public UMLRTCapsule getType() { - Type result = toUML().getType(); - return (result instanceof Class) ? UMLRTCapsule.getInstance((Class) result) - : null; - } - - /** - * Assigns my capsule type. - * - * @param type - * my new type, or {@code null} if I have none - */ - public void setType(UMLRTCapsule type) { - if (type == null) { - toUML().setType(null); - } else { - toUML().setType(type.toUML()); - } - } - - /** - * Obtains all of the connectors that connect ports that I expose to the - * capsule that contains me, apart from any that are {@linkplain #exclude() excluded}. - * - * @return the connectors of my ports in the context of my - * {@linkplain #getCapsule() containing capsule} - */ - public List<UMLRTConnector> getConnectorsOfPorts() { - UMLRTCapsule capsule = getCapsule(); - Predicate<UMLRTConnector> excluded = UMLRTConnector::isExcluded; - - // Get the connectors that are defined within my capsule - return allConnectorsOfPorts() - .map(capsule::getRedefinitionOf) - .filter(Objects::nonNull) - .filter(excluded.negate()) - .distinct() - .collect(collectingAndThen(toList(), Collections::unmodifiableList)); - } - - Stream<UMLRTConnector> allConnectorsOfPorts() { - return redefinitionChain().stream() - .map(UMLRTCapsulePart.class::cast) - .flatMap(UMLRTCapsulePart::getEnds) - .map(Element::getOwner) - .map(Connector.class::cast) - .map(UMLRTConnector::getInstance) - .filter(Objects::nonNull); - } - - Stream<ConnectorEnd> getEnds() { - CacheAdapter cache = CacheAdapter.getCacheAdapter(toUML()); - return cache.getNonNavigableInverseReferences(toUML()).stream() - .filter(s -> s.getEStructuralFeature() == UMLPackage.Literals.CONNECTOR_END__PART_WITH_PORT) - .map(EStructuralFeature.Setting::getEObject) - .map(ConnectorEnd.class::cast); - } - - /** - * Obtains all of the connectors that connect the given port that I expose to the - * capsule that contains me, apart from any that are {@linkplain #exclude() excluded}. - * - * @param portOnPart - * tbe port for which to find connectors - * @return the connectors of the port in the context of my - * {@linkplain #getCapsule() containing capsule} - */ - public List<UMLRTConnector> getConnectorsOf(UMLRTPort portOnPart) { - UMLRTCapsule capsule = getCapsule(); - Predicate<UMLRTConnector> excluded = UMLRTConnector::isExcluded; - - // Get the connectors that are defined within my capsule - return allConnectorsOf(portOnPart) - .map(capsule::getRedefinitionOf) - .filter(Objects::nonNull) - .filter(excluded.negate()) - .distinct() - .collect(collectingAndThen(toList(), Collections::unmodifiableList)); - } - - Stream<UMLRTConnector> allConnectorsOf(UMLRTPort portOnPart) { - CacheAdapter cache = CacheAdapter.getCacheAdapter(toUML()); - - return redefinitionChain().stream() - .map(UMLRTNamedElement::toUML) - .flatMap(e -> cache.getNonNavigableInverseReferences(e).stream()) - .filter(s -> s.getEStructuralFeature() == UMLPackage.Literals.CONNECTOR_END__PART_WITH_PORT) - .map(EStructuralFeature.Setting::getEObject) - .map(ConnectorEnd.class::cast) - .filter(end -> redefines(end.getRole(), portOnPart)) - .map(Element::getOwner) - .map(Connector.class::cast) - .map(UMLRTConnector::getInstance) - .filter(Objects::nonNull); - } - - private static boolean redefines(ConnectableElement role, UMLRTPort port) { - UMLRTPort rtRole = (role instanceof Port) ? UMLRTPort.getInstance((Port) role) : null; - return (rtRole != null) && rtRole.redefines(port); - } - - /** - * Obtains a stream over all of the currently loaded redefinitions of my in - * the inheritance hierarchy of my {@link #getCapsule() capsule}. - * - * @return my currently loaded redefinitions - * - * @see UMLRTCapsule#getHierarchy() - */ - protected Stream<UMLRTCapsulePart> allRedefinitions() { - Predicate<UMLRTCapsulePart> excluded = UMLRTCapsulePart::isExcluded; - UMLRTCapsule capsule = getCapsule(); - return (capsule == null) ? Stream.empty() : capsule.getHierarchy() - .map(c -> c.getRedefinitionOf(this)) - .filter(excluded.negate()); - } - - /** - * Queries the kind of capsule-part that I am. - * - * @return my kind - */ - public UMLRTCapsulePartKind getKind() { - UMLRTCapsulePartKind result = UMLRTCapsulePartKind.NULL; - Property uml = toUML(); - - if ((uml.getLower()) > 0 && (uml.getUpper() > 0)) { - result = UMLRTCapsulePartKind.FIXED; - } else if ((uml.getLower() == 0) || (uml.getUpper() == LiteralUnlimitedNatural.UNLIMITED)) { - if (uml.getAggregation() == AggregationKind.COMPOSITE_LITERAL) { - result = UMLRTCapsulePartKind.OPTIONAL; - } else if (uml.getAggregation() == AggregationKind.SHARED_LITERAL) { - result = UMLRTCapsulePartKind.PLUG_IN; - } - } - - return result; - } - - /** - * Sets the kind of capsule-part that I am. - * - * @param kind - * my new kind - * @throws NullPointerException - * if the {@code kind} is {@code null} - * @throws IllegalArgumentException - * if the {@code kind} is {@link UMLRTCapsulePartKind#isNull() isNull} - */ - public void setKind(UMLRTCapsulePartKind kind) { - if (Objects.requireNonNull(kind, "kind").isNull()) { //$NON-NLS-1$ - throw new IllegalArgumentException(kind.label()); - } - - setOptional(!kind.isRequired()); - if ((toUML().getAggregation() == AggregationKind.COMPOSITE_LITERAL) != kind.isComposite()) { - if (kind.isComposite()) { - toUML().setAggregation(AggregationKind.COMPOSITE_LITERAL); - } else { - toUML().setAggregation(AggregationKind.SHARED_LITERAL); - } - } - } - - /** - * Queries whether I am an optional (or plug-in) part. - * - * @return whether I am optional - */ - public boolean isOptional() { - return toUML().getLower() == 0; - } - - /** - * Sets whether I am an optional part. This does not make me - * a plug-in part if it makes me optional, but does make me - * not a plug-in if it makes me non-optional. - * - * @param optional - * whether I am optional - */ - public void setOptional(boolean optional) { - if (optional != isOptional()) { - if (optional) { - toUML().setLower(0); - } else { - toUML().setLower(getReplicationFactor()); - if (toUML().getAggregation() != AggregationKind.COMPOSITE_LITERAL) { - toUML().setAggregation(AggregationKind.COMPOSITE_LITERAL); - } - } - } - } - - /** - * Queries the inherited capsule-part that I redefine, if any and even if - * I am {@link #isExcluded() excluded} or am the local representation of - * a capsule-part that is inherited as is. - * - * @return the capsule-part that I redefine/inherit, or {@code null} if - * I am a root definition - */ - public UMLRTCapsulePart getRedefinedPart() { - UMLRTCapsulePart result; - - if (toUML() instanceof InternalUMLRTElement) { - Property superPart = (Property) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); - result = UMLRTCapsulePart.getInstance(superPart); - } else { - UMLRTNamedElement redef = super.getRedefinedElement(); - result = (redef instanceof UMLRTCapsulePart) ? (UMLRTCapsulePart) redef : null; - } - - return result; - } - - @Override - public UMLRTCapsulePart getRedefinedElement() { - return getRedefinedPart(); - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePartKind.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePartKind.java deleted file mode 100644 index 1e673c5..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTCapsulePartKind.java +++ /dev/null
@@ -1,74 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -/** - * Enumeration of UML-RT capsule-part kinds. - */ -public enum UMLRTCapsulePartKind { - /** A fixed capsule-part has always as many instantiations as its replication factor permits. */ - FIXED("Fixed", true, true), - /** An optional capsule-part is not required to be instantiated. */ - OPTIONAL("Optional", false, true), - /** An plug-in capsule-part {@linkplain #OPTIONAL optional} and is not instantiated by the capsule. */ - PLUG_IN("Plug-in", false, false), - /** A capsule-part kind indicating that no valid kind can be inferred from the UML model. */ - NULL("<invalid>", false, false); - - private final String label; - private final boolean required; - private final boolean composite; - - UMLRTCapsulePartKind(String label, boolean required, boolean composite) { - this.label = label; - this.required = required; - this.composite = composite; - } - - /** - * Obtains my user-presentable label. - * - * @return my label - */ - public String label() { - return label; - } - - /** - * Queries whether I am the {@link #NULL} object. - * - * @return whether I am the null value - */ - public boolean isNull() { - return this == NULL; - } - - /** - * Queries whether I am a kind of required capsule-part. - * - * @return whether capsule-parts of my kind are required - */ - public boolean isRequired() { - return required; - } - - /** - * Queries whether I am a kind of composite capsule-part. - * - * @return whether capsule-parts of my kind are composite - */ - public boolean isComposite() { - return composite; - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTClassifier.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTClassifier.java deleted file mode 100644 index cc90636..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTClassifier.java +++ /dev/null
@@ -1,245 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toList; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Stream; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.uml2.uml.Classifier; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.Generalization; - -/** - * A façade for UML {@link Classifier}s that represent UML-RT concepts such as - * capsules and protocols, providing a view of the element more in keeping with - * the UML-RT semantics. - */ -public abstract class UMLRTClassifier extends UMLRTNamedElement { - - protected UMLRTClassifier(Classifier element, EObject stereotype) { - super(element, stereotype); - } - - protected static UMLRTClassifier getInstance(Classifier classifier) { - UMLRTNamedElement result = (classifier == null) - ? null - : UMLRTFactory.create(classifier); - return (result instanceof UMLRTClassifier) - ? (UMLRTClassifier) result - : null; - } - - /** - * Obtains the UML classifier that represents me in the UML model. - * - * @return my UML representation - */ - @Override - public Classifier toUML() { - return (Classifier) super.toUML(); - } - - /** - * Obtains the package that logically contains me. Note that for - * protocols, this is not the protocol-container package but that - * container's nesting package. - * - * @return my package - */ - public UMLRTPackage getPackage() { - return UMLRTPackage.getInstance(toUML().getPackage()); - } - - /** - * Obtains my general classifier, which if not {@code null} will be - * of the same meta-type as myself. - * - * @return my general classifier, or {@code null} if I have none or the - * underlying UML model has a general that is of the wrong meta-type - */ - public UMLRTClassifier getGeneral() { - EList<Classifier> generals = toUML().getGenerals(); - Classifier general = generals.isEmpty() ? null : generals.get(0); - - UMLRTClassifier result = getInstance(general); - return getClass().isInstance(result) ? result : null; - } - - /** - * Sets my general classifier. - * - * @param general - * my general classifier, or {@code null} if I am to be a root type - * - * @throws IllegalArgumentException - * if the {@code general} is not {@code null} and is not - * of the same meta-type as myself or a supertype of my meta-type - */ - public void setGeneral(UMLRTClassifier general) { - if ((general != null) && !general.getClass().isInstance(this)) { - throw new IllegalArgumentException("incompatible meta-type: " + general); - } - - if (getGeneral() != general) { - setGeneral(toUML(), (general == null) ? null : general.toUML()); - } - } - - /** - * Assigns the {@code general} of a {@code specific} classifier. - * - * @param specific - * a classifier - * @param general - * the classifier to set as the {@code specific}'s {@code general} - */ - protected static <C extends Classifier> void setGeneral(C specific, C general) { - EList<Classifier> generals = specific.getGenerals(); - if (general == null) { - new ArrayList<>(specific.getGeneralizations()).forEach(Element::destroy); - } else if (generals.isEmpty()) { - generals.add(general); - } else if (generals.get(0) != general) { - generals.set(0, general); - } - } - - /** - * Queries whether I am a supertype of the given {@code classifier}, - * either directly or indirectly. As a special case, I am a supertype - * of myself. - * - * @param classifier - * a classifier - * @return whether it is a subtype of me - */ - public boolean isSuperTypeOf(UMLRTClassifier classifier) { - return (classifier == this) - || Optional.ofNullable(classifier.getGeneral()) - .map(sc -> isSuperTypeOf(sc)).orElse(false); - } - - /** - * Obtains those of my immediate specializing classifiers that are currently loaded. - * - * @return an unmodifiable list of my known immediate subtypes - */ - protected List<? extends UMLRTClassifier> getSpecifics() { - return getSpecifics(false).collect( - collectingAndThen(toList(), Collections::unmodifiableList)); - } - - /** - * Obtains a stream over of my specializing classifiers that are currently loaded, with the - * option of including also their specializations and so one, {@code recursive}ly. This is - * like the {@link #getHierarchy() hierarchy} except that it does not include me as a - * specific of myself. - * - * @param recursive - * whether to include recursively the entire specialization tree - * - * @return my specifics, perhaps {@code recursive}ly - * - * @see #getHierarchy() - */ - protected Stream<? extends UMLRTClassifier> getSpecifics(boolean recursive) { - Stream<Classifier> specifics = specifics(toUML()); - - if (!recursive) { - // Simple case - return specifics - .map(UMLRTClassifier::getInstance) - .filter(Objects::nonNull); - } else { - // Get the recursive closure - Set<Classifier> allSpecifics = collectSpecificClosure(specifics, new LinkedHashSet<>()); - return allSpecifics.stream() - .map(UMLRTClassifier::getInstance) - .filter(Objects::nonNull); - } - } - - private static Stream<Classifier> specifics(Classifier class_) { - Stream<Generalization> generalizations = class_.getTargetDirectedRelationships().stream() - .filter(Generalization.class::isInstance).map(Generalization.class::cast); - Stream<Classifier> result = generalizations.map(Generalization::getSpecific); - return result; - } - - private static Set<Classifier> collectSpecificClosure(Stream<Classifier> classes, Set<Classifier> result) { - classes.forEach(classifier -> { - if (result.add(classifier)) { - collectSpecificClosure(specifics(classifier), result); - } - }); - return result; - } - - /** - * Gets the entire classifier specialization hierarchy, rooted at myself, - * as a stream. - * - * @return my classifier hierarchy - */ - public Stream<? extends UMLRTClassifier> getHierarchy() { - return Stream.concat(Stream.of(this), getSpecifics(true)); - } - - /** - * Gets the entire classifier generalization chain, rooted at myself. - * - * @return my classifier generalization chain, in order from myself to my most general supertype - */ - public List<? extends UMLRTClassifier> getAncestry() { - return ancestry(getClass()); - } - - /** - * Computes my ancestry. - * - * @param metaclass - * the kind of protocols to consider (should be the specific subclass type) - * - * @return the ancestry list - */ - protected <T extends UMLRTClassifier> List<T> ancestry(Class<T> metaclass) { - List<T> result = new ArrayList<>(); - Set<UMLRTClassifier> visited = new HashSet<>(); - - for (UMLRTClassifier next = this; next != null; next = next.getGeneral()) { - if (visited.add(next)) { - if (metaclass.isInstance(next)) { - result.add(metaclass.cast(next)); - } - } else { - // Cycle - break; - } - } - - return result; - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTConnector.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTConnector.java deleted file mode 100644 index 70d6de6..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTConnector.java +++ /dev/null
@@ -1,287 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTConnector; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; -import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; -import org.eclipse.uml2.uml.Connector; -import org.eclipse.uml2.uml.ConnectorEnd; -import org.eclipse.uml2.uml.Port; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * A façade for UML {@link Connector} elements that represent UML-RT {@link RTConnector Connector}s, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public class UMLRTConnector extends UMLRTNamedElement { - static final FacadeType<Connector, RTConnector, UMLRTConnector> TYPE = new FacadeType<>( - UMLRTConnector.class, - UMLPackage.Literals.CONNECTOR, - UMLRealTimePackage.Literals.RT_CONNECTOR, - UMLRTConnector::getInstance, - UMLRTConnector::getRedefinedConnector, - UMLRTConnector::new); - - protected UMLRTConnector(RTConnector rtConnector) { - super(rtConnector.getBase_Connector(), rtConnector); - } - - /** - * Obtains the canonical instance of the connector façade for a connector. - * - * @param connector - * a connector in the UML model - * - * @return its connector façade, or {@code null} if the connector is not a valid UML-RT connector - */ - public static UMLRTConnector getInstance(Connector connector) { - return getFacade(connector, TYPE); - } - - /** - * Obtains the UML representation of the connector. - * - * @return the UML representation - */ - @Override - public Connector toUML() { - return (Connector) super.toUML(); - } - - @Override - RTConnector toRT() { - return (RTConnector) super.toRT(); - } - - /** - * Obtains the port that is the connector source (by convention, the first of its - * two connected ports). - * - * @return my source port - */ - public UMLRTPort getSource() { - ConnectorEnd sourceEnd = umlEnd(0); - return resolvePort(sourceEnd); - } - - private UMLRTPort resolvePort(ConnectorEnd end) { - Port uml = (end == null) - ? null - : (end.getRole() instanceof Port) - ? (Port) end.getRole() - : null; - UMLRTPort result = (uml == null) ? null : UMLRTPort.getInstance(uml); - - if ((result != null) && (result.getCapsule() != getCapsule())) { - // Resolve the inherited port in my capsule - UMLRTPort inherited = result; - result = getCapsule().getPorts(true).stream() - .filter(p -> p.redefines(inherited)) - .findAny() - .orElse(result); - } - - return result; - } - - /** - * Obtains the part that has the connector {@link #getSource() source}, if it is - * a port on a part. - * - * @return my source part-with-port, or {@code null} if the source port is a port - * of my {@linkplain #getCapsule() containing capsule} - */ - public UMLRTCapsulePart getSourcePartWithPort() { - ConnectorEnd sourceEnd = umlEnd(0); - return resolvePartWithPort(sourceEnd); - } - - ConnectorEnd umlEnd(int index) { - ConnectorEnd result = null; - EList<ConnectorEnd> ends = toUML().getEnds(); - - if (ends.size() > index) { - result = ends.get(index); - } - - return result; - } - - private UMLRTCapsulePart resolvePartWithPort(ConnectorEnd end) { - UMLRTCapsulePart result = null; - - if ((end != null) && (end.getPartWithPort() != null)) { - result = UMLRTCapsulePart.getInstance(end.getPartWithPort()); - - if ((result != null) && (result.getCapsule() != getCapsule())) { - // Resolve the inherited port in my capsule - UMLRTCapsulePart inherited = result; - result = getCapsule().getCapsuleParts(true).stream() - .filter(p -> p.redefines(inherited)) - .findAny() - .orElse(result); - } - } - - return result; - } - - /** - * Queries whether the replication factor of the connector on the {@link #getSource() source} - * end is symbolic (not a numeric literal). - * - * @return whether my replication factor at the source end is symbolic - */ - public boolean isSourceSymbolicReplicationFactor() { - ConnectorEnd sourceEnd = umlEnd(0); - return UMLRTReplicatedElement.isSymbolicReplicationFactor( - (sourceEnd == null) ? null : sourceEnd.getUpperValue()); - } - - /** - * Queries the replication factor of the connector on the {@link #getSource() source} end. - * - * @return my source-end replication factor, or {@code 1} if my replication - * factor at that end is symbolic - * - * @see #isSourceSymbolicReplicationFactor() - */ - public int getSourceReplicationFactor() { - ConnectorEnd sourceEnd = umlEnd(0); - return UMLRTReplicatedElement.getReplicationFactor( - (sourceEnd == null) ? null : sourceEnd.getUpperValue()); - } - - /** - * Sets the replication factor of the connector on the {@link #getSource() source} end. - * - * @param replication - * the replication factor to set at my source end - */ - public void setSourceReplicationFactor(int replication) { - ConnectorEnd sourceEnd = umlEnd(0); - if (sourceEnd == null) { - throw new IllegalStateException("no source end"); //$NON-NLS-1$ - } - UMLRTReplicatedElement.setReplicationFactor(sourceEnd, replication); - } - - /** - * Obtains the port that is the connector target (by convention, the second of its - * two connected ports). - * - * @return my target port - */ - public UMLRTPort getTarget() { - ConnectorEnd targetEnd = umlEnd(1); - return resolvePort(targetEnd); - } - - /** - * Obtains the part that has the connector {@link #getTarget() target}, if it is - * a port on a part. - * - * @return my target part-with-port, or {@code null} if the target port is a port - * of my {@linkplain #getCapsule() containing capsule} - */ - public UMLRTCapsulePart getTargetPartWithPort() { - ConnectorEnd targetEnd = umlEnd(1); - return resolvePartWithPort(targetEnd); - } - - /** - * Queries whether the replication factor of the connector on the {@link #getTarget() target} - * end is symbolic (not a numeric literal). - * - * @return whether my replication factor at the target end is symbolic - */ - public boolean isTargetSymbolicReplicationFactor() { - ConnectorEnd targetEnd = umlEnd(1); - return UMLRTReplicatedElement.isSymbolicReplicationFactor( - (targetEnd == null) ? null : targetEnd.getUpperValue()); - } - - /** - * Queries the replication factor of the connector on the {@link #getTarget() target} end. - * - * @return my target-end replication factor, or {@code 1} if my replication - * factor at that end is symbolic - * - * @see #isTargetSymbolicReplicationFactor() - */ - public int getTargetReplicationFactor() { - ConnectorEnd targetEnd = umlEnd(1); - return UMLRTReplicatedElement.getReplicationFactor( - (targetEnd == null) ? null : targetEnd.getUpperValue()); - } - - /** - * Sets the replication factor of the connector on the {@link #getTarget() target} end. - * - * @param replication - * the replication factor to set at my target end - */ - public void setTargetReplicationFactor(int replication) { - ConnectorEnd targetEnd = umlEnd(1); - if (targetEnd == null) { - throw new IllegalStateException("no target end"); //$NON-NLS-1$ - } - UMLRTReplicatedElement.setReplicationFactor(targetEnd, replication); - } - - /** - * Obtains the capsule that defines me or inherits me, if I am the façade - * for an inherited connector. - * - * @return my context capsule - */ - public UMLRTCapsule getCapsule() { - return UMLRTCapsule.getInstance((org.eclipse.uml2.uml.Class) toUML().getNamespace()); - } - - /** - * Queries the inherited connector that I redefine, if any and even if - * I am {@link #isExcluded() excluded} or am the local representation of - * a connector that is inherited as is. - * - * @return the connector that I redefine/inherit, or {@code null} if - * I am a root definition - */ - public UMLRTConnector getRedefinedConnector() { - UMLRTConnector result; - - if (toUML() instanceof InternalUMLRTElement) { - Connector superConnector = (Connector) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); - result = UMLRTConnector.getInstance(superConnector); - } else { - UMLRTNamedElement redef = super.getRedefinedElement(); - result = (redef instanceof UMLRTConnector) ? (UMLRTConnector) redef : null; - } - - return result; - } - - @Override - public UMLRTConnector getRedefinedElement() { - return getRedefinedConnector(); - } - - @Override - public UMLRTNamedElement getRedefinitionContext() { - return getCapsule(); - } - -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTInheritanceKind.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTInheritanceKind.java deleted file mode 100644 index 7ef5728..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTInheritanceKind.java +++ /dev/null
@@ -1,152 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import java.util.Comparator; -import java.util.function.ToIntFunction; - -import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; -import org.eclipse.papyrusrt.umlrt.uml.util.UMLRTExtensionUtil; -import org.eclipse.uml2.uml.Element; - -/** - * Enumeration of the possible inheritance states of an element in an UML-RT model. - */ -public enum UMLRTInheritanceKind { - /** The element is inherited from another namespace and not redefined. */ - INHERITED, - /** The element is inherited from another namespace and is locally redefined. */ - REDEFINED, - /** The element is inherited from another namespace and is locally redefined as excluded. */ - EXCLUDED, - /** The element is a local owned definition, not redefining any inherited element. */ - NONE; - - /** - * Queries the inheritance kind of an {@link element}. - * - * @param element - * an element in the UML-RT model - * - * @return its inheritance kind: never {@code null}, but maybe {@link #NONE} - */ - public static UMLRTInheritanceKind of(Element element) { - UMLRTInheritanceKind result = NONE; - - if (UMLRTExtensionUtil.isInherited(element)) { - if (UMLRTExtensionUtil.isVirtualElement(element)) { - result = INHERITED; - } else if (UMLRTExtensionUtil.isExcluded(element)) { - result = EXCLUDED; - } else { - result = REDEFINED; - } - } - - return result; - } - - /** - * Queries the inheritance kind of an {@link element}. - * - * @param element - * an element in the UML-RT model - * - * @return its inheritance kind: never {@code null}, but maybe {@link #NONE} - */ - public static UMLRTInheritanceKind of(UMLRTNamedElement element) { - return nullSafe(element.getInheritanceKind()); - } - - static UMLRTInheritanceKind nullSafe(UMLRTInheritanceKind kind) { - return (kind == null) ? NONE : kind; - } - - /** - * Obtains a comparator that sorts model elements by inheritance kind, - * in the order of the kind values, and then (for - * {@linkplain #INHERITED inherited} elements only) by depth of - * of inheritance from farthest (highest) to nearest (lowest) supertype. - * - * @return an inheritance-based comparator - */ - public static Comparator<Element> comparator() { - Comparator<Element> firstStage = Comparator.comparing(UMLRTInheritanceKind::of); - return firstStage.thenComparing(byInheritanceDepth()); - } - - /** - * Obtains a comparator that sorts model elements by inheritance kind, - * in the order of the kind values, and then (for - * {@linkplain #INHERITED inherited} elements only) by depth of - * of inheritance from farthest (highest) to nearest (lowest) supertype. - * - * @return an inheritance-based comparator - */ - public static Comparator<UMLRTNamedElement> facadeComparator() { - return Comparator.comparing(UMLRTNamedElement::toUML, comparator()); - } - - /** - * A comparator by depth of redefinition, for elements that are inherited. - * Elements inherited from farther up the hierarchy precede elements inherited - * from nearer supertypes. - * - * @return the comparator by inheritance depth - */ - private static Comparator<Element> byInheritanceDepth() { - return Comparator.comparingInt(inheritanceDepth()); - } - - private static ToIntFunction<Element> inheritanceDepth() { - return element -> { - // Redefined and excluded elements are local definitions; they have no depth - int result = 0; - - if (UMLRTExtensionUtil.isVirtualElement(element)) { - // It couldn't be virtual without implementing this interface - InternalUMLRTElement rt = (InternalUMLRTElement) element; - try { - result = -inheritanceDepth(rt, 0); - } catch (IllegalStateException e) { - // This will cause problems elsewhere, so no need to log it. Just - // return a zero depth - } - } - - return result; - }; - } - - private static int inheritanceDepth(InternalUMLRTElement element, int depthSoFar) { - int count = 0; - - for (InternalUMLRTElement rt = element.rtGetRedefinedElement(); rt != null; rt = rt.rtGetRedefinedElement()) { - depthSoFar = depthSoFar + 1; - - // Since the cycle is detected by checking if we hit 'element' again, after many iterations - // we'll call this method recursively in case we started with something that wasn't part of - // a cycle but later traversed up to a cycle. Note that this technique is susceptible to - // missing cycles of depth greater than a hundred thousand elements, but that seems an - // acceptable risk - if (++count > 100000) { - return inheritanceDepth(rt, depthSoFar); - } else if (rt == element) { - throw new IllegalStateException("Redefinition cycle including " + rt); //$NON-NLS-1$ - } - } - - return depthSoFar; - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTNamedElement.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTNamedElement.java deleted file mode 100644 index be641cd..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTNamedElement.java +++ /dev/null
@@ -1,492 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toList; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Stream; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; -import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtUMLExtPackage; -import org.eclipse.papyrusrt.umlrt.uml.internal.util.ReificationAdapter; -import org.eclipse.papyrusrt.umlrt.uml.util.ReificationListener; -import org.eclipse.uml2.common.util.CacheAdapter; -import org.eclipse.uml2.common.util.UML2Util; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.NamedElement; -import org.eclipse.uml2.uml.Namespace; -import org.eclipse.uml2.uml.RedefinableElement; - -/** - * A façade for UML {@link Element}s that represent UML-RT concepts, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public abstract class UMLRTNamedElement extends FacadeObject { - - UMLRTNamedElement(NamedElement element, EObject stereotype) { - super(element, stereotype); - } - - /** - * Obtains the UML representation of the façade element. - * - * @return the UML representation - */ - @Override - public NamedElement toUML() { - return (NamedElement) super.toUML(); - } - - protected CacheAdapter getCacheAdapter() { - return CacheAdapter.getCacheAdapter(toUML()); - } - - protected static Object cacheKey(String key) { - class CacheKey { - private final String name; - - CacheKey(String name) { - this.name = name; - } - - @Override - public boolean equals(Object obj) { - return (obj instanceof CacheKey) - && ((CacheKey) obj).name.equals(name); - } - - @Override - public int hashCode() { - return 37 * name.hashCode(); - } - - @Override - public String toString() { - return String.format("CacheKey(%s)", name); //$NON-NLS-1$ - } - } - - return new CacheKey(key); - } - - /** - * Obtains my name. - * - * @return my name - */ - public String getName() { - return toUML().getName(); - } - - /** - * Sets my name. - * - * @param newName - * my name - */ - public void setName(String newName) { - if (!Objects.equals(getName(), newName)) { - toUML().setName(newName); - } - } - - protected static String initialLower(String name) { - String result; - - if (UML2Util.isEmpty(name)) { - result = name; - } else { - StringBuilder buf = new StringBuilder(name.length()); - buf.append(Character.toLowerCase(name.charAt(0))); - buf.append(name, 1, name.length()); - result = buf.toString(); - } - - return result; - } - - Optional<InternalUMLRTElement> internal() { - return Optional.of(toUML()) - .filter(InternalUMLRTElement.class::isInstance) - .map(InternalUMLRTElement.class::cast); - } - - /** - * Obtains the model that (recursively) contains me. - * - * @return my maodel - */ - public UMLRTModel getModel() { - return UMLRTModel.getInstance(toUML().eResource()); - } - - /** - * Queries my inheritance kind. - * - * @return my inheritance kind - */ - public UMLRTInheritanceKind getInheritanceKind() { - return UMLRTInheritanceKind.of(toUML()); - } - - /** - * Queries whether I am a redefinition of some inherited element - * in my context namespace, but not redefined for {@linkplain #isExcluded() exclusion}. - * - * @return whether I am a (normal) redefinition of an inherited element - * - * @see #getInheritanceKind() - * @see #isVirtualRedefinition() - * @see #isExcluded() - */ - public boolean isRedefinition() { - return getInheritanceKind() == UMLRTInheritanceKind.REDEFINED; - } - - /** - * Queries whether I am a <em>virtual redefinition</em>, representing - * a local proxy in my context namespace for an element inherited by that - * namespace. A virtual element does not actually exist in the UML(-RT) - * model and therefore cannot be an {@linkplain #isExcluded() exclusion} - * but is necessarily {@linkplain #isInherited() inherited}. - * Any change made to a virtual definition causes it to be - * {@linkplain #reify() reified}, which changes it into a real redefinition - * that exists in the model. - * - * @return whether I am a virtual redefinition of an inherited element - * - * @see #getInheritanceKind() - * @see #isInherited() - * @see #isExcluded() - * @see #reify() - */ - public boolean isVirtualRedefinition() { - return getInheritanceKind() == UMLRTInheritanceKind.INHERITED; - } - - /** - * Queries whether I am an {@linkplain #isInherited() inherited} element that - * exists solely to exclude the inherited element from my context namespace. - * - * @return whether I am an exclusion of an inherited element - * - * @see #getInheritanceKind() - * @see #isInherited() - * @see #exclude() - * @see #reinherit() - */ - @Override - public boolean isExcluded() { - return getInheritanceKind() == UMLRTInheritanceKind.EXCLUDED; - } - - /** - * Queries whether I am an inherited element of any - * {@linkplain #getInheritanceKind() inheritance kind}, even redefined or excluded. - * - * @return {@code false} if I am not a redefinable element or am the root of a - * real or potential redefinition hierarchy; {@code true}, otherwise - * - * @see #getInheritanceKind() - * @see #isVirtualRedefinition() - * @see #isInherited() - * @see #isExcluded() - */ - public boolean isInherited() { - return getInheritanceKind() != UMLRTInheritanceKind.NONE; - } - - /** - * Excludes me from my namespace, if I am an - * {@linkplain #isInherited() inherited} element. - * - * @return {@code true} if I was not excluded before but am after; - * {@code false}, otherwise - * - * @see #isExcluded() - * @see #isInherited() - * @see #reinherit() - */ - public boolean exclude() { - boolean result = false; - - NamedElement uml = toUML(); - if (uml instanceof InternalUMLRTElement) { - result = ((InternalUMLRTElement) uml).rtExclude(); - } - - return result; - } - - /** - * Reverses an exclusion, reinstating me in my namespace, if I am - * an {@linkplain #isExcluded() exclusion} of an inherited element. - * - * @return {@code true} if I was excluded before but am not after; - * {@code false}, otherwise - * - * @see #isExcluded() - * @see #isInherited() - * @see #exclude() - */ - public boolean reinherit() { - boolean result = false; - - NamedElement uml = toUML(); - if (uml instanceof InternalUMLRTElement) { - result = ((InternalUMLRTElement) uml).rtReinherit(); - } - - return result; - } - - /** - * If I am a {@linkplain #isVirtualRedefinition() virtual redefinition} representing - * a purely inherited element, converts me to a real redefinition in the UML model proper. - * There should be very few reasons, indeed, for clients to do this explicitly as it is - * almost always best to let it be done automatically in response to some change in the - * virtual element that causes it to redefine the inherited element. - * - * @see #addReificationListener(ReificationListener) - */ - public void reify() { - internal().filter(InternalUMLRTElement::rtIsVirtual) - .ifPresent(InternalUMLRTElement::rtReify); - } - - /** - * Destroys my {@linkplain #toUML() UML representation} and, by - * implication, me. - */ - @Override - public void destroy() { - super.destroy(); - } - - /** - * Queries the element that I redefine, whether that be - * {@linkplain #isVirtualRedefinition() virtual redefinition} or a real element. - * - * @return my immediate redefined element, or {@code null} if I am not an - * {@link #isInherited() inherited} element - * - * @see #isInherited() - * @see #isVirtualRedefinition() - * @see #getInheritedElement() - */ - public UMLRTNamedElement getRedefinedElement() { - UMLRTNamedElement result = null; - - Element uml = toUML(); - if (uml instanceof RedefinableElement) { - result = ((RedefinableElement) uml).getRedefinedElements().stream() - .filter(e -> e.eClass() == uml.eClass()) - .findFirst() - .map(UMLRTFactory::create) - .orElse(null); - } - - return result; - } - - /** - * Obtains my redefinition context, which is the namespace containing me - * that supports generalization or redefinition, in which context I may - * redefine some inherited element. - * - * @return my redefinition context, or {@code null} if I am not a redefinable - * element or I my owner is not suitable for redefinition - */ - public UMLRTNamedElement getRedefinitionContext() { - return null; - } - - /** - * Queries the element whose attributes I inherit for redefinition. - * In contrast to the {@linkplain #getRedefinedElement() redefined element}, - * this is a real element, either the {@linkplain #getRootDefinition() root} - * of my redefinition chain or else a real redefinition of some further - * inherited element. - * - * @return the real inherited element that I redefined, or {@code null} - * if I am not an {@link #isInherited() inherited} element - * - * @see #isInherited() - * @see #getRedefinedElement() - */ - public UMLRTNamedElement getInheritedElement() { - UMLRTNamedElement result = getRedefinedElement(); - - if ((result != null) && result.isVirtualRedefinition()) { - result = result.getInheritedElement(); - } - - return result; - } - - /** - * Queries the root of my redefinition chain, which in the simples case is - * myself if I am a root definition, otherwise the root definition of my - * {@link #getRedefinedElement() redefined element, recursively. - * - * @return the real inherited element that I redefine, or {@code null} - * if I am not an {@link #isInherited() inherited} element - * - * @see #isInherited() - * @see #getRedefinedElement() - * @see #getInheritedElement() - */ - public UMLRTNamedElement getRootDefinition() { - // Start with the assumption that I am the root - UMLRTNamedElement result = this; - - for (UMLRTNamedElement inh = result.getInheritedElement(); (inh != null); inh = result.getInheritedElement()) { - result = inh; - } - - return result; - } - - /** - * Queries whether I redefine the given {@code element} or some - * other element that, recursively, redefines it. As a trivial - * case, I redefine myself. - * - * @param element - * an element - * @return whether I am a redefinition of the {@code element} - */ - public boolean redefines(UMLRTNamedElement element) { - boolean result = false; - - for (UMLRTNamedElement redefined = this; !result && (redefined != null); redefined = redefined.getRedefinedElement()) { - result = redefined == element; - } - - return result; - } - - /** - * Obtains the chain of redefinitions from myself to the root definition. - * Note that this always includes at least myself, even if I am a root definition. - * - * @return my redefinition chain - */ - protected List<UMLRTNamedElement> redefinitionChain() { - List<UMLRTNamedElement> result; - - UMLRTNamedElement redef = getRedefinedElement(); - - if (redef == null) { - result = Collections.singletonList(this); - } else { - result = new ArrayList<>(3); - result.add(this); - for (; redef != null; redef = redef.getRedefinedElement()) { - result.add(redef); - } - } - - return result; - } - - protected Stream<? extends UMLRTNamedElement> excludedElements() { - Stream<UMLRTNamedElement> result = Stream.empty(); - - NamedElement uml = toUML(); - if ((uml instanceof Namespace) && (uml instanceof InternalUMLRTElement)) { - @SuppressWarnings("unchecked") - List<NamedElement> exclusions = (List<NamedElement>) uml.eGet(ExtUMLExtPackage.Literals.NAMESPACE__EXCLUDED_MEMBER); - result = exclusions.stream() - .map(UMLRTFactory::create) - .filter(Objects::nonNull); - } - - return result; - } - - /** - * Obtains all of the elements that I have excluded from inheritance: these are - * redefinitions that I own for the sole purpose of excluding them. - * - * @return my excluded elements - */ - public List<UMLRTNamedElement> getExcludedElements() { - return excludedElements().collect( - collectingAndThen(toList(), Collections::unmodifiableList)); - } - - /** - * Obtains the named excluded element. - * - * @param name - * the name of the element to find - * @param facadeType - * the kind of excluded element to find - * - * @return the excluded element, or {@code null} if none - */ - public <T extends UMLRTNamedElement> T getExcludedElement(String name, Class<T> facadeType) { - return excludedElements() - .filter(facadeType::isInstance) - .filter(e -> Objects.equals(e.getName(), name)) - .map(facadeType::cast) - .findAny().orElse(null); - } - - - /** - * Adds a reification {@code listener}. Has no effect if this listener - * was already added previously. - * - * @param listener - * the listener to receive notifications when I am reified - * or virtualized - */ - public void addReificationListener(ReificationListener listener) { - NamedElement element = toUML(); - ReificationAdapter adapter = ReificationAdapter.getInstance(element); - if (adapter != null) { - adapter.addListener(element, listener); - } - } - - /** - * Removes a reification {@code listener}. Has no effect if this listener - * was not added previously. - * - * @param listener - * the listener to remove - */ - public void removeReificationListener(ReificationListener listener) { - NamedElement element = toUML(); - ReificationAdapter adapter = ReificationAdapter.getInstance(element); - if (adapter != null) { - adapter.removeListener(element, listener); - } - } - - @Override - public String toString() { - return String.format("%s(name=%s)", getClass().getSimpleName(), getName()); //$NON-NLS-1$ - } - -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPackage.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPackage.java deleted file mode 100644 index 364b39c..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPackage.java +++ /dev/null
@@ -1,239 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.Capsule; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.ProtocolContainer; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; -import org.eclipse.uml2.uml.Class; -import org.eclipse.uml2.uml.Collaboration; -import org.eclipse.uml2.uml.Package; -import org.eclipse.uml2.uml.Profile; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.util.UMLUtil; -import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper; - -/** - * A façade for UML {@link Package} elements that represent UML-RT packages, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public class UMLRTPackage extends UMLRTNamedElement { - static final FacadeType<Package, EObject, UMLRTPackage> TYPE = new FacadeType<>( - UMLRTPackage.class, - UMLPackage.Literals.PACKAGE, - null, - UMLRTPackage::getInstance, - null, - BasicFacadeAdapter.class, - null); - - private static final FacadeReference<Class, Capsule, UMLRTCapsule> CAPSULE_REFERENCE = new FacadeReference<>( - UMLRTCapsule.TYPE, - UMLPackage.Literals.PACKAGE__OWNED_TYPE, - null, - UMLPackage.Literals.CLASS); - - private static final FacadeReference<Package, EObject, UMLRTPackage> NESTED_PACKAGE_REFERENCE = new FacadeReference<>( - UMLRTPackage.TYPE, - UMLPackage.Literals.PACKAGE__NESTED_PACKAGE, - null, - UMLPackage.Literals.PACKAGE); - - protected UMLRTPackage(Package package_) { - super(package_, null); - } - - /** - * Obtains the canonical instance of the package façade for a package. - * - * @param package_ - * a package in the UML model - * - * @return its package façade, or {@code null} if the package is not a valid UML-RT package - * (for example, if it is a protocol-container package or does not - * have or inherit an application of the UML-RT profile) - */ - public static UMLRTPackage getInstance(Package package_) { - BasicFacadeAdapter<UMLRTPackage> adapter = null; - - if ((package_ != null) && isRTPackage(package_)) { - adapter = TYPE.getAdapter(package_); - if ((adapter == null) && !isProtocolContainer(package_)) { - adapter = new UMLRTPackage(package_).new BasicFacadeAdapter<>(); - package_.eAdapters().add(adapter); - } - } - - return (adapter == null) ? null : adapter.getFacade(); - } - - static boolean isRTPackage(Package package_) { - return !(package_ instanceof Profile) - && (package_.getAppliedProfile("UMLRealTime", true) != null); - } - - static boolean isProtocolContainer(Package package_) { - return getProtocolContainer(package_) != null; - } - - static ProtocolContainer getProtocolContainer(Package package_) { - return UMLUtil.getStereotypeApplication(package_, ProtocolContainer.class); - } - - static Collaboration getProtocol(Package protocolContainer) { - return (Collaboration) protocolContainer.getMember( - protocolContainer.getName(), false, UMLPackage.Literals.COLLABORATION); - } - - /** - * Obtains the UML representation of the connector. - * - * @return the UML representation - */ - @Override - public Package toUML() { - return (Package) super.toUML(); - } - - /** - * Queries the capsules that are defined in my namespace. - * - * @return the capsules that I contain - */ - public List<UMLRTCapsule> getCapsules() { - return getFacades(CAPSULE_REFERENCE); - } - - /** - * Creates a new capsule in my namespace. - * - * @param name - * the new capsule name - * @return the new capsule - */ - public UMLRTCapsule createCapsule(String name) { - UMLRTCapsule result = create(CAPSULE_REFERENCE, name); - result.toUML().setIsActive(true); - return result; - } - - /** - * Obtains the {@code name}d capsule within my namespace. - * - * @param name - * the capsule name to find - * @return the capsule, or {@code null} if I have none of that name - */ - public UMLRTCapsule getCapsule(String name) { - return get(CAPSULE_REFERENCE, name); - } - - /** - * Queries the nested packages that are defined in my namespace. - * These do not include protocol-container packages, which exist - * only to group the disparate constructs that comprise a logical - * protocol. - * - * @return the packages that I contain - */ - public List<UMLRTPackage> getNestedPackages() { - return getFacades(NESTED_PACKAGE_REFERENCE); - } - - /** - * Creates a new package in my namespace. - * - * @param name - * the new package name - * @return the new package - */ - public UMLRTPackage createNestedPackage(String name) { - return create(NESTED_PACKAGE_REFERENCE, name); - } - - /** - * Obtains the {@code name}d package within my namespace. - * - * @param name - * the package name to find - * @return the package, or {@code null} if I have none of that name - */ - public UMLRTPackage getNestedPackage(String name) { - return get(NESTED_PACKAGE_REFERENCE, name); - } - - /** - * Queries the protocols that are defined in my namespace. - * This accounts for the UML structure that defines protocol-container - * packages to contain the protocols. - * - * @return the protocols that I contain - */ - public List<UMLRTProtocol> getProtocols() { - return toUML().getNestedPackages().stream() - .filter(UMLRTPackage::isProtocolContainer) - .map(UMLRTPackage::getProtocol) - .map(UMLRTProtocol::getInstance) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - } - - /** - * Obtains the {@code name}d protocol within my namespace. - * - * @param name - * the protocol name to find - * @return the protocol, or {@code null} if I have none of that name - */ - public UMLRTProtocol getProtocol(String name) { - Package container = toUML().getNestedPackage(name); - Collaboration result = ((container != null) && isProtocolContainer(container)) - ? getProtocol(container) - : null; - return UMLRTProtocol.getInstance(result); - } - - /** - * Creates a new protocol in my namespace. This ensures creation of the - * entire protocol structure in the UML representation, including the - * protocol-container package, the protocol collaboration, the message-set - * interfaces, their relationships to the protocol collaboration, and the - * any-receive-event. - * - * @param name - * the new protocol name - * @return the new protocol - */ - public UMLRTProtocol createProtocol(String name) { - // Protocol container - Package protocolContainer = toUML().createNestedPackage(name); - StereotypeApplicationHelper.getInstance(protocolContainer).applyStereotype(protocolContainer, UMLRealTimePackage.Literals.PROTOCOL_CONTAINER); - - // Protocol collaboration - Collaboration result = (Collaboration) protocolContainer.createOwnedType(name, UMLPackage.Literals.COLLABORATION); - result.setName(name); - UMLRTProtocol.TYPE.applyStereotype(result); - - return Optional.ofNullable(UMLRTProtocol.getInstance(result)) - .map(UMLRTProtocol::initContents) - .orElse(null); - } - -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPort.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPort.java deleted file mode 100644 index 431aa6f..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPort.java +++ /dev/null
@@ -1,661 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toList; - -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.function.Predicate; -import java.util.stream.Stream; - -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.PortRegistrationType; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTPort; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; -import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; -import org.eclipse.uml2.common.util.CacheAdapter; -import org.eclipse.uml2.uml.Collaboration; -import org.eclipse.uml2.uml.Connector; -import org.eclipse.uml2.uml.ConnectorEnd; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.Port; -import org.eclipse.uml2.uml.Property; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.VisibilityKind; - -/** - * A façade for UML {@link Port} elements that represent UML-RT {@link RTPort Port}s, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public class UMLRTPort extends UMLRTReplicatedElement { - static final FacadeType<Port, RTPort, UMLRTPort> TYPE = new FacadeType<>( - UMLRTPort.class, - UMLPackage.Literals.PORT, - UMLRealTimePackage.Literals.RT_PORT, - UMLRTPort::getInstance, - UMLRTPort::getRedefinedPort, - UMLRTPort::new); - - private static final Object INSIDE_CONNECTORS_KEY = cacheKey("insideConnectors"); - private static final Object OUTSIDE_CONNECTORS_KEY = cacheKey("outsideConnectors"); - private static final Object IS_CONNECTED_INSIDE_KEY = cacheKey("isConnectedInside"); - private static final Object IS_CONNECTED_OUTSIDE_KEY = cacheKey("isConnectedOutside"); - private static final Object IS_CONNECTED_KEY = cacheKey("isConnected"); - - protected UMLRTPort(RTPort rtPort) { - super(rtPort.getBase_Port(), rtPort); - } - - /** - * Obtains the canonical instance of the port façade for a port. - * - * @param port - * a port in the UML model - * - * @return its port façade, or {@code null} if the port is not a valid UML-RT port - */ - public static UMLRTPort getInstance(Port port) { - return getFacade(port, TYPE); - } - - /** - * Obtains the UML representation of the port. - * - * @return the UML representation - */ - @Override - public Port toUML() { - return (Port) super.toUML(); - } - - @Override - RTPort toRT() { - return (RTPort) super.toRT(); - } - - /** - * Obtains my type with matching conjugation: the - * {@link UMLRTProtocol#getConjugate() conjugate} protocol if I am - * {@link #isConjugated() conjugated}. - * - * @return my protocol type, accounting for conjugation - * - * @see #isConjugated() - * @see UMLRTProtocol#getConjugate() - */ - public UMLRTProtocol getType() { - Type result = toUML().getType(); - return (result instanceof Collaboration) ? UMLRTProtocol.getInstance((Collaboration) result, isConjugated()) - : null; - } - - /** - * Assigns my type with conjugation, so that my own - * conjugation will be aligned with the protocol's, - * if it is not {@code null}. - * - * @param type - * my protocol type, accounting for conjugation - * - * @see #getType() - * @see #setType(UMLRTProtocol) - * @see #setConjugated(boolean) - */ - public void setType(UMLRTProtocol type) { - if (type == null) { - toUML().setType(null); - } else { - toUML().setType(type.toUML()); - setConjugated(type.isConjugate()); - } - } - - /** - * Queries whether I have any {@linkplain #getInsideConnectors() <em>inside</em> connectors}. - * - * @return whether I am connected on the inside - * - * @see #getInsideConnectors() - */ - public boolean isConnectedInside() { - boolean result; - CacheAdapter cache = getCacheAdapter(); - - if (cache == null) { - result = insideConnectors().findAny().isPresent(); - } else { - Boolean cached = (Boolean) cache.get(toUML(), IS_CONNECTED_INSIDE_KEY); - if (cached == null) { - cached = insideConnectors().findAny().isPresent(); - cache.put(toUML(), IS_CONNECTED_INSIDE_KEY, cached); - } - result = cached; - } - - return result; - } - - /** - * Obtains all of the connectors of this port <em>inside</em> of its - * {@link #getCapsule() capsule}. - * - * @return the inside connectors of the port - * - * @see #getCapsule() - * @see #getOutsideConnectors() - * @see #getPartsWithPort() - */ - public List<UMLRTConnector> getInsideConnectors() { - List<UMLRTConnector> result; - CacheAdapter cache = getCacheAdapter(); - - if (cache == null) { - // Get the connectors that are defined within my capsule - result = insideConnectors().collect( - collectingAndThen(toList(), Collections::unmodifiableList)); - } else { - @SuppressWarnings("unchecked") - List<UMLRTConnector> cached = (List<UMLRTConnector>) cache.get(toUML(), INSIDE_CONNECTORS_KEY); - if (cached == null) { - cached = insideConnectors().collect( - collectingAndThen(toList(), Collections::unmodifiableList)); - cache.put(toUML(), INSIDE_CONNECTORS_KEY, cached); - } - result = cached; - } - - return result; - } - - /** - * Queries whether I have any connectors, whether - * {@linkplain #getInsideConnectors() <em>inside</em>} or - * {@linkplain #getOutsideConnectors() <em>inside</em>}. - * - * @return whether I am connected, either on the inside or the outside, or both - * - * @see #getInsideConnectors() - * @see #getOutsideConnectors() - */ - public boolean isConnected() { - boolean result; - CacheAdapter cache = getCacheAdapter(); - - if (cache == null) { - result = isConnectedInside() || isConnectedOutside(); - } else { - Boolean cached = (Boolean) cache.get(toUML(), IS_CONNECTED_KEY); - if (cached == null) { - cached = isConnectedInside() || isConnectedOutside(); - cache.put(toUML(), IS_CONNECTED_KEY, cached); - } - result = cached; - } - - return result; - } - - /** - * Obtains a stream over my inside connectors, those which are owned by context {@link #getCapsule() capsule}. - * - * @return my inside connectors - */ - protected Stream<UMLRTConnector> insideConnectors() { - UMLRTCapsule capsule = getCapsule(); - Predicate<UMLRTConnector> excluded = UMLRTConnector::isExcluded; - - return allConnectors() - .map(capsule::getRedefinitionOf) - .filter(Objects::nonNull) - .filter(excluded.negate()) - .distinct(); - } - - /** - * Obtains a stream over all of my connectors, both {@linkplain #insideConnectors() inside} and - * {@linkplain #outsideConnectors() outside}. - * - * @return all of my connectors - */ - protected Stream<UMLRTConnector> allConnectors() { - return redefinitionChain().stream() - .map(UMLRTPort.class::cast) - .flatMap(UMLRTPort::getEnds) - .map(Element::getOwner) - .map(Connector.class::cast) - .map(UMLRTConnector::getInstance) - .filter(Objects::nonNull); - } - - Stream<ConnectorEnd> getEnds() { - return toUML().getEnds().stream(); - } - - /** - * Queries whether I have any {@linkplain #getOutsideConnectors() <em>outside</em> connectors}. - * - * @return whether I am connected on the outside - * - * @see #getOutsideConnectors() - */ - public boolean isConnectedOutside() { - boolean result; - CacheAdapter cache = getCacheAdapter(); - - if (cache == null) { - result = outsideConnectors().findAny().isPresent(); - } else { - Boolean cached = (Boolean) cache.get(toUML(), IS_CONNECTED_OUTSIDE_KEY); - if (cached == null) { - cached = outsideConnectors().findAny().isPresent(); - cache.put(toUML(), IS_CONNECTED_OUTSIDE_KEY, cached); - } - result = cached; - } - - return result; - } - - /** - * Obtains all of the connectors of this port <em>outside</em> of its - * {@link #getCapsule() capsule}. - * - * @return the outside connectors of the port - * - * @see #getCapsule() - * @see #getInsideConnectors() - * @see #getPartsWithPort() - */ - public List<UMLRTConnector> getOutsideConnectors() { - List<UMLRTConnector> result; - CacheAdapter cache = getCacheAdapter(); - - if (cache == null) { - // Get the connectors that are defined without my capsule - result = outsideConnectors().collect( - collectingAndThen(toList(), Collections::unmodifiableList)); - } else { - @SuppressWarnings("unchecked") - List<UMLRTConnector> cached = (List<UMLRTConnector>) cache.get(toUML(), OUTSIDE_CONNECTORS_KEY); - if (cached == null) { - cached = outsideConnectors().collect( - collectingAndThen(toList(), Collections::unmodifiableList)); - cache.put(toUML(), OUTSIDE_CONNECTORS_KEY, cached); - } - result = cached; - } - - return result; - } - - /** - * Obtains a stream over my outside connectors, those that are owned by capsules (and connect) parts - * of my {@link #getCapsule() capsule} type. - * - * @return my outside connectors - * - * @see #allPartsWithPort() - */ - protected Stream<UMLRTConnector> outsideConnectors() { - return getPartsWithPort().stream() - .flatMap(part -> part.getConnectorsOf(this).stream()) - .distinct(); - } - - /** - * Obtains all of the capsule-parts that feature this port. - * - * @return the parts that have this port - */ - public List<UMLRTCapsulePart> getPartsWithPort() { - Predicate<UMLRTCapsulePart> excluded = UMLRTCapsulePart::isExcluded; - - // Get the connectors that are defined within my capsule - return allPartsWithPort() - .filter(excluded.negate()) - .distinct() - .collect(collectingAndThen(toList(), Collections::unmodifiableList)); - } - - /** - * Obtains a stream over all ports currently loaded that redefine me. - * - * @return my currently known redefinitions - */ - protected Stream<UMLRTPort> allRedefinitions() { - Predicate<UMLRTPort> excluded = UMLRTPort::isExcluded; - UMLRTCapsule capsule = getCapsule(); - return (capsule == null) ? Stream.empty() : capsule.getHierarchy() - .map(c -> c.getRedefinitionOf(this)) - .filter(excluded.negate()); - } - - /** - * Obtains a steam over all of the currently loaded capsule-parts that expose me as a port. - * - * @return all known parts that feature me - */ - protected Stream<UMLRTCapsulePart> allPartsWithPort() { - CacheAdapter cache = CacheAdapter.getCacheAdapter(toUML()); - - return allRedefinitions() - .map(UMLRTPort::getCapsule) - .map(UMLRTNamedElement::toUML) - .flatMap(e -> cache.getNonNavigableInverseReferences(e).stream()) - .filter(s -> s.getEStructuralFeature() == UMLPackage.Literals.TYPED_ELEMENT__TYPE) - .map(EStructuralFeature.Setting::getEObject) - .filter(Property.class::isInstance).map(Property.class::cast) - .map(UMLRTCapsulePart::getInstance) - .filter(Objects::nonNull) - .flatMap(UMLRTCapsulePart::allRedefinitions) - .distinct(); - } - - /** - * Queries whether I am conjugated, in which case my protocol - * {@link #getType() type} should perhaps also be viewed in its - * conjugated form. - * - * @return whether I am conjugated - * - * @see #getType() - * @see #getConjugationType() - * @see UMLRTProtocol#getConjugate() - */ - public boolean isConjugated() { - return toUML().isConjugated(); - } - - /** - * Assigns my conjugation. - * - * @param conjugated - * whether I am a conjugate port - */ - public void setConjugated(boolean conjugated) { - toUML().setIsConjugated(conjugated); - } - - /** - * Queries whether I have notification enabled. - * - * @return whether I have notification enabled - */ - public boolean isNotification() { - return toRT().isNotification(); - } - - /** - * Sets whether I have notification enabled. - * - * @param notification - * whether I have notification enabled - */ - public void setNotification(boolean notification) { - toRT().setIsNotification(notification); - } - - /** - * Queries whether I am a behavior port. - * - * @return whether I am a behavior port - */ - public boolean isBehavior() { - return toUML().isBehavior(); - } - - /** - * Sets whether I am a behavior port. - * - * @param behavior - * whether I am a behavior port - */ - public void setBehavior(boolean behavior) { - toUML().setIsBehavior(behavior); - } - - /** - * Queries whether I am a service port. - * - * @return whether I am a service port - */ - public boolean isService() { - return toUML().isService(); - } - - /** - * Sets whether I am a service port. - * - * @param behavior - * whether I am a service port - */ - public void setService(boolean service) { - toUML().setIsService(service); - } - - /** - * Queries whether I am a wired port. - * - * @return whether I am a wired port - */ - public boolean isWired() { - return toRT().isWired(); - } - - /** - * Sets whether I am a wired port. - * - * @param behavior - * whether I am a wired port - */ - public void setWired(boolean wired) { - toRT().setIsWired(wired); - } - - /** - * Queries whether I am a published port. - * - * @return whether I am a published port - */ - public boolean isPublish() { - return toRT().isPublish(); - } - - /** - * Sets whether I am a published port. - * - * @param behavior - * whether I am a published port - */ - public void setPublish(boolean publish) { - toRT().setIsPublish(publish); - } - - /** - * Queries my registration kind. - * - * @return my registration kind - */ - public PortRegistrationType getRegistration() { - return toRT().getRegistration(); - } - - /** - * Sets my registration kind. - * - * @param registration - * my registration kind - */ - public void setRegistration(PortRegistrationType registration) { - toRT().setRegistration(registration); - } - - /** - * Queries my registration override. - * - * @return my registration override - */ - public String getRegistrationOverride() { - return toRT().getRegistrationOverride(); - } - - /** - * Sets my registration override. - * - * @param registrationOverride - * my registration override - */ - public void setRegistrationOverride(String registrationOverride) { - toRT().setRegistrationOverride(registrationOverride); - } - - /** - * Queries the kind of port that I am. - * - * @return my port kind, or {@link UMLRTPortKind#NULL NULL} if my properties are - * configured inconsistently and my kind is consequently indeterminate - */ - public UMLRTPortKind getKind() { - UMLRTPortKind result = UMLRTPortKind.NULL; - - if (isService() && isWired() && isBehavior() && !isPublish()) { - result = UMLRTPortKind.EXTERNAL_BEHAVIOR; - } else if (isBehavior() && isPublish() && !isWired()) { - result = UMLRTPortKind.SPP; // isService won't be checked here => Cf. bug 477033 - } else if (isWired() && isBehavior() && !isService() && !isPublish()) { - result = UMLRTPortKind.INTERNAL_BEHAVIOR; - } else if (isService() && isWired() && !isBehavior() && !isPublish()) { - result = UMLRTPortKind.RELAY; - } else if (isBehavior() && !isWired() && !isPublish()) { - result = UMLRTPortKind.SAP;// isService won't be checked here => Cf. bug 477033 - } - - return result; - } - - /** - * Assings my port kind. This will have side-effects in various - * attributes such as {@link #setService(boolean) isService}, - * {@link #setBehavior(boolean) isBehavior}, - * {@link #setWired(boolean) isWired}, and - * {@link #setPublish(boolean) isPublish}. - * - * @param kind - * my new port kind - * - * @throws NullPointerException - * if the {@code kind} is {@code null} - * @throws IllegalArgumentException - * if the {@code kind} is {@link UMLRTPortKind#isNull() isNull} - */ - public void setKind(UMLRTPortKind kind) { - if (Objects.requireNonNull(kind, "kind").isNull()) { //$NON-NLS-1$ - throw new IllegalArgumentException(kind.label()); - } - - switch (kind) { - case EXTERNAL_BEHAVIOR: - setService(true); - setWired(true); - setBehavior(true); - setPublish(false); - toUML().setVisibility(VisibilityKind.PUBLIC_LITERAL); - break; - case INTERNAL_BEHAVIOR: - setService(false); - setWired(true); - setBehavior(true); - setPublish(false); - toUML().setVisibility(VisibilityKind.PROTECTED_LITERAL); - break; - case RELAY: - setService(true); - setWired(true); - setBehavior(false); - setPublish(false); - toUML().setVisibility(VisibilityKind.PUBLIC_LITERAL); - break; - case SAP: - setService(false); - setWired(false); - setBehavior(true); - setPublish(false); - toUML().setVisibility(VisibilityKind.PROTECTED_LITERAL); - break; - case SPP: - setService(true); - setWired(false); - setBehavior(true); - setPublish(true); - toUML().setVisibility(VisibilityKind.PUBLIC_LITERAL); - break; - default: - throw new IllegalArgumentException("invalid port kind: " + kind); //$NON-NLS-1$ - } - } - - /** - * Queries whether I am of an external port kind. - * - * @return whether I am an external port kind - * - * @see UMLRTPortKind#isExternal() - */ - public boolean isExternal() { - return getKind().isExternal(); - } - - /** - * Queries whether I am of an internal port kind. - * - * @return whether I am an internal port kind - * - * @see UMLRTPortKind#isInternal() - */ - public boolean isInternal() { - return getKind().isInternal(); - } - - /** - * Queries the inherited port that I redefine, if any and even if - * I am {@link #isExcluded() excluded} or am the local representation of - * a port that is inherited as is. - * - * @return the port that I redefine/inherit, or {@code null} if - * I am a root definition - */ - public UMLRTPort getRedefinedPort() { - UMLRTPort result; - - if (toUML() instanceof InternalUMLRTElement) { - Port superPort = (Port) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); - result = UMLRTPort.getInstance(superPort); - } else { - UMLRTNamedElement redef = super.getRedefinedElement(); - result = (redef instanceof UMLRTPort) ? (UMLRTPort) redef : null; - } - - return result; - } - - @Override - public UMLRTPort getRedefinedElement() { - return getRedefinedPort(); - } - -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPortKind.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPortKind.java deleted file mode 100644 index 967c6cc..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTPortKind.java +++ /dev/null
@@ -1,116 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -/** - * Enumeration of UML-RT port kinds. - */ -public enum UMLRTPortKind { - EXTERNAL_BEHAVIOR("External Behavior", true, true, true, false), // - INTERNAL_BEHAVIOR("Internal Behavior", false, true, true, false), // - RELAY("Relay", true, false, true, false), // - SAP("SAP", false, true, false, false), // - SPP("SPP", true, true, false, true), // - NULL("<invalid>", false, false, false, false); // - - private final String label; - private final boolean external; - private final boolean behavior; - private final boolean wired; - private final boolean publish; - - UMLRTPortKind(String label, boolean external, boolean behavior, boolean wired, boolean publish) { - this.label = label; - this.external = external; - this.behavior = behavior; - this.wired = wired; - this.publish = publish; - } - - /** - * Obtains my user-presentable label. - * - * @return my label - */ - public String label() { - return label; - } - - /** - * Queries whether I am the {@link #NULL} object. - * - * @return whether I am the null value - */ - public boolean isNull() { - return this == NULL; - } - - /** - * Queries whether I am a kind of an external-facing port. - * The {@link #NULL} kind is neither external nor internal. - * - * @return whether ports of my kind are external facing - */ - public boolean isExternal() { - return external && (this != NULL); - } - - /** - * Queries whether I am a kind of an internal-facing port. - * The {@link #NULL} kind is neither internal nor external. - * - * @return whether ports of my kind are internal facing - */ - public boolean isInternal() { - return !external && (this != NULL); - } - - /** - * Queries whether I am a kind of a wired port. - * The {@link #NULL} kind is neither wired nor non-wired. - * - * @return whether ports of my kind are wired - */ - public boolean isWired() { - return wired && (this != NULL); - } - - /** - * Queries whether I am a kind of a non-wired port. - * The {@link #NULL} kind is neither non-wired nor wired. - * - * @return whether ports of my kind are unwired - */ - public boolean isUnwired() { - return !wired && (this != NULL); - } - - /** - * Queries whether I am a kind of a behaviour port. - * - * @return whether ports of my kind are behaviour ports - */ - public boolean isBehavior() { - return behavior; - } - - /** - * Queries whether I am a kind of a published port. - * - * @return whether ports of my kind are published - */ - public boolean isPublish() { - return publish; - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocol.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocol.java deleted file mode 100644 index d67cbf2..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocol.java +++ /dev/null
@@ -1,596 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toList; - -import java.util.Collections; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.function.Supplier; -import java.util.function.UnaryOperator; -import java.util.stream.Stream; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.Protocol; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageSet; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; -import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtUMLExtPackage; -import org.eclipse.papyrusrt.umlrt.uml.internal.util.CachedReference; -import org.eclipse.uml2.uml.AnyReceiveEvent; -import org.eclipse.uml2.uml.Collaboration; -import org.eclipse.uml2.uml.Interface; -import org.eclipse.uml2.uml.Operation; -import org.eclipse.uml2.uml.Package; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.util.UMLUtil; -import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper; - -/** - * A façade for UML {@link Collaboration} elements that represent UML-RT {@link Protocol}s, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public class UMLRTProtocol extends UMLRTClassifier { - private static final String ANY_RECEIVE_EVENT_NAME = "*"; //$NON-NLS-1$ - - static final FacadeType<Collaboration, Protocol, UMLRTProtocol> TYPE = new FacadeType<>( - UMLRTProtocol.class, - UMLPackage.Literals.COLLABORATION, - UMLRealTimePackage.Literals.PROTOCOL, - UMLRTProtocol::getInstance, - UMLRTProtocol::getSuperProtocol, - UMLRTProtocol::new); - - private static final Map<RTMessageKind, FacadeReference<Operation, EObject, UMLRTProtocolMessage>> MESSAGE_REFERENCES; - - private final boolean isConjugate; - private final Supplier<UMLRTProtocol> conjugate; - - static { - MESSAGE_REFERENCES = new EnumMap<>(RTMessageKind.class); - RTMessageKind.VALUES.forEach(kind -> MESSAGE_REFERENCES.put(kind, - new FacadeReference.Indirect<>( - UMLRTProtocolMessage.TYPE, - UMLPackage.Literals.INTERFACE__OWNED_OPERATION, - ExtUMLExtPackage.Literals.INTERFACE__IMPLICIT_OPERATION, - UMLPackage.Literals.OPERATION, - protocol -> requireMessageSet((Collaboration) protocol, kind)))); - } - - UMLRTProtocol(Protocol protocol) { - super(protocol.getBase_Collaboration(), protocol); - - this.isConjugate = false; - this.conjugate = new CachedReference<>(() -> new UMLRTProtocol(this)); - } - - private UMLRTProtocol(UMLRTProtocol base) { - super(base.toUML(), base.toRT()); - - this.isConjugate = true; - this.conjugate = () -> base; // The base has a hard ref from the model anyways - } - - /** - * Obtains the protocol façade for the base protocol type represented by the given - * UML collaboration. - * - * @param protocol - * a UML collaboration representing a protocol - * @return the base UML-RT protocol façade, or {@code null} if the collaboration - * is not actually a protocol - */ - public static UMLRTProtocol getInstance(Collaboration protocol) { - return getFacade(protocol, TYPE); - } - - /** - * Obtains the protocol façade of the given conjugation for a UML collaboration. - * - * @param protocol - * a UML collaboration representing a protocol - * @param conjugate - * {@code true} to obtain the conjugate protocol type; {@code false} - * for the base protocol type - * - * @return the protocol type, or {@code null} if the UML collaboration is not a protocol - */ - public static UMLRTProtocol getInstance(Collaboration protocol, boolean conjugate) { - UMLRTProtocol result = getFacade(protocol, TYPE); - return (conjugate && (result != null)) ? result.getConjugate() : result; - } - - /** - * Obtains the UML representation of the protocol. - * - * @return the UML representation - */ - @Override - public Collaboration toUML() { - return (Collaboration) super.toUML(); - } - - @Override - Protocol toRT() { - return (Protocol) super.toRT(); - } - - /** - * Queries my name. If I am a {@link #isConjugate() conjugate} protocol, then - * my name is suffixed by a tilde ({@literal ~}). - * - * @return my name - */ - @Override - public String getName() { - String result = super.getName(); - if (isConjugate()) { - result = result + "~"; //$NON-NLS-1$ - } - return result; - } - - /** - * Sets my name. If I am a {@link #isConjugate() conjugate} protocol, then - * my name must be suffixed by a tilde ({@literal ~}). - * - * @return my name - * - * @throws IllegalArgumentException - * if my name is ill-formed - */ - @Override - public void setName(String newName) { - if ((newName != null) && isConjugate()) { - if (!newName.endsWith("~")) { - throw new IllegalArgumentException("conjugate name must end with ~"); //$NON-NLS-1$ - } - - // But it isn't in the UML - newName = newName.substring(0, newName.length() - 1); - } - - super.setName(newName); - } - - /** - * Queries the package that contains me. This is not the protocol-container - * package in the UML representation, but the package in which that is nested. - * - * @return my logical containing package - */ - @Override - public UMLRTPackage getPackage() { - Package protocolContainer = toUML().getNearestPackage(); - return (protocolContainer == null) - ? null - : UMLRTPackage.getInstance(protocolContainer.getNestingPackage()); - } - - /** - * Queries whether I am the conjugate view of the UML-RT protocol. - * If I am the conjugate, then the {@linkplain #getMessages() messages} that - * I present are the inverse direction kind to those of the base {@code protocol}. - * - * @return whether I am the conjugate protocol - * - * @see #getConjugate() - */ - public boolean isConjugate() { - return isConjugate; - } - - /** - * Obtains the conjugate view of myself if I am the base protocol, or else - * the base protocol if I {@linkplain #isConjugate() am a conjugate}. - * - * @return my conjugate - * - * @see #isConjugate() - */ - public UMLRTProtocol getConjugate() { - return conjugate.get(); - } - - /** - * Obtains the 'real' conjugation to encode in the UML model according - * to my {@linkplain #isConjugate() conjugation}. - * - * @param kind - * a message direction kind - * @return the UML model's value of the {@code kind} - * - * @see #isConjugate() - */ - private RTMessageKind forConjugation(RTMessageKind kind) { - if ((kind != null) && isConjugate()) { - switch (kind) { - case IN: - kind = RTMessageKind.OUT; - break; - case OUT: - kind = RTMessageKind.IN; - break; - default: - // INOUT is its own inverse - break; - } - } - return kind; - } - - /** - * Overrides the inherited operation to account for conjugation. - * - * @return my general protocol, if any, of the same conjugation as myself - */ - @Override - public UMLRTProtocol getGeneral() { - return forConjugation((UMLRTProtocol) super.getGeneral()); - } - - /** - * Obtains the protocol that is my supertype, if any. - * - * @return my supertype, or {@code null} if I am a root protocol type - */ - public UMLRTProtocol getSuperProtocol() { - return getGeneral(); - } - - /** - * Assigns the protocol that is my supertype. UML-RT recognizes - * only single inheritance, so if the UML model has any other - * generalizations, they are destroyed. - * - * @param capsule - * my new supertype, or {@code null} if I am to be a root type - */ - public void setSuperProtocol(UMLRTProtocol protocol) { - setGeneral(protocol); - messageSets().forEach(set -> setSuperMessageSet(set, protocol)); - } - - private void setSuperMessageSet(Interface messageSet, UMLRTProtocol protocol) { - RTMessageSet rt = getRTMessageSet(messageSet); - Interface superMessageSet = (protocol == null) - ? null - : protocol.requireMessageSet(rt.getRtMsgKind()); - - setGeneral(messageSet, superMessageSet); - } - - /** - * Obtains the currently loaded protocols that are my direct subtypes. - * Note that there may be other sub-types in resources that are not - * currently loaded. - * - * @return my known subtypes - */ - public List<UMLRTProtocol> getSubProtocols() { - return getSpecifics(false) - .filter(UMLRTProtocol.class::isInstance) - .map(UMLRTProtocol.class::cast) - .map(this::forConjugation) - .collect(collectingAndThen(toList(), Collections::unmodifiableList)); - } - - /** - * Gets the entire protocol specialization hierarchy, rooted at myself, - * as a stream. Note that there may be other types in the hierarchy in - * resources that are not currently loaded; these will not be included - * in the result. - * - * @return my protocol class hierarchy - */ - @Override - public Stream<UMLRTProtocol> getHierarchy() { - return super.getHierarchy() - .filter(UMLRTProtocol.class::isInstance) - .map(UMLRTProtocol.class::cast) - .map(this::forConjugation); - } - - /** - * Gets the entire protocol generalization chain, rooted at myself. - * - * @return my protocol generalization chain, in order from myself to my most general supertype - */ - @Override - public List<UMLRTProtocol> getAncestry() { - return ancestry(UMLRTProtocol.class); - } - - UMLRTProtocol forConjugation(UMLRTProtocol other) { - return ((other != null) && (other != this) && isConjugate()) - ? other.getConjugate() - : other; - } - - static boolean isProtocol(Collaboration collaboration) { - return getProtocol(collaboration) != null; - } - - static Protocol getProtocol(Collaboration collaboration) { - return UMLUtil.getStereotypeApplication(collaboration, Protocol.class); - } - - static boolean isRTMessageSet(Interface interface_) { - return getRTMessageSet(interface_) != null; - } - - static RTMessageSet getRTMessageSet(Interface interface_) { - return UMLUtil.getStereotypeApplication(interface_, RTMessageSet.class); - } - - Stream<Interface> messageSets() { - return toUML().getNearestPackage().getOwnedTypes().stream() - .filter(Interface.class::isInstance).map(Interface.class::cast) - .filter(UMLRTProtocol::isRTMessageSet); - } - - Optional<Interface> getMessageSet(RTMessageKind kind) { - return messageSets().map(UMLRTProtocol::getRTMessageSet) - .filter(set -> set.getRtMsgKind() == kind) - .findFirst() - .map(RTMessageSet::getBase_Interface); - } - - Interface requireMessageSet(RTMessageKind kind) { - return getMessageSet(kind) - .orElseThrow(() -> new IllegalArgumentException("no such message set: " + kind)); //$NON-NLS-1$ - } - - static Interface requireMessageSet(Collaboration protocol, RTMessageKind kind) { - return UMLRTProtocol.getInstance(protocol).getMessageSet(kind) - .orElseThrow(() -> new IllegalArgumentException("no such message set: " + kind)); //$NON-NLS-1$ - } - - /** - * Queries my protocol messages of the given direction {@code kind}, including those - * that are inherited from my super-protocol (if any), - * except for any that I {@link #exclude() exclude}. - * - * @param kind - * the message direction kind - * @return the messages of that direction {@code kind}, or an empty list if there are none - */ - public List<UMLRTProtocolMessage> getMessages(RTMessageKind kind) { - // TODO: Cache in the UML CacheAdapter? - return getFacades(MESSAGE_REFERENCES.get(forConjugation(kind)), messageConjugation()); - } - - /** - * Obtains my protocol messages of the given direction {@code kind}, including - * any that are inherited from my super-protocol - * if I have one but also optionally any that I {@linkplain #exclude() exclude}. - * - * @param kind - * the message direction kind - * @param withExcluded - * whether to return also excluded messages - * @return all of my messages of the given {@code kind}, optionally also with exclusions - */ - public List<UMLRTProtocolMessage> getMessages(RTMessageKind kind, boolean withExclusions) { - // TODO: Cache in the UML CacheAdapter? - return getFacades(MESSAGE_REFERENCES.get(forConjugation(kind)), withExclusions, messageConjugation()); - } - - /** - * Obtains all of my protocol messages, including those - * that are inherited from my super-protocol, if any, - * except for any that I {@link #exclude() exclude}. - * - * @return my non-excluded messages, or an empty list if there are none - */ - public List<UMLRTProtocolMessage> getMessages() { - return getMessages(false); - } - - /** - * Obtains all of my protocol messages, including those - * that are inherited from my super-protocol, if any, - * optionally also including any that I {@link #exclude() exclude}. - * - * @param withExclusions - * whether to also consider excluded messages - * - * @return my messages, or an empty list if there are none - */ - public List<UMLRTProtocolMessage> getMessages(boolean withExclusions) { - // TODO: Cache in the UML CacheAdapter - return MESSAGE_REFERENCES.values().stream() - .flatMap(ref -> ref.facades(toUML(), withExclusions)) - .map(messageConjugation()) - .collect(collectingAndThen(toList(), Collections::unmodifiableList)); - } - - /** - * Obtains the {@code name}d message, possibly inherited from my super-protocol, - * even if I have {@linkplain #exclude() excluded} it. - * - * @param kind - * the message direction kind to find - * @param name - * the message name to find - * @return the named message, or {@code null} if I have no message of that - * {@code kind} and {@code name} - */ - public UMLRTProtocolMessage getMessage(RTMessageKind kind, String name) { - UMLRTProtocolMessage result = get(MESSAGE_REFERENCES.get(forConjugation(kind)), name); - if (result != null) { - result = messageConjugation().apply(result); - } - return result; - } - - /** - * Obtains the {@code name}d message of any direction kind, possibly inherited - * from my super-protocol, even if I have {@linkplain #exclude() excluded} it. - * - * @param name - * the message name to find - * @return the named message, or {@code null} if I have no message of that {@code name} - */ - public UMLRTProtocolMessage getMessage(String name) { - return MESSAGE_REFERENCES.values().stream() - .map(ref -> get(ref, name)) - .filter(Objects::nonNull) - .findAny() - .map(messageConjugation()) - .orElse(null); - } - - UnaryOperator<UMLRTProtocolMessage> messageConjugation() { - return isConjugate() - ? UMLRTProtocolMessage::getConjugate - : UnaryOperator.identity(); - } - - /** - * Create a new protocol message without any parameters. - * - * @param kind - * the message direction kind - * @param name - * the message name - * - * @return the new protocol message - */ - public UMLRTProtocolMessage createMessage(RTMessageKind kind, String name) { - UMLRTProtocolMessage result = create(MESSAGE_REFERENCES.get(forConjugation(kind)), name); - result.initReceiveEvent(); - return messageConjugation().apply(result); - } - - /** - * Create a new protocol message with a {@code data} parameter of the given type. - * - * @param kind - * the message direction kind - * @param name - * the message name - * @param dataParamType - * the type of the {@code data} parameter - * - * @return the new protocol message - */ - public UMLRTProtocolMessage createMessage(RTMessageKind kind, String name, Type dataParamType) { - UMLRTProtocolMessage result = createMessage(kind, name); - result.toUML().createOwnedParameter("data", dataParamType); - return result; - } - - /** - * Create a new protocol message with parameters. - * - * @param kind - * the message direction kind - * @param name - * the message name - * @param parameters - * the ordered list of parameter names - * @param paramTypes - * the corresponding list of parameter types - * - * @return the new protocol message - */ - public UMLRTProtocolMessage createMessage(RTMessageKind kind, String name, List<String> parameters, List<? extends Type> paramTypes) { - UMLRTProtocolMessage result = createMessage(kind, name); - - if ((parameters != null) && (paramTypes != null)) { - int count = parameters.size(); - if (paramTypes.size() != count) { - throw new IllegalArgumentException("parameter names and types mismatched"); //$NON-NLS-1$ - } - for (int i = 0; i < count; i++) { - result.toUML().createOwnedParameter(parameters.get(i), paramTypes.get(i)); - } - } - - return result; - } - - UMLRTProtocol initContents() { - // Message set interfaces - createMessageSet(RTMessageKind.IN); - createMessageSet(RTMessageKind.OUT); - createMessageSet(RTMessageKind.IN_OUT); - - // Wildcard event - toUML().getNearestPackage().createPackagedElement( - ANY_RECEIVE_EVENT_NAME, UMLPackage.Literals.ANY_RECEIVE_EVENT); - - return this; - } - - private void createMessageSet(RTMessageKind direction) { - Package protocolContainer = toUML().getNearestPackage(); - - String name = getName(); - switch (direction) { - case OUT: - name = name + "~"; //$NON-NLS-1$ - break; - case IN_OUT: - name = name + "IO"; //$NON-NLS-1$ - break; - default: // IN - // Pass - break; - - } - - Interface messageSet = (Interface) protocolContainer.createOwnedType(name, UMLPackage.Literals.INTERFACE); - RTMessageSet stereo = (RTMessageSet) StereotypeApplicationHelper.getInstance(messageSet).applyStereotype(messageSet, UMLRealTimePackage.Literals.RT_MESSAGE_SET); - stereo.setRtMsgKind(direction); - - switch (direction) { - case IN: - toUML().createInterfaceRealization(null, messageSet); - break; - case OUT: - toUML().createUsage(messageSet); - break; - case IN_OUT: - toUML().createInterfaceRealization(null, messageSet); - toUML().createUsage(messageSet); - break; - } - } - - /** - * Obtains the any-receive-event associated with this protocol, which signals the receipt - * of any incoming message on a port typed by me. - * - * @return my any-receive-event - */ - public AnyReceiveEvent getAnyReceiveEvent() { - AnyReceiveEvent result = null; - - Package protocolContainer = toUML().getNearestPackage(); - if (protocolContainer != null) { - result = (AnyReceiveEvent) protocolContainer.getPackagedElement( - ANY_RECEIVE_EVENT_NAME, false, UMLPackage.Literals.ANY_RECEIVE_EVENT, false); - } - - return result; - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocolMessage.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocolMessage.java deleted file mode 100644 index 7815e67..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTProtocolMessage.java +++ /dev/null
@@ -1,305 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016, 2017 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import static org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol.isRTMessageSet; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.function.Supplier; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageKind; -import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTMessageSet; -import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; -import org.eclipse.papyrusrt.umlrt.uml.internal.util.CachedReference; -import org.eclipse.uml2.uml.CallEvent; -import org.eclipse.uml2.uml.Collaboration; -import org.eclipse.uml2.uml.Interface; -import org.eclipse.uml2.uml.Operation; -import org.eclipse.uml2.uml.Package; -import org.eclipse.uml2.uml.Parameter; -import org.eclipse.uml2.uml.Type; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * A façade for UML {@link Operation} elements that represent UML-RT {@code ProtocolMessage}s, - * providing a view of the element more in keeping with the UML-RT semantics. - */ -public class UMLRTProtocolMessage extends UMLRTNamedElement { - static final FacadeType<Operation, EObject, UMLRTProtocolMessage> TYPE = new FacadeType<>( - UMLRTProtocolMessage.class, - UMLPackage.Literals.OPERATION, - null, - UMLRTProtocolMessage::getInstance, - UMLRTProtocolMessage::getRedefinedMessage, - null); - - private final boolean isConjugate; - private final Supplier<UMLRTProtocolMessage> conjugate; - - UMLRTProtocolMessage(Operation operation) { - super(operation, null); - - this.isConjugate = false; - this.conjugate = new CachedReference<>(() -> new UMLRTProtocolMessage(this)); - } - - private UMLRTProtocolMessage(UMLRTProtocolMessage base) { - super(base.toUML(), base.toRT()); - - this.isConjugate = true; - this.conjugate = () -> base; // The base has a hard ref from the model anyways - } - - /** - * Obtains the protocol message façade for the message represented by the given - * UML operation. - * - * @param operation - * a UML operation representing a protocol message - * @return the base UML-RT protocol-message façade, or {@code null} if the operation - * is not actually a protocol message - */ - public static UMLRTProtocolMessage getInstance(Operation operation) { - BasicFacadeAdapter<UMLRTProtocolMessage> adapter = null; - - if ((operation != null) && isProtocolMessage(operation)) { - adapter = TYPE.getAdapter(operation); - if (adapter == null) { - adapter = new UMLRTProtocolMessage(operation).new BasicFacadeAdapter<>(); - operation.eAdapters().add(adapter); - } - } - - return (adapter == null) ? null : adapter.getFacade(); - } - - static UMLRTProtocolMessage getInstance(Operation operation, boolean conjugate) { - UMLRTProtocolMessage result = getInstance(operation); - - return ((result == null) || !conjugate) - ? result - : result.getConjugate(); - } - - static boolean isProtocolMessage(Operation operation) { - return (operation.getNamespace() instanceof Interface) - && isRTMessageSet((Interface) operation.getNamespace()); - } - - /** - * Obtains the UML representation of the protocol message. - * - * @return the UML representation - */ - @Override - public Operation toUML() { - return (Operation) super.toUML(); - } - - /** - * Obtains the protocol message's receive event in the UML model. - * - * @return the UML message receive event - */ - public CallEvent toReceiveEvent() { - return toUML().getNearestPackage().getPackagedElements().stream() - .filter(CallEvent.class::isInstance).map(CallEvent.class::cast) - .filter(ev -> ev.getOperation() == toUML()) - .findAny() - .orElse(null); - } - - /** - * Queries whether I am a conjugate message, that is, a message of my protocol's - * {@link UMLRTProtocol#getConjugate() conjugate} view. - * - * @return whether I am a conjugate - */ - public boolean isConjugate() { - return isConjugate; - } - - /** - * Obtains my conjugate message, that is, the corresponding message of my protocol's - * {@link UMLRTProtocol#getConjugate() conjugate} view. - * - * @return my conjugate - */ - public UMLRTProtocolMessage getConjugate() { - return conjugate.get(); - } - - Optional<RTMessageSet> getMessageSet() { - return Optional.ofNullable(toUML().getNamespace()) - .filter(Interface.class::isInstance).map(Interface.class::cast) - .map(UMLRTProtocol::getRTMessageSet); - } - - /** - * Queries the protocol that defines or inherits me. - * - * @return my containing protocol context - */ - public UMLRTProtocol getProtocol() { - Package protocolContainer = toUML().getNearestPackage(); - - return UMLRTProtocol.getInstance((Collaboration) protocolContainer.getOwnedType( - protocolContainer.getName(), false, UMLPackage.Literals.COLLABORATION, false), - isConjugate()); - } - - /** - * Queries my direction kind. - * - * @return my message direction kind, or {@code null} if I am not a valid - * protocol message - */ - public RTMessageKind getKind() { - return forConjugation(getMessageSet().map(RTMessageSet::getRtMsgKind).orElse(null)); - } - - /** - * Obtains the 'real' conjugation to encode in the UML model according - * to my {@linkplain #isConjugate() conjugation}. - * - * @param kind - * a message direction kind - * @return the UML model's value of the {@code kind} - * - * @see #isConjugate() - */ - private RTMessageKind forConjugation(RTMessageKind kind) { - if ((kind != null) && isConjugate()) { - switch (kind) { - case IN: - kind = RTMessageKind.OUT; - break; - case OUT: - kind = RTMessageKind.IN; - break; - default: - // INOUT is its own inverse - break; - } - } - return kind; - } - - /** - * Assigns my direction kind. Note that this actually moves me to - * a different message-set interface in the UML representation. - * - * @param kind - * my new kind - * - * @throws NullPointerException - * if the {@code kind} is {@code null} - */ - public void setKind(RTMessageKind kind) { - if (getKind() != Objects.requireNonNull(kind, "kind")) { //$NON-NLS-1$ - getProtocol().requireMessageSet(forConjugation(kind)) - .getOwnedOperations().add(toUML()); - } - } - - /** - * Obtains my parameters. As this is the {@link Operation#getOwnedParameters() ownedParameter} - * list from the UML representation, it may be manipulated directly to effect changes - * in the protocol message parameters. - * - * @return my parameters - */ - public List<Parameter> getParameters() { - return toUML().getOwnedParameters(); - } - - /** - * Obtains the {@code name}d parameter. - * - * @param name - * the parameter name to find - * @return the named parameter, or {@code null} if I have no parameter of that {@code name} - */ - public Parameter getParameter(String name) { - return toUML().getOwnedParameter(name, null); - } - - /** - * Obtains the {@code type}d parameter. - * - * @param type - * the parameter type to find - * @return the indicated parameter, or {@code null} if I have no parameter of that {@code type} - */ - public Parameter getParameter(Type type) { - return toUML().getOwnedParameter(null, type); - } - - /** - * Creates a new parameter. - * - * @param name - * the new parameter name - * @parm type the new parameter type - * - * @return the new parameter - */ - public Parameter createParameter(String name, Type type) { - return toUML().createOwnedParameter(name, type); - } - - /** - * Queries the inherited protocol message that I redefine, if any and even if - * I am {@link #isExcluded() excluded} or am the local representation of - * a message that is inherited as is. - * - * @return the protocol message that I redefine/inherit, or {@code null} if - * I am a root definition - */ - public UMLRTProtocolMessage getRedefinedMessage() { - UMLRTProtocolMessage result; - - if (toUML() instanceof InternalUMLRTElement) { - Operation superOperation = (Operation) ((InternalUMLRTElement) toUML()).rtGetRedefinedElement(); - result = UMLRTProtocolMessage.getInstance(superOperation, isConjugate()); - } else { - UMLRTNamedElement redef = super.getRedefinedElement(); - result = (redef instanceof UMLRTProtocolMessage) ? (UMLRTProtocolMessage) redef : null; - if ((result != null) && isConjugate()) { - result = result.getConjugate(); - } - } - - return result; - } - - @Override - public UMLRTProtocolMessage getRedefinedElement() { - return getRedefinedMessage(); - } - - @Override - public UMLRTNamedElement getRedefinitionContext() { - return getProtocol(); - } - - UMLRTProtocolMessage initReceiveEvent() { - CallEvent event = (CallEvent) toUML().getNearestPackage().createPackagedElement(null, UMLPackage.Literals.CALL_EVENT); - event.setOperation(toUML()); - return this; - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTReplicatedElement.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTReplicatedElement.java deleted file mode 100644 index d4533bf..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/UMLRTReplicatedElement.java +++ /dev/null
@@ -1,146 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.uml2.uml.LiteralInteger; -import org.eclipse.uml2.uml.LiteralUnlimitedNatural; -import org.eclipse.uml2.uml.MultiplicityElement; -import org.eclipse.uml2.uml.Property; -import org.eclipse.uml2.uml.ValueSpecification; - -/** - * A façade for UML {@link Property} elements that represent UML-RT replicated - * features, providing a view of the element more in keeping with the UML-RT semantics. - */ -public abstract class UMLRTReplicatedElement extends UMLRTNamedElement { - - UMLRTReplicatedElement(Property property, EObject stereotype) { - super(property, stereotype); - } - - @Override - public Property toUML() { - return (Property) super.toUML(); - } - - /** - * Obtains the capsule that defines (or inherits) me. - * - * @return my context capsule - */ - public UMLRTCapsule getCapsule() { - return UMLRTCapsule.getInstance(toUML().getClass_()); - } - - /** - * My redefinition context is my {@link #getCapsule() capsule}. - * - * @return my redefinition contet - * - * @see #getCapsule() - */ - @Override - public UMLRTCapsule getRedefinitionContext() { - return getCapsule(); - } - - /** - * Queries whether the replication factor is represented as - * some kind of expression (usually a constant defined elsewhere - * in the model) and not literally as an integer value. - * In the case of a symbolic replication factor, this façade - * API cannot interpret it but can replace it, so it is necessary - * to access the {@linkplain #toUML() UML model element} directly - * to get its multiplicity bounds. - * - * @return whether the replication factor is symbolic - */ - public boolean isSymbolicReplicationFactor() { - return isSymbolicReplicationFactor(toUML().getUpperValue()); - } - - static boolean isSymbolicReplicationFactor(ValueSpecification value) { - // The null value is interpreted by default as 1, which is an integer - return (value != null) - && !(value instanceof LiteralUnlimitedNatural) - && !(value instanceof LiteralInteger) - && !isIntegerValuedExpression(value); - } - - private static boolean isIntegerValuedExpression(ValueSpecification value) { - String stringValue = value.stringValue(); - return isIntegerValued(stringValue); - } - - private static boolean isIntegerValued(String stringValue) { - return (stringValue != null) - && stringValue.chars().allMatch(ch -> (ch >= '0') && (ch <= '9')); - } - - /** - * Queries my replication factor. If the lower and upper bounds in the - * UML representation differ, then the result is the upper bound. - * - * @return my replication factor - */ - public int getReplicationFactor() { - return getReplicationFactor(toUML().getUpperValue()); - } - - static int getReplicationFactor(ValueSpecification value) { - return (value == null) ? 1 : integerValue(value); - } - - private static int integerValue(ValueSpecification value) { - int result; - - if (value instanceof LiteralUnlimitedNatural) { - result = ((LiteralUnlimitedNatural) value).getValue(); - } else if (value instanceof LiteralInteger) { - result = ((LiteralInteger) value).getValue(); - } else { - String stringValue = value.stringValue(); - if (isIntegerValued(stringValue)) { - result = Integer.valueOf(stringValue); - } else { - result = 1; - } - } - - return result; - } - - /** - * Sets my replication factor. If the lower bound in the UML - * representation is zero to indicate optionality, then only - * the upper bound is changed. - * - * @return my replication factor - */ - public void setReplicationFactor(int replication) { - setReplicationFactor(toUML(), replication); - } - - static void setReplicationFactor(MultiplicityElement mult, int replication) { - if ((replication != getReplicationFactor(mult.getUpperValue())) - || (replication != getReplicationFactor(mult.getLowerValue()))) { - mult.setLower(replication); - - if (mult.getLower() != 0) { - mult.setUpper(replication); - } - } - } -}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java new file mode 100644 index 0000000..5dfaeea --- /dev/null +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java
@@ -0,0 +1,203 @@ +/***************************************************************************** + * Copyright (c) 2016, 2017 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; + +import java.util.List; +import java.util.Optional; +import java.util.function.UnaryOperator; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EcoreEList; +import org.eclipse.papyrusrt.umlrt.uml.FacadeObject; +import org.eclipse.papyrusrt.umlrt.uml.UMLRTModel; +import org.eclipse.papyrusrt.umlrt.uml.internal.impl.UMLRTUMLFactoryImpl; +import org.eclipse.papyrusrt.umlrt.uml.util.UMLRTExtensionUtil; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.NamedElement; + +/** + * A façade for UML {@link Element}s that represent UML-RT concepts, + * providing a view of the element more in keeping with the UML-RT semantics. + */ +public abstract class FacadeObjectImpl extends MinimalEObjectImpl.Container implements FacadeObject { + + private Element element; + private EObject stereotype; + + protected FacadeObjectImpl() { + super(); + } + + @SuppressWarnings("unchecked") + <F extends FacadeObjectImpl> F init(Element element, EObject stereotype) { + this.element = element; + this.stereotype = stereotype; + return (F) this; + } + + static <T extends Element, U extends EObject, F extends FacadeObjectImpl> // + F getFacade(T element, FacadeType<T, U, F> type) { + FacadeObjectImpl.BasicFacadeAdapter<F> adapter = null; + + if (element != null) { + adapter = type.getAdapter(element); + if (adapter == null) { + U stereotype = type.getStereotypeApplication(element); + if (stereotype != null) { + adapter = type.createAdapter(stereotype); + adapter.addAdapter(element); + adapter.getFacade().init(element, stereotype); + } + } + } + + return (adapter == null) ? null : type.getFacade(adapter); + } + + @Override + public Element toUML() { + return element; + } + + EObject toRT() { + return stereotype; + } + + @Override + public boolean isExcluded() { + return false; + } + + public void destroy() { + // The destroy() API tears down cross-references, so + // don't let that auto-reify anything + Optional.ofNullable(toUML()).ifPresent( + uml -> UMLRTExtensionUtil.run(uml, uml::destroy)); + } + + <T extends Element, U extends EObject, R extends FacadeObject, F extends R> // + List<R> getFacades(FacadeReference<T, U, R, F> reference) { + return reference.getFacades(this); + } + + <T extends Element, U extends EObject, R extends FacadeObject, F extends R> // + List<R> getFacades(FacadeReference<T, U, R, F> reference, boolean withExclusions) { + return reference.getFacades(this, withExclusions); + } + + <T extends Element, U extends EObject, R extends FacadeObject, F extends R> // + List<R> getFacades(FacadeReference<T, U, R, F> reference, boolean withExclusions, UnaryOperator<R> andThen) { + return reference.getFacades(this, withExclusions, andThen); + } + + <T extends Element, U extends EObject, R extends FacadeObject, F extends R> // + List<R> getFacades(FacadeReference<T, U, R, F> reference, UnaryOperator<R> andThen) { + return reference.getFacades(this, andThen); + } + + <T extends Element, U extends EObject, R extends FacadeObject, F extends R> // + R getRedefinitionOf(R inherited, FacadeReference<T, U, R, F> reference) { + return reference.getRedefinitionOf(inherited, element); + } + + <T extends NamedElement, U extends EObject, R extends FacadeObject, F extends R> // + R create(FacadeReference<T, U, R, F> reference, String name) { + @SuppressWarnings("unchecked") + T result = (T) UMLRTUMLFactoryImpl.eINSTANCE.create(reference.getEReferenceType()); + + if ((name != null) && (result != null)) { + result.setName(name); + } + + reference.getUML(toUML()).add(result); + reference.getType().applyStereotype(result); + + return reference.getType().getFacade(result); + } + + protected <E> EList<E> elist(EStructuralFeature feature, List<E> list) { + return new EcoreEList.UnmodifiableEList.FastCompare<>(this, feature, list.size(), list.toArray()); + } + + @Override + public String toString() { + return String.format("%s()", eClass().getName()); //$NON-NLS-1$ + } + + // + // Nested types + // + + /** + * An adapter that attaches the façade object to its underlying UML + * element (providing canonicalization of the mapping) and allows it to + * react to changes in the UML (for example, to invalidate cached information + * or to send change events). + */ + protected class BasicFacadeAdapter<F extends FacadeObjectImpl> extends AdapterImpl { + BasicFacadeAdapter() { + super(); + } + + @SuppressWarnings("unchecked") + final F getFacade() { + return (F) FacadeObjectImpl.this; + } + + @Override + public final boolean isAdapterForType(Object type) { + return type == FacadeObjectImpl.this.getClass(); + } + + protected boolean addAdapter(Notifier notifier) { + EList<Adapter> eAdapters = notifier.eAdapters(); + return !eAdapters.contains(this) && eAdapters.add(this); + } + + protected boolean removeAdapter(Notifier notifier) { + return notifier.eAdapters().remove(this); + } + + @Override + public void setTarget(Notifier newTarget) { + super.setTarget(newTarget); + + if (newTarget != null) { + // Ensure that we get stereotype application changes + UMLRTModel.getInstance(((EObject) newTarget).eResource()); + } + } + + protected void handleNotification(Notification msg) { + // Pass + } + + @Override + final public void notifyChanged(Notification msg) { + if (msg.isTouch()) { + return; + } + + handleNotification(msg); + } + } + +}
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeReference.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeReference.java similarity index 62% rename from plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeReference.java rename to plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeReference.java index 8e0a74e..2ce2e47 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeReference.java +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeReference.java
@@ -11,45 +11,53 @@ * *****************************************************************************/ -package org.eclipse.papyrusrt.umlrt.uml; +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; import static java.util.stream.Collectors.collectingAndThen; import static java.util.stream.Collectors.toList; -import java.util.Collections; import java.util.List; -import java.util.Objects; import java.util.function.Function; import java.util.function.Predicate; import java.util.function.UnaryOperator; import java.util.stream.Stream; +import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.util.EcoreEList; +import org.eclipse.papyrusrt.umlrt.uml.FacadeObject; import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; import org.eclipse.uml2.uml.Element; /** * Metadata object describing a reference between façade objects. */ -class FacadeReference<T extends Element, S extends EObject, F extends FacadeObject> { +class FacadeReference<T extends Element, S extends EObject, R extends FacadeObject, F extends R> { - private final FacadeType<T, S, F> type; + private final FacadeType<T, S, ? extends F> type; + private final EReference facadeReference; + private final Class<R> referenceType; private final EReference feature; private final EReference extension; private final EClass metaclass; - FacadeReference(FacadeType<T, S, F> type, EReference feature, EReference extension, EClass metaclass) { + FacadeReference(FacadeType<T, S, ? extends F> type, EReference facadeReference, Class<R> referenceType, + EReference feature, EReference extension, EClass metaclass) { + super(); this.type = type; + this.facadeReference = facadeReference; + this.referenceType = referenceType; this.feature = feature; this.extension = extension; this.metaclass = metaclass; } - FacadeType<T, S, F> getType() { + FacadeType<T, S, ? extends F> getType() { return type; } @@ -84,7 +92,7 @@ @SuppressWarnings("unchecked") List<T> getExtension(Element element) { return !(element instanceof InternalUMLRTElement) - ? Collections.emptyList() + ? ECollections.emptyEList() : (List<T>) element.eGet(extension); } @@ -106,44 +114,45 @@ .filter(metaclass::isInstance); } - Stream<F> facades(Element element, boolean withExclusions) { - Stream<F> result = getAll(element) + Stream<R> facades(Element element, boolean withExclusions) { + Stream<R> result = getAll(element) .map(type::getFacade) - .filter(Objects::nonNull); + .filter(referenceType::isInstance) + .map(referenceType::cast); if (!withExclusions) { - Predicate<F> isExcluded = FacadeObject::isExcluded; - Predicate<F> notExcluded = isExcluded.negate(); + Predicate<R> isExcluded = FacadeObject::isExcluded; + Predicate<R> notExcluded = isExcluded.negate(); result = result.filter(notExcluded); } return result; } - List<F> getFacades(Element element, boolean withExclusions) { - return facades(element, withExclusions).collect( - collectingAndThen(toList(), Collections::unmodifiableList)); + List<R> getFacades(FacadeObjectImpl owner, boolean withExclusions) { + return facades(owner.toUML(), withExclusions).collect( + collectingAndThen(toList(), list -> elist(owner, list))); } - List<F> getFacades(Element element, boolean withExclusions, UnaryOperator<F> andThen) { - return facades(element, withExclusions) + private EList<R> elist(FacadeObjectImpl owner, List<R> list) { + return new EcoreEList.UnmodifiableEList.FastCompare<>(owner, facadeReference, list.size(), list.toArray()); + } + + List<R> getFacades(FacadeObjectImpl owner, boolean withExclusions, UnaryOperator<R> andThen) { + return facades(owner.toUML(), withExclusions) .map(andThen) - .collect(collectingAndThen(toList(), Collections::unmodifiableList)); + .collect(collectingAndThen(toList(), list -> elist(owner, list))); } - List<F> getFacades(Element element) { - return getFacades(element, false); + List<R> getFacades(FacadeObjectImpl owner) { + return getFacades(owner, false); } - List<F> getFacades(Element element, UnaryOperator<F> andThen) { - return getFacades(element, false, andThen); + List<R> getFacades(FacadeObjectImpl owner, UnaryOperator<R> andThen) { + return getFacades(owner, false, andThen); } - List<F> getFacades(FacadeObject owner) { - return getFacades(owner.toUML()); - } - - F getRedefinitionOf(F facade, Element element) { + R getRedefinitionOf(R facade, Element element) { return facades(element, false) .filter(f -> type.redefines(f, facade)) .findAny() @@ -159,13 +168,13 @@ // Nested types // - static class Indirect<T extends Element, S extends EObject, F extends FacadeObject> extends FacadeReference<T, S, F> { + static class Indirect<T extends Element, S extends EObject, R extends FacadeObject, F extends R> extends FacadeReference<T, S, R, F> { private final Function<? super Element, ? extends Element> indirection; - Indirect(FacadeType<T, S, F> type, EReference feature, EReference extension, EClass metaclass, + Indirect(FacadeType<T, S, ? extends F> type, EReference facadeReference, Class<R> referenceType, EReference feature, EReference extension, EClass metaclass, Function<? super Element, ? extends Element> indirection) { - super(type, feature, extension, metaclass); + super(type, facadeReference, referenceType, feature, extension, metaclass); this.indirection = indirection; } @@ -178,7 +187,7 @@ @Override List<T> getExtension(Element element) { return (element == null) - ? Collections.emptyList() + ? ECollections.emptyEList() : super.getExtension(indirection.apply(element)); } }
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeType.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java similarity index 81% rename from plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeType.java rename to plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java index 79dce7a..6601094 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/FacadeType.java +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java
@@ -11,7 +11,7 @@ * *****************************************************************************/ -package org.eclipse.papyrusrt.umlrt.uml; +package org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl; import java.util.function.Function; import java.util.function.UnaryOperator; @@ -20,7 +20,8 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.papyrusrt.umlrt.uml.FacadeObject.BasicFacadeAdapter; +import org.eclipse.papyrusrt.umlrt.uml.FacadeObject; +import org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.FacadeObjectImpl.BasicFacadeAdapter; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.util.UMLUtil; import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper; @@ -28,17 +29,17 @@ /** * Metadata object describing the type of a façade object. */ -final class FacadeType<T extends Element, S extends EObject, F extends FacadeObject> { +final class FacadeType<T extends Element, S extends EObject, F extends FacadeObjectImpl> { private final Class<F> instanceClass; private final EClass umlMetaclass; private final EClass stereotype; private final Function<T, F> facadeFunction; private final UnaryOperator<F> redefinitionOperator; - private final Class<? extends FacadeObject.BasicFacadeAdapter<F>> adapterType; - private final Function<? super S, ? extends FacadeObject.BasicFacadeAdapter<F>> adapterFactory; + private final Class<? extends FacadeObjectImpl.BasicFacadeAdapter<F>> adapterType; + private final Function<? super S, ? extends FacadeObjectImpl.BasicFacadeAdapter<F>> adapterFactory; - <A extends FacadeObject.BasicFacadeAdapter<F>> FacadeType(Class<F> instanceClass, + <A extends FacadeObjectImpl.BasicFacadeAdapter<F>> FacadeType(Class<F> instanceClass, EClass umlMetaclass, EClass stereotype, Function<T, F> facadeFunction, UnaryOperator<F> redefinitionOperator, @@ -85,23 +86,27 @@ return redefinitionOperator.apply(facade); } - boolean redefines(F self, F other) { + boolean redefines(FacadeObject self, FacadeObject other) { boolean result = false; - for (; !result && (self != null); self = getRedefinition(self)) { + for (; !result && (self != null); self = getRedefinition(cast(self))) { result = self == other; } return result; } + F cast(Object object) { + return instanceClass.cast(object); + } + @SuppressWarnings("unchecked") - <A extends FacadeObject.BasicFacadeAdapter<F>> // + <A extends FacadeObjectImpl.BasicFacadeAdapter<F>> // A getAdapter(T element) { return (A) adapterType.cast(EcoreUtil.getExistingAdapter(element, instanceClass)); } - FacadeObject.BasicFacadeAdapter<F> createAdapter(S stereotype) { + FacadeObjectImpl.BasicFacadeAdapter<F> createAdapter(S stereotype) { return adapterFactory.apply(stereotype); }
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/util/ReificationAdapter.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/util/ReificationAdapter.java index d29158e..358cd3c 100644 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/util/ReificationAdapter.java +++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/util/ReificationAdapter.java
@@ -42,12 +42,12 @@ import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; import org.eclipse.papyrusrt.umlrt.uml.internal.impl.InternalUMLRTElement; import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.ExtElement; +import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.impl.UMLRTUMLPlugin; import org.eclipse.papyrusrt.umlrt.uml.internal.umlext.util.ExtensionResource; import org.eclipse.papyrusrt.umlrt.uml.util.ReificationListener; import org.eclipse.papyrusrt.umlrt.uml.util.UMLRTResourcesUtil; import org.eclipse.uml2.uml.NamedElement; import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.UMLPlugin; /** * An adapter that detects changes to an implicit element and automatically @@ -292,8 +292,7 @@ try { l.reificationStateChanged(facade, reified); } catch (Exception e) { - // TODO: Need our own EMFPlugin? - UMLPlugin.INSTANCE.log(e); + UMLRTUMLPlugin.INSTANCE.log(e); } }); }
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTSwitch.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTSwitch.java deleted file mode 100644 index ba641c9..0000000 --- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/util/UMLRTSwitch.java +++ /dev/null
@@ -1,150 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2016 Christian W. Damus and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christian W. Damus - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrusrt.umlrt.uml.util; - -import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsule; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTCapsulePart; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTClassifier; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTConnector; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTModel; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTNamedElement; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTPackage; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTPort; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocol; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTProtocolMessage; -import org.eclipse.papyrusrt.umlrt.uml.UMLRTReplicatedElement; - -/** - * An EMF-style switch pattern on the types of UML-RT Façade objects. - */ -public class UMLRTSwitch<T> { - - /** - * Initializes me. - */ - public UMLRTSwitch() { - super(); - } - - /** - * Performs a switch on the type of the {@code object}, with preference - * to more specific types in the hierarchy. - * - * @param object - * an object to switch on - * - * @return the result of the most specific case that provides one, or else {@code null} - */ - public T doSwitch(Object object) { - T result = null; - - if ((result == null) && (object instanceof UMLRTPort)) { - result = casePort((UMLRTPort) object); - } - - if ((result == null) && (object instanceof UMLRTCapsulePart)) { - result = caseCapsulePart((UMLRTCapsulePart) object); - } - - if ((result == null) && (object instanceof UMLRTReplicatedElement)) { - result = caseReplicatedElement((UMLRTReplicatedElement) object); - } - - if ((result == null) && (object instanceof UMLRTConnector)) { - result = caseConnector((UMLRTConnector) object); - } - - if ((result == null) && (object instanceof UMLRTCapsule)) { - result = caseCapsule((UMLRTCapsule) object); - } - - if ((result == null) && (object instanceof UMLRTProtocol)) { - result = caseProtocol((UMLRTProtocol) object); - } - - if ((result == null) && (object instanceof UMLRTClassifier)) { - result = caseClassifier((UMLRTClassifier) object); - } - - if ((result == null) && (object instanceof UMLRTProtocolMessage)) { - result = caseProtocolMessage((UMLRTProtocolMessage) object); - } - - if ((result == null) && (object instanceof UMLRTPackage)) { - result = casePackage((UMLRTPackage) object); - } - - if ((result == null) && (object instanceof UMLRTNamedElement)) { - result = caseNamedElement((UMLRTNamedElement) object); - } - - if ((result == null) && (object instanceof UMLRTModel)) { - result = caseModel((UMLRTModel) object); - } - - if (result == null) { - result = defaultCase(object); - } - - return result; - } - - public T defaultCase(Object object) { - return null; - } - - public T caseNamedElement(UMLRTNamedElement object) { - return null; - } - - public T caseReplicatedElement(UMLRTReplicatedElement object) { - return null; - } - - public T caseClassifier(UMLRTClassifier object) { - return null; - } - - public T caseCapsule(UMLRTCapsule object) { - return null; - } - - public T caseCapsulePart(UMLRTCapsulePart object) { - return null; - } - - public T caseConnector(UMLRTConnector object) { - return null; - } - - public T casePort(UMLRTPort object) { - return null; - } - - public T caseProtocol(UMLRTProtocol object) { - return null; - } - - public T caseProtocolMessage(UMLRTProtocolMessage object) { - return null; - } - - public T casePackage(UMLRTPackage object) { - return null; - } - - public T caseModel(UMLRTModel object) { - return null; - } -}
diff --git a/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/edition/ExclusionCommandTest.java b/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/edition/ExclusionCommandTest.java index d6b79e7..3a188e0 100644 --- a/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/edition/ExclusionCommandTest.java +++ b/tests/junit/umlrt/core/org.eclipse.papyrusrt.umlrt.core.tests/src/org/eclipse/papyrusrt/umlrt/core/tests/edition/ExclusionCommandTest.java
@@ -142,7 +142,7 @@ assumeThat(Arrays.asList(source, target), everyItem(isExcluded())); - reinheritConnector(); + reinherit(connector); assertThat(connector, notExcluded()); assertThat(source, notExcluded()); // This is required
diff --git a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/BasicExclusionTest.java b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/BasicExclusionTest.java index 07b4815..7a66355 100644 --- a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/BasicExclusionTest.java +++ b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/BasicExclusionTest.java
@@ -149,8 +149,8 @@ assertThat(subsubcapsule.getExcludedElement("protocol1", UMLRTPort.class), is(subsubPort)); // But, they are still there - assertThat(subcapsule.getPort(rootPort.getName()), is(subPort)); - assertThat(subsubcapsule.getPort(rootPort.getName()), is(subsubPort)); + assertThat(subcapsule.getExcludedElement(rootPort.getName()), is(subPort)); + assertThat(subsubcapsule.getExcludedElement(rootPort.getName()), is(subsubPort)); } @Test
diff --git a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/InheritanceKindTest.java b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/InheritanceKindTest.java index 7e4ad31..23ff42b 100644 --- a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/InheritanceKindTest.java +++ b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/InheritanceKindTest.java
@@ -114,7 +114,7 @@ /** An excluded element. */ static UMLRTNamedElement excluded() { - return getCapsule().getConnector("connector1"); + return getCapsule().getExcludedElement("connector1"); } /** A redefined element. */
diff --git a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/util/ModelFixture.java b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/util/ModelFixture.java index 01f1bc4..726a21d 100644 --- a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/util/ModelFixture.java +++ b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/tests/util/ModelFixture.java
@@ -304,7 +304,7 @@ void assertNoFacades() { try { Class<? extends Adapter> facadeAdapterType = Class.forName( - "org.eclipse.papyrusrt.umlrt.uml.FacadeObject$BasicFacadeAdapter") //$NON-NLS-1$ + "org.eclipse.papyrusrt.umlrt.uml.internal.facade.impl.FacadeObjectImpl$BasicFacadeAdapter") //$NON-NLS-1$ .asSubclass(Adapter.class); EcoreUtil.getAllContents(modelResources()).forEachRemaining(next -> { if (next instanceof EObject) {
diff --git a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/util/tests/UMLRTSwitchTest.java b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/util/tests/UMLRTSwitchTest.java index 4bb9707..396e5dd 100644 --- a/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/util/tests/UMLRTSwitchTest.java +++ b/tests/junit/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml.tests/src/org/eclipse/papyrusrt/umlrt/uml/util/tests/UMLRTSwitchTest.java
@@ -334,7 +334,7 @@ assertThat(fixture.doSwitch(garbage), is("ok")); - assertThat(fixture.doSwitch(null), is("ok")); // As in EMF + assertThat(fixture.doSwitch((Object) null), is("ok")); // As in EMF } @Test