All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.uml2.uml.Lifeline Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2005, 2014 IBM Corporation, CEA, 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:
 *   IBM - initial API and implementation
 *   Kenn Hussey (CEA) - 327039, 418466, 433194
 *   Christian W. Damus (CEA) - 251963
 *
 */
package org.eclipse.uml2.uml;

import java.util.Map;

import org.eclipse.emf.common.util.DiagnosticChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

/**
 * 
 * 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: *

    *
  • {@link org.eclipse.uml2.uml.Lifeline#getDecomposedAs Decomposed As}
  • *
  • {@link org.eclipse.uml2.uml.Lifeline#getInteraction Interaction}
  • *
  • {@link org.eclipse.uml2.uml.Lifeline#getRepresents Represents}
  • *
  • {@link org.eclipse.uml2.uml.Lifeline#getSelector Selector}
  • *
  • {@link org.eclipse.uml2.uml.Lifeline#getCoveredBys Covered By}
  • *
*

* * @see org.eclipse.uml2.uml.UMLPackage#getLifeline() * @model * @generated */ public interface Lifeline extends NamedElement { /** * Returns the value of the 'Represents' reference. * * * * References the ConnectableElement within the classifier that contains the enclosing interaction. *

From package UML::Interactions.

* * @return the value of the 'Represents' reference. * @see #setRepresents(ConnectableElement) * @see org.eclipse.uml2.uml.UMLPackage#getLifeline_Represents() * @model ordered="false" * @generated */ ConnectableElement getRepresents(); /** * Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#getRepresents Represents}' reference. * * * @param value the new value of the 'Represents' reference. * @see #getRepresents() * @generated */ void setRepresents(ConnectableElement value); /** * Returns the value of the 'Interaction' container reference. * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Interaction#getLifelines Lifeline}'. *

* This feature subsets the following features: *

    *
  • '{@link org.eclipse.uml2.uml.NamedElement#getNamespace() Namespace}'
  • *
*

* * * * References the Interaction enclosing this Lifeline. *

From package UML::Interactions.

* * @return the value of the 'Interaction' container reference. * @see #setInteraction(Interaction) * @see org.eclipse.uml2.uml.UMLPackage#getLifeline_Interaction() * @see org.eclipse.uml2.uml.Interaction#getLifelines * @model opposite="lifeline" required="true" transient="false" ordered="false" * @generated */ Interaction getInteraction(); /** * Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#getInteraction Interaction}' container reference. * * * @param value the new value of the 'Interaction' container reference. * @see #getInteraction() * @generated */ void setInteraction(Interaction value); /** * Returns the value of the 'Selector' containment reference. *

* This feature subsets the following features: *

    *
  • '{@link org.eclipse.uml2.uml.Element#getOwnedElements() Owned Element}'
  • *
*

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

From package UML::Interactions.

* * @return the value of the 'Selector' containment reference. * @see #setSelector(ValueSpecification) * @see org.eclipse.uml2.uml.UMLPackage#getLifeline_Selector() * @model containment="true" resolveProxies="true" ordered="false" * @generated */ ValueSpecification getSelector(); /** * Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#getSelector Selector}' containment reference. * * * @param value the new value of the 'Selector' containment reference. * @see #getSelector() * @generated */ void setSelector(ValueSpecification value); /** * Creates a new {@link org.eclipse.uml2.uml.ValueSpecification}, with the specified 'Name', and 'Type', and sets the 'Selector' containment reference. * * * @param name The 'Name' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or null. * @param type The 'Type' for the new {@link org.eclipse.uml2.uml.ValueSpecification}, or null. * @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.ValueSpecification} to create. * @return The new {@link org.eclipse.uml2.uml.ValueSpecification}. * @see #getSelector() * @generated */ ValueSpecification createSelector(String name, Type type, EClass eClass); /** * Returns the value of the 'Decomposed As' reference. * * * * References the Interaction that represents the decomposition. *

From package UML::Interactions.

* * @return the value of the 'Decomposed As' reference. * @see #setDecomposedAs(PartDecomposition) * @see org.eclipse.uml2.uml.UMLPackage#getLifeline_DecomposedAs() * @model ordered="false" * @generated */ PartDecomposition getDecomposedAs(); /** * Sets the value of the '{@link org.eclipse.uml2.uml.Lifeline#getDecomposedAs Decomposed As}' reference. * * * @param value the new value of the 'Decomposed As' reference. * @see #getDecomposedAs() * @generated */ void setDecomposedAs(PartDecomposition value); /** * Returns the value of the 'Covered By' reference list. * The list contents are of type {@link org.eclipse.uml2.uml.InteractionFragment}. * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.InteractionFragment#getCovereds Covered}'. * * * * References the InteractionFragments in which this Lifeline takes part. *

From package UML::Interactions.

* * @return the value of the 'Covered By' reference list. * @see org.eclipse.uml2.uml.UMLPackage#getLifeline_CoveredBy() * @see org.eclipse.uml2.uml.InteractionFragment#getCovereds * @model opposite="covered" ordered="false" * @generated */ EList getCoveredBys(); /** * Retrieves the first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified 'Name' from the 'Covered By' reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.InteractionFragment} to retrieve, or null. * @return The first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified 'Name', or null. * @see #getCoveredBys() * @generated */ InteractionFragment getCoveredBy(String name); /** * Retrieves the first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified 'Name' from the 'Covered By' reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.InteractionFragment} to retrieve, or null. * @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons. * @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.InteractionFragment} to retrieve, or null. * @return The first {@link org.eclipse.uml2.uml.InteractionFragment} with the specified 'Name', or null. * @see #getCoveredBys() * @generated */ InteractionFragment getCoveredBy(String name, boolean ignoreCase, EClass eClass); /** * * * * 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 ) * ) * ) * ) * ) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateInteractionUsesShareLifeline(DiagnosticChain diagnostics, Map 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()) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateSelectorSpecified(DiagnosticChain diagnostics, Map 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') * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateSameClassifier(DiagnosticChain diagnostics, Map 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) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateSelectorIntOrString(DiagnosticChain diagnostics, Map context); } // Lifeline




© 2015 - 2024 Weber Informatics LLC | Privacy Policy