Table of Contents

Class Transition

Namespace
NMF.Interop.Uml
Assembly
NMF.UMLInterop.dll

A Transition represents an arc between exactly one source Vertex and exactly one Target vertex (the source and targets may be the same Vertex). It may form part of a compound transition, which takes the StateMachine from one steady State configuration to another, representing the full response of the StateMachine to an occurrence of an Event that triggered it. <p>From package UML::StateMachines.</p>

[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Transition")]
public class Transition : RedefinableElement, ITransition, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
Transition
Implements
Inherited Members

Constructors

Transition()

Creates a new instance

public Transition()

Properties

Children

Gets the child model elements of this model element

public override IEnumerableExpression<IModelElement> Children { get; }

Property Value

IEnumerableExpression<IModelElement>

ClassInstance

Gets the Class model for this type

public static IClass ClassInstance { get; }

Property Value

IClass

Container

Designates the Region that owns this Transition. <p>From package UML::StateMachines.</p>

[Browsable(false)]
[XmlElementName("container")]
[XmlAttribute(true)]
[XmlOpposite("transition")]
public IRegion Container { get; set; }

Property Value

IRegion

Effect

Specifies an optional behavior to be performed when the Transition fires. <p>From package UML::StateMachines.</p>

[Browsable(false)]
[XmlElementName("effect")]
[XmlAttribute(false)]
[Containment]
public IBehavior Effect { get; set; }

Property Value

IBehavior

ElementImport

References the ElementImports owned by the Namespace. <p>From package UML::CommonStructure.</p>

[Browsable(false)]
[XmlElementName("elementImport")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("importingNamespace")]
public IListExpression<IElementImport> ElementImport { get; }

Property Value

IListExpression<IElementImport>

Guard

A guard is a Constraint that provides a fine-grained control over the firing of the Transition. The guard is evaluated when an Event occurrence is dispatched by the StateMachine. If the guard is true at that time, the Transition may be enabled, otherwise, it is disabled. Guards should be pure expressions without side effects. Guard expressions with side effects are ill formed. <p>From package UML::StateMachines.</p>

[Browsable(false)]
[XmlElementName("guard")]
[XmlAttribute(false)]
[Containment]
public IConstraint Guard { get; set; }

Property Value

IConstraint

Kind

Indicates the precise type of the Transition. <p>From package UML::StateMachines.</p>

[XmlElementName("kind")]
[XmlAttribute(true)]
public TransitionKind Kind { get; set; }

Property Value

TransitionKind

PackageImport

References the PackageImports owned by the Namespace. <p>From package UML::CommonStructure.</p>

[Browsable(false)]
[XmlElementName("packageImport")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("importingNamespace")]
public IListExpression<IPackageImport> PackageImport { get; }

Property Value

IListExpression<IPackageImport>

RedefinedTransition

The Transition that is redefined by this Transition. <p>From package UML::StateMachines.</p>

[XmlElementName("redefinedTransition")]
[XmlAttribute(true)]
public ITransition RedefinedTransition { get; set; }

Property Value

ITransition

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Source

Designates the originating Vertex (State or Pseudostate) of the Transition. <p>From package UML::StateMachines.</p>

[XmlElementName("source")]
[XmlAttribute(true)]
public IVertex Source { get; set; }

Property Value

IVertex

Target

Designates the target Vertex that is reached when the Transition is taken. <p>From package UML::StateMachines.</p>

[XmlElementName("target")]
[XmlAttribute(true)]
public IVertex Target { get; set; }

Property Value

IVertex

Trigger

Specifies the Triggers that may fire the transition. <p>From package UML::StateMachines.</p>

[Browsable(false)]
[XmlElementName("trigger")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<ITrigger> Trigger { get; }

Property Value

IOrderedSetExpression<ITrigger>

Methods

Cannot_import_ownedMembers(object, object)

A Namespace cannot have an ElementImport to one of its ownedMembers. elementImport.importedElement.oclAsType(Element)->excludesAll(ownedMember)

public bool Cannot_import_ownedMembers(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Cannot_import_self(object, object)

A Namespace cannot have a PackageImport to itself. packageImport.importedPackage.oclAsType(Namespace)->excludes(self)

public bool Cannot_import_self(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

ContainingStateMachine()

The query containingStateMachine() returns the StateMachine that contains the Transition either directly or transitively. result = (container.containingStateMachine()) <p>From package UML::StateMachines.</p>

public IStateMachine ContainingStateMachine()

Returns

IStateMachine

CreateElementImport(IPackageableElement, VisibilityKind)

Creates an import of the specified element into this namespace with the specified visibility.

public IElementImport CreateElementImport(IPackageableElement element, VisibilityKind visibility)

Parameters

element IPackageableElement

The element to import.

visibility VisibilityKind

The visibility for the new element import.

Returns

IElementImport

CreatePackageImport(IPackage, VisibilityKind)

Creates an import of the specified package into this namespace with the specified visibility.

public IPackageImport CreatePackageImport(IPackage package_, VisibilityKind visibility)

Parameters

package_ IPackage

The package to import.

visibility VisibilityKind

The visibility for the new package import.

Returns

IPackageImport

ExcludeCollisions(IEnumerable<IPackageableElement>)

The query excludeCollisions() excludes from a set of PackageableElements any that would not be distinguishable from each other in this Namespace. result = (imps->reject(imp1 | imps->exists(imp2 | not imp1.isDistinguishableFrom(imp2, self)))) <p>From package UML::CommonStructure.</p>

public ISetExpression<IPackageableElement> ExcludeCollisions(IEnumerable<IPackageableElement> imps)

Parameters

imps IEnumerable<IPackageableElement>

Returns

ISetExpression<IPackageableElement>

Fork_segment_guards(object, object)

A fork segment must not have Guards or Triggers. (source.oclIsKindOf(Pseudostate) and source.oclAsType(Pseudostate).kind = PseudostateKind::fork) implies (guard = null and trigger->isEmpty())

public bool Fork_segment_guards(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Fork_segment_state(object, object)

A fork segment must always target a State. (source.oclIsKindOf(Pseudostate) and source.oclAsType(Pseudostate).kind = PseudostateKind::fork) implies (target.oclIsKindOf(State))

public bool Fork_segment_state(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

GetAttributeValue(string, int)

Resolves the given attribute name

protected override object GetAttributeValue(string attribute, int index)

Parameters

attribute string

The requested attribute name

index int

The index of this attribute

Returns

object

The attribute value or null if it could not be found

GetClass()

Gets the Class for this model element

public override IClass GetClass()

Returns

IClass

GetCollectionForFeature(string)

Gets the Model element collection for the given feature

protected override IList GetCollectionForFeature(string feature)

Parameters

feature string

The requested feature

Returns

IList

A non-generic list of elements

GetCompositionName(object)

Gets the property name for the given container

protected override string GetCompositionName(object container)

Parameters

container object

The container object

Returns

string

The name of the respective container reference

GetExpressionForAttribute(string)

Gets the property expression for the given attribute

protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)

Parameters

attribute string

The requested attribute in upper case

Returns

INotifyExpression<object>

An incremental property expression

GetExpressionForReference(string)

Gets the property expression for the given reference

protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)

Parameters

reference string

The requested reference in upper case

Returns

INotifyExpression<IModelElement>

An incremental property expression

GetImportedElements()

Retrieves the elements imported by this namespace.

public ISetExpression<IPackageableElement> GetImportedElements()

Returns

ISetExpression<IPackageableElement>

GetImportedMembers()

The importedMember property is derived as the PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports. result = (self.importMembers(elementImport.importedElement->asSet()->union(packageImport.importedPackage->collect(p | p.visibleMembers()))->asSet())) <p>From package UML::CommonStructure.</p>

public ISetExpression<IPackageableElement> GetImportedMembers()

Returns

ISetExpression<IPackageableElement>

GetImportedPackages()

Retrieves the packages imported by this namespace.

public ISetExpression<IPackage> GetImportedPackages()

Returns

ISetExpression<IPackage>

GetModelElementForReference(string, int)

Resolves the given URI to a child model element

protected override IModelElement GetModelElementForReference(string reference, int index)

Parameters

reference string

The requested reference name

index int

The index of this reference

Returns

IModelElement

The model element or null if it could not be found

GetNamesOfMember(INamedElement)

The query getNamesOfMember() gives a set of all of the names that a member would have in a Namespace, taking importing into account. In general a member can have multiple names in a Namespace if it is imported more than once with different aliases. result = (if self.ownedMember ->includes(element) then Set{element.name} else let elementImports : Set(ElementImport) = self.elementImport->select(ei | ei.importedElement = element) in if elementImports->notEmpty() then elementImports->collect(el | el.getName())->asSet() else self.packageImport->select(pi | pi.importedPackage.visibleMembers().oclAsType(NamedElement)->includes(element))-> collect(pi | pi.importedPackage.getNamesOfMember(element))->asSet() endif endif) <p>From package UML::CommonStructure.</p>

public ISetExpression<string> GetNamesOfMember(INamedElement element)

Parameters

element INamedElement

Returns

ISetExpression<string>

GetOwnedMembers()

public ISetExpression<INamedElement> GetOwnedMembers()

Returns

ISetExpression<INamedElement>

GetRelativePathForNonIdentifiedChild(IModelElement)

Gets the relative URI fragment for the given child model element

protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)

Parameters

element IModelElement

The element that should be looked for

Returns

string

A fragment of the relative URI

ImportMembers(IEnumerable<IPackageableElement>)

The query importMembers() defines which of a set of PackageableElements are actually imported into the Namespace. This excludes hidden ones, i.e., those which have names that conflict with names of ownedMembers, and it also excludes PackageableElements that would have the indistinguishable names when imported. result = (self.excludeCollisions(imps)->select(imp | self.ownedMember->forAll(mem | imp.isDistinguishableFrom(mem, self)))) <p>From package UML::CommonStructure.</p>

public ISetExpression<IPackageableElement> ImportMembers(IEnumerable<IPackageableElement> imps)

Parameters

imps IEnumerable<IPackageableElement>

Returns

ISetExpression<IPackageableElement>

Initial_transition(object, object)

An initial Transition at the topmost level Region of a StateMachine that has no Trigger. (source.oclIsKindOf(Pseudostate) and container.stateMachine->notEmpty()) implies trigger->isEmpty()

public bool Initial_transition(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Join_segment_guards(object, object)

A join segment must not have Guards or Triggers. (target.oclIsKindOf(Pseudostate) and target.oclAsType(Pseudostate).kind = PseudostateKind::join) implies (guard = null and trigger->isEmpty())

public bool Join_segment_guards(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Join_segment_state(object, object)

A join segment must always originate from a State. (target.oclIsKindOf(Pseudostate) and target.oclAsType(Pseudostate).kind = PseudostateKind::join) implies (source.oclIsKindOf(State))

public bool Join_segment_state(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

MembersAreDistinguishable()

The Boolean query membersAreDistinguishable() determines whether all of the Namespace's members are distinguishable within it. result = (member->forAll( memb | member->excluding(memb)->forAll(other | memb.isDistinguishableFrom(other, self)))) <p>From package UML::CommonStructure.</p>

public bool MembersAreDistinguishable()

Returns

bool

Members_distinguishable(object, object)

All the members of a Namespace are distinguishable within it. membersAreDistinguishable()

public bool Members_distinguishable(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

OnParentChanged(IModelElement, IModelElement)

Gets called when the parent model element of the current model element changes

protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent)

Parameters

newParent IModelElement

The new parent model element

oldParent IModelElement

The old parent model element

OnParentChanging(IModelElement, IModelElement)

Gets called when the parent model element of the current model element is about to change

protected override void OnParentChanging(IModelElement newParent, IModelElement oldParent)

Parameters

newParent IModelElement

The new parent model element

oldParent IModelElement

The old parent model element

Outgoing_pseudostates(object, object)

Transitions outgoing Pseudostates may not have a Trigger. source.oclIsKindOf(Pseudostate) and (source.oclAsType(Pseudostate).kind <> PseudostateKind::initial) implies trigger->isEmpty()

public bool Outgoing_pseudostates(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

SetFeature(string, object)

Sets a value to the given feature

protected override void SetFeature(string feature, object value)

Parameters

feature string

The requested feature

value object

The value that should be set to that feature

State_is_external(object, object)

A Transition with kind external can source any Vertex except entry points. (kind = TransitionKind::external) implies not (source.oclIsKindOf(Pseudostate) and source.oclAsType(Pseudostate).kind = PseudostateKind::entryPoint)

public bool State_is_external(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

State_is_internal(object, object)

A Transition with kind internal must have a State as its source, and its source and target must be equal. (kind = TransitionKind::internal) implies (source.oclIsKindOf (State) and source = target)

public bool State_is_internal(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

State_is_local(object, object)

A Transition with kind local must have a composite State or an entry point as its source. (kind = TransitionKind::local) implies ((source.oclIsKindOf (State) and source.oclAsType(State).isComposite) or (source.oclIsKindOf (Pseudostate) and source.oclAsType(Pseudostate).kind = PseudostateKind::entryPoint))

public bool State_is_local(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool