Table of Contents

Class UseCase

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

A UseCase specifies a set of actions performed by its subjects, which yields an observable result that is of value for one or more Actors or other stakeholders of each subject. <p>From package UML::UseCases.</p>

[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//UseCase")]
public class UseCase : BehavioredClassifier, IUseCase, IBehavioredClassifier, IClassifier, ITemplateableElement, IType, IPackageableElement, IParameterableElement, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
UseCase
Implements
Inherited Members

Constructors

UseCase()

Creates a new instance

public UseCase()

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

Extend

The Extend relationships owned by this UseCase. <p>From package UML::UseCases.</p>

[Browsable(false)]
[XmlElementName("extend")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("extension")]
public IOrderedSetExpression<IExtend> Extend { get; }

Property Value

IOrderedSetExpression<IExtend>

ExtensionPoint

The ExtensionPoints owned by this UseCase. <p>From package UML::UseCases.</p>

[Browsable(false)]
[XmlElementName("extensionPoint")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("useCase")]
public IOrderedSetExpression<IExtensionPoint> ExtensionPoint { get; }

Property Value

IOrderedSetExpression<IExtensionPoint>

Include

The Include relationships owned by this UseCase. <p>From package UML::UseCases.</p>

[Browsable(false)]
[XmlElementName("include")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("includingCase")]
public IOrderedSetExpression<IInclude> Include { get; }

Property Value

IOrderedSetExpression<IInclude>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Subject

The subjects to which this UseCase applies. Each subject or its parts realize all the UseCases that apply to it. <p>From package UML::UseCases.</p>

[XmlElementName("subject")]
[XmlAttribute(true)]
[XmlOpposite("useCase")]
public ISetExpression<IClassifier> Subject { get; }

Property Value

ISetExpression<IClassifier>

Methods

AllIncludedUseCases()

The query allIncludedUseCases() returns the transitive closure of all UseCases (directly or indirectly) included by this UseCase. result = (self.include.addition->union(self.include.addition->collect(uc | uc.allIncludedUseCases()))->asSet()) <p>From package UML::UseCases.</p>

public ISetExpression<IUseCase> AllIncludedUseCases()

Returns

ISetExpression<IUseCase>

Binary_associations(object, object)

UseCases can only be involved in binary Associations. Association.allInstances()->forAll(a | a.memberEnd.type->includes(self) implies a.memberEnd->size() = 2)

public bool Binary_associations(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_include_self(object, object)

A UseCase cannot include UseCases that directly or indirectly include it. not allIncludedUseCases()->includes(self)

public bool Cannot_include_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

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

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

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

Must_have_name(object, object)

A UseCase must have a name. name -> notEmpty ()

public bool Must_have_name(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

No_association_to_use_case(object, object)

UseCases cannot have Associations to UseCases specifying the same subject. Association.allInstances()->forAll(a | a.memberEnd.type->includes(self) implies ( let usecases: Set(UseCase) = a.memberEnd.type->select(oclIsKindOf(UseCase))->collect(oclAsType(UseCase))->asSet() in usecases->size() > 1 implies usecases->collect(subject)->size() > 1 ) )

public bool No_association_to_use_case(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