org.eclipse.uml2.uml
Interface Gate

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, MessageEnd, NamedElement, org.eclipse.emf.common.notify.Notifier

public interface Gate
extends MessageEnd

A representation of the model object 'Gate'. A Gate is a MessageEnd which serves as a connection point for relating a Message which has a MessageEnd (sendEvent / receiveEvent) outside an InteractionFragment with another Message which has a MessageEnd (receiveEvent / sendEvent) inside that InteractionFragment.

From package UML::Interactions.

See Also:
UMLPackage.getGate()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 InteractionOperand getOperand()
          If the Gate is an inside Combined Fragment Gate, this operation returns the InteractionOperand that the opposite end of this Gate is included within.
 boolean isActual()
          This query returns true value if this Gate is an actualGate of an InteractionUse.
 boolean isFormal()
          This query returns true if this Gate is a formalGate of an Interaction.
 boolean isInsideCF()
          This query returns true if this Gate is attached to the boundary of a CombinedFragment, and its other end (if present) is inside of an InteractionOperator of the same CombinedFragment.
 boolean isOutsideCF()
          This query returns true if this Gate is attached to the boundary of a CombinedFragment, and its other end (if present) is outside of the same CombinedFragment.
 boolean matches(Gate gateToMatch)
          This query returns true if the name of this Gate matches the name of the in parameter Gate, and the messages for the two Gates correspond.
 boolean validateActualGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          isActual() implies that no other actualGate of the parent InteractionUse returns the same getName() as returned for self isActual() implies interactionUse.actualGate->select(getName() = self.getName())->size()=1
 boolean validateActualGateMatched(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If this Gate is an actualGate, it must have exactly one matching formalGate within the referred Interaction.
 boolean validateFormalGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          isFormal() implies that no other formalGate of the parent Interaction returns the same getName() as returned for self isFormal() implies interaction.formalGate->select(getName() = self.getName())->size()=1
 boolean validateInsideCfGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          isInsideCF() implies that no other inside cfragmentGate attached to a message with its other end in the same InteractionOperator as self, returns the same getName() as returned for self isInsideCF() implies let selfOperand : InteractionOperand = self.getOperand() in combinedFragment.cfragmentGate->select(isInsideCF() and getName() = self.getName())->select(getOperand() = selfOperand)->size()=1
 boolean validateInsideCfMatched(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If this Gate is inside a CombinedFragment, it must have exactly one matching Gate which is outside of that CombinedFragment.
 boolean validateOutsideCfGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          isOutsideCF() implies that no other outside cfragmentGate of the parent CombinedFragment returns the same getName() as returned for self isOutsideCF() implies combinedFragment.cfragmentGate->select(getName() = self.getName())->size()=1
 boolean validateOutsideCfMatched(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If this Gate is outside an 'alt' CombinedFragment, for every InteractionOperator inside that CombinedFragment there must be exactly one matching Gate inside the CombindedFragment with its opposing end enclosed by that InteractionOperator.
 
Methods inherited from interface org.eclipse.uml2.uml.MessageEnd
enclosingFragment, getMessage, isReceive, isSend, oppositeEnd, setMessage
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

validateActualGateMatched

boolean validateActualGateMatched(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
If this Gate is an actualGate, it must have exactly one matching formalGate within the referred Interaction. interactionUse->notEmpty() implies interactionUse.refersTo.formalGate->select(matches(self))->size()=1

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateInsideCfMatched

boolean validateInsideCfMatched(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)
If this Gate is inside a CombinedFragment, it must have exactly one matching Gate which is outside of that CombinedFragment. isInsideCF() implies combinedFragment.cfragmentGate->select(isOutsideCF() and matches(self))->size()=1

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateOutsideCfMatched

boolean validateOutsideCfMatched(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)
If this Gate is outside an 'alt' CombinedFragment, for every InteractionOperator inside that CombinedFragment there must be exactly one matching Gate inside the CombindedFragment with its opposing end enclosed by that InteractionOperator. If this Gate is outside CombinedFragment with operator other than 'alt', there must be exactly one matching Gate inside that CombinedFragment. isOutsideCF() implies if self.combinedFragment.interactionOperator->asOrderedSet()->first() = InteractionOperatorKind::alt then self.combinedFragment.operand->forAll(op : InteractionOperand | self.combinedFragment.cfragmentGate->select(isInsideCF() and oppositeEnd().enclosingFragment()->includes(self.combinedFragment) and matches(self))->size()=1) else self.combinedFragment.cfragmentGate->select(isInsideCF() and matches(self))->size()=1 endif

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateFormalGateDistinguishable

boolean validateFormalGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)
isFormal() implies that no other formalGate of the parent Interaction returns the same getName() as returned for self isFormal() implies interaction.formalGate->select(getName() = self.getName())->size()=1

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateActualGateDistinguishable

boolean validateActualGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)
isActual() implies that no other actualGate of the parent InteractionUse returns the same getName() as returned for self isActual() implies interactionUse.actualGate->select(getName() = self.getName())->size()=1

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateOutsideCfGateDistinguishable

boolean validateOutsideCfGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                             java.util.Map<java.lang.Object,java.lang.Object> context)
isOutsideCF() implies that no other outside cfragmentGate of the parent CombinedFragment returns the same getName() as returned for self isOutsideCF() implies combinedFragment.cfragmentGate->select(getName() = self.getName())->size()=1

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateInsideCfGateDistinguishable

boolean validateInsideCfGateDistinguishable(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                            java.util.Map<java.lang.Object,java.lang.Object> context)
isInsideCF() implies that no other inside cfragmentGate attached to a message with its other end in the same InteractionOperator as self, returns the same getName() as returned for self isInsideCF() implies let selfOperand : InteractionOperand = self.getOperand() in combinedFragment.cfragmentGate->select(isInsideCF() and getName() = self.getName())->select(getOperand() = selfOperand)->size()=1

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

isOutsideCF

boolean isOutsideCF()
This query returns true if this Gate is attached to the boundary of a CombinedFragment, and its other end (if present) is outside of the same CombinedFragment. result = (self.oppositeEnd()-> notEmpty() and combinedFragment->notEmpty() implies let oppEnd : MessageEnd = self.oppositeEnd()->asOrderedSet()->first() in if oppEnd.oclIsKindOf(MessageOccurrenceSpecification) then let oppMOS : MessageOccurrenceSpecification = oppEnd.oclAsType(MessageOccurrenceSpecification) in self.combinedFragment.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(self.combinedFragment.enclosingOperand.oclAsType(InteractionFragment)->asSet()) = oppMOS.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(oppMOS.enclosingOperand.oclAsType(InteractionFragment)->asSet()) else let oppGate : Gate = oppEnd.oclAsType(Gate) in self.combinedFragment.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(self.combinedFragment.enclosingOperand.oclAsType(InteractionFragment)->asSet()) = oppGate.combinedFragment.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(oppGate.combinedFragment.enclosingOperand.oclAsType(InteractionFragment)->asSet()) endif)

From package UML::Interactions.


isInsideCF

boolean isInsideCF()
This query returns true if this Gate is attached to the boundary of a CombinedFragment, and its other end (if present) is inside of an InteractionOperator of the same CombinedFragment. result = (self.oppositeEnd()-> notEmpty() and combinedFragment->notEmpty() implies let oppEnd : MessageEnd = self.oppositeEnd()->asOrderedSet()->first() in if oppEnd.oclIsKindOf(MessageOccurrenceSpecification) then let oppMOS : MessageOccurrenceSpecification = oppEnd.oclAsType(MessageOccurrenceSpecification) in combinedFragment = oppMOS.enclosingOperand.combinedFragment else let oppGate : Gate = oppEnd.oclAsType(Gate) in combinedFragment = oppGate.combinedFragment.enclosingOperand.combinedFragment endif)

From package UML::Interactions.


isActual

boolean isActual()
This query returns true value if this Gate is an actualGate of an InteractionUse. result = (interactionUse->notEmpty())

From package UML::Interactions.


isFormal

boolean isFormal()
This query returns true if this Gate is a formalGate of an Interaction. result = (interaction->notEmpty())

From package UML::Interactions.


matches

boolean matches(Gate gateToMatch)
This query returns true if the name of this Gate matches the name of the in parameter Gate, and the messages for the two Gates correspond. The Message for one Gate (say A) corresponds to the Message for another Gate (say B) if (A and B have the same name value) and (if A is a sendEvent then B is a receiveEvent) and (if A is a receiveEvent then B is a sendEvent) and (A and B have the same messageSort value) and (A and B have the same signature value). result = (self.getName() = gateToMatch.getName() and self.message.messageSort = gateToMatch.message.messageSort and self.message.name = gateToMatch.message.name and self.message.sendEvent->includes(self) implies gateToMatch.message.receiveEvent->includes(gateToMatch) and self.message.receiveEvent->includes(self) implies gateToMatch.message.sendEvent->includes(gateToMatch) and self.message.signature = gateToMatch.message.signature)

From package UML::Interactions.


getOperand

InteractionOperand getOperand()
If the Gate is an inside Combined Fragment Gate, this operation returns the InteractionOperand that the opposite end of this Gate is included within. result = (if isInsideCF() then let oppEnd : MessageEnd = self.oppositeEnd()->asOrderedSet()->first() in if oppEnd.oclIsKindOf(MessageOccurrenceSpecification) then let oppMOS : MessageOccurrenceSpecification = oppEnd.oclAsType(MessageOccurrenceSpecification) in oppMOS.enclosingOperand->asOrderedSet()->first() else let oppGate : Gate = oppEnd.oclAsType(Gate) in oppGate.combinedFragment.enclosingOperand->asOrderedSet()->first() endif else null endif)

From package UML::Interactions.


Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.