org.eclipse.uml2.uml
Interface Lifeline

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

public interface Lifeline
extends NamedElement

A representation of the model object 'Lifeline'. A Lifeline represents an individual participant in the Interaction. While parts and structural features may have multiplicity greater than 1, Lifelines represent only one interacting entity.

From package UML::Interactions.

The following features are supported:

See Also:
UMLPackage.getLifeline()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 ValueSpecification createSelector(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Selector' containment reference
 InteractionFragment getCoveredBy(java.lang.String name)
          Retrieves the first InteractionFragment with the specified 'Name' from the 'Covered By' reference list
 InteractionFragment getCoveredBy(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first InteractionFragment with the specified 'Name' from the 'Covered By' reference list
 org.eclipse.emf.common.util.EList<InteractionFragment> getCoveredBys()
          Returns the value of the 'Covered By' reference list.
 PartDecomposition getDecomposedAs()
          Returns the value of the 'Decomposed As' reference
 Interaction getInteraction()
          Returns the value of the 'Interaction' container reference.
 ConnectableElement getRepresents()
          Returns the value of the 'Represents' reference
 ValueSpecification getSelector()
          Returns the value of the 'Selector' containment reference.
 void setDecomposedAs(PartDecomposition value)
          Sets the value of the 'Decomposed As' reference
 void setInteraction(Interaction value)
          Sets the value of the 'Interaction' container reference
 void setRepresents(ConnectableElement value)
          Sets the value of the 'Represents' reference
 void setSelector(ValueSpecification value)
          Sets the value of the 'Selector' containment reference
 boolean validateInteractionUsesShareLifeline(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If a lifeline is in an Interaction referred to by an InteractionUse in an enclosing Interaction, and that lifeline is common with another lifeline in an Interaction referred to by another InteractonUse within that same enclosing Interaction, it must be common to a lifeline within that enclosing Interaction.
 boolean validateSameClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The classifier containing the referenced ConnectableElement must be the same classifier, or an ancestor, of the classifier that contains the interaction enclosing this lifeline.
 boolean validateSelectorIntOrString(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The selector value, if present, must be a LiteralString or a LiteralInteger self.selector->notEmpty() implies self.selector.oclIsKindOf(LiteralInteger) or self.selector.oclIsKindOf(LiteralString)
 boolean validateSelectorSpecified(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The selector for a Lifeline must only be specified if the referenced Part is multivalued.
 
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

getRepresents

ConnectableElement getRepresents()
Returns the value of the 'Represents' reference. References the ConnectableElement within the classifier that contains the enclosing interaction.

From package UML::Interactions.

Returns:
the value of the 'Represents' reference.
See Also:
setRepresents(ConnectableElement), UMLPackage.getLifeline_Represents()

setRepresents

void setRepresents(ConnectableElement value)
Sets the value of the 'Represents' reference.

Parameters:
value - the new value of the 'Represents' reference.
See Also:
getRepresents()

getInteraction

Interaction getInteraction()
Returns the value of the 'Interaction' container reference. It is bidirectional and its opposite is 'Lifeline'.

This feature subsets the following features:

References the Interaction enclosing this Lifeline.

From package UML::Interactions.

Returns:
the value of the 'Interaction' container reference.
See Also:
setInteraction(Interaction), UMLPackage.getLifeline_Interaction(), Interaction.getLifelines()

setInteraction

void setInteraction(Interaction value)
Sets the value of the 'Interaction' container reference.

Parameters:
value - the new value of the 'Interaction' container reference.
See Also:
getInteraction()

getSelector

ValueSpecification getSelector()
Returns the value of the 'Selector' containment reference.

This feature subsets the following features:

If the referenced ConnectableElement is multivalued, then this specifies the specific individual part within that set.

From package UML::Interactions.

Returns:
the value of the 'Selector' containment reference.
See Also:
setSelector(ValueSpecification), UMLPackage.getLifeline_Selector()

setSelector

void setSelector(ValueSpecification value)
Sets the value of the 'Selector' containment reference.

Parameters:
value - the new value of the 'Selector' containment reference.
See Also:
getSelector()

createSelector

ValueSpecification createSelector(java.lang.String name,
                                  Type type,
                                  org.eclipse.emf.ecore.EClass eClass)
Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Selector' containment reference.

Parameters:
name - The 'Name' for the new ValueSpecification, or null.
type - The 'Type' for the new ValueSpecification, or null.
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getSelector()

getDecomposedAs

PartDecomposition getDecomposedAs()
Returns the value of the 'Decomposed As' reference. References the Interaction that represents the decomposition.

From package UML::Interactions.

Returns:
the value of the 'Decomposed As' reference.
See Also:
setDecomposedAs(PartDecomposition), UMLPackage.getLifeline_DecomposedAs()

setDecomposedAs

void setDecomposedAs(PartDecomposition value)
Sets the value of the 'Decomposed As' reference.

Parameters:
value - the new value of the 'Decomposed As' reference.
See Also:
getDecomposedAs()

getCoveredBys

org.eclipse.emf.common.util.EList<InteractionFragment> getCoveredBys()
Returns the value of the 'Covered By' reference list. The list contents are of type InteractionFragment. It is bidirectional and its opposite is 'Covered'. References the InteractionFragments in which this Lifeline takes part.

From package UML::Interactions.

Returns:
the value of the 'Covered By' reference list.
See Also:
UMLPackage.getLifeline_CoveredBy(), InteractionFragment.getCovereds()

getCoveredBy

InteractionFragment getCoveredBy(java.lang.String name)
Retrieves the first InteractionFragment with the specified 'Name' from the 'Covered By' reference list.

Parameters:
name - The 'Name' of the InteractionFragment to retrieve, or null.
Returns:
The first InteractionFragment with the specified 'Name', or null.
See Also:
getCoveredBys()

getCoveredBy

InteractionFragment getCoveredBy(java.lang.String name,
                                 boolean ignoreCase,
                                 org.eclipse.emf.ecore.EClass eClass)
Retrieves the first InteractionFragment with the specified 'Name' from the 'Covered By' reference list.

Parameters:
name - The 'Name' of the InteractionFragment to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the InteractionFragment to retrieve, or null.
Returns:
The first InteractionFragment with the specified 'Name', or null.
See Also:
getCoveredBys()

validateInteractionUsesShareLifeline

boolean validateInteractionUsesShareLifeline(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                             java.util.Map<java.lang.Object,java.lang.Object> context)
If a lifeline is in an Interaction referred to by an InteractionUse in an enclosing Interaction, and that lifeline is common with another lifeline in an Interaction referred to by another InteractonUse within that same enclosing Interaction, it must be common to a lifeline within that enclosing Interaction. By common Lifelines we mean Lifelines with the same selector and represents associations. let intUses : Set(InteractionUse) = interaction.interactionUse in intUses->forAll ( iuse : InteractionUse | let usingInteraction : Set(Interaction) = iuse.enclosingInteraction->asSet() ->union( iuse.enclosingOperand.combinedFragment->asSet()->closure(enclosingOperand.combinedFragment).enclosingInteraction->asSet() ) in let peerUses : Set(InteractionUse) = usingInteraction.fragment->select(oclIsKindOf(InteractionUse)).oclAsType(InteractionUse)->asSet() ->union( usingInteraction.fragment->select(oclIsKindOf(CombinedFragment)).oclAsType(CombinedFragment)->asSet() ->closure(operand.fragment->select(oclIsKindOf(CombinedFragment)).oclAsType(CombinedFragment)).operand.fragment-> select(oclIsKindOf(InteractionUse)).oclAsType(InteractionUse)->asSet() )->excluding(iuse) in peerUses->forAll( peerUse : InteractionUse | peerUse.refersTo.lifeline->forAll( l : Lifeline | (l.represents = self.represents and ( self.selector.oclIsKindOf(LiteralString) implies l.selector.oclIsKindOf(LiteralString) and self.selector.oclAsType(LiteralString).value = l.selector.oclAsType(LiteralString).value ) and ( self.selector.oclIsKindOf(LiteralInteger) implies l.selector.oclIsKindOf(LiteralInteger) and self.selector.oclAsType(LiteralInteger).value = l.selector.oclAsType(LiteralInteger).value ) ) implies usingInteraction.lifeline->exists(represents = self.represents and ( self.selector.oclIsKindOf(LiteralString) implies l.selector.oclIsKindOf(LiteralString) and self.selector.oclAsType(LiteralString).value = l.selector.oclAsType(LiteralString).value ) and ( self.selector.oclIsKindOf(LiteralInteger) implies l.selector.oclIsKindOf(LiteralInteger) and self.selector.oclAsType(LiteralInteger).value = l.selector.oclAsType(LiteralInteger).value ) ) ) ) )

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

validateSelectorSpecified

boolean validateSelectorSpecified(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
The selector for a Lifeline must only be specified if the referenced Part is multivalued. self.selector->notEmpty() = (self.represents.oclIsKindOf(MultiplicityElement) and self.represents.oclAsType(MultiplicityElement).isMultivalued())

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

validateSameClassifier

boolean validateSameClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)
The classifier containing the referenced ConnectableElement must be the same classifier, or an ancestor, of the classifier that contains the interaction enclosing this lifeline. represents.namespace->closure(namespace)->includes(interaction._'context')

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

validateSelectorIntOrString

boolean validateSelectorIntOrString(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)
The selector value, if present, must be a LiteralString or a LiteralInteger self.selector->notEmpty() implies self.selector.oclIsKindOf(LiteralInteger) or self.selector.oclIsKindOf(LiteralString)

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

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