Table of Contents

Class Association

Namespace
NMF.Interop.Cmof
Assembly
NMF.UMLInterop.dll

An association describes a set of tuples whose values refer to typed instances. An instance of an association is called a link.A link is a tuple with one value for each end of the association, where each value is an instance of the type of the end. An association describes a set of tuples whose values refer to typed instances. An instance of an association is called a link. A link is a tuple with one value for each end of the association, where each value is an instance of the type of the end.

[XmlNamespace("http://www.omg.org/spec/MOF/20131001/cmof.xmi")]
[XmlNamespacePrefix("cmof")]
[ModelRepresentationClass("http://www.omg.org/spec/MOF/20131001/cmof.xmi#//Association")]
public class Association : Classifier, IAssociation, IRelationship, IClassifier, IType, IPackageableElement, IRedefinableElement, INamespace, INamedElement, IElement, IObject, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
Association
Implements
Inherited Members

Constructors

Association()

Creates a new instance

public Association()

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

IsDerived

Specifies whether the association is derived from other model elements such as other associations or constraints.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isDerived")]
[XmlAttribute(true)]
public bool IsDerived { get; set; }

Property Value

bool

NavigableOwnedEnd

The navigable ends that are owned by the association itself.

[Browsable(false)]
[XmlElementName("navigableOwnedEnd")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IProperty> NavigableOwnedEnd { get; }

Property Value

IOrderedSetExpression<IProperty>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Methods

Association_ends(object, object)

Association ends of associations with more than two ends must be owned by the association. if memberEnd->size() > 2 then ownedEnd->includesAll(memberEnd)

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

Binary_associations(object, object)

Only binary associations can be aggregations. self.memberEnd->exists(aggregation <> Aggregation::none) implies self.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

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

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

OnAssociation_endsCalled(OperationCallEventArgs)

Raises the Association_endsCalled event

protected virtual void OnAssociation_endsCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnAssociation_endsCalling(OperationCallEventArgs)

Raises the Association_endsCalling event

protected virtual void OnAssociation_endsCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnBinary_associationsCalled(OperationCallEventArgs)

Raises the Binary_associationsCalled event

protected virtual void OnBinary_associationsCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnBinary_associationsCalling(OperationCallEventArgs)

Raises the Binary_associationsCalling event

protected virtual void OnBinary_associationsCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnIsDerivedChanged(ValueChangedEventArgs)

Raises the IsDerivedChanged event

protected virtual void OnIsDerivedChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnIsDerivedChanging(ValueChangedEventArgs)

Raises the IsDerivedChanging event

protected virtual void OnIsDerivedChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnSpecialized_end_numberCalled(OperationCallEventArgs)

Raises the Specialized_end_numberCalled event

protected virtual void OnSpecialized_end_numberCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnSpecialized_end_numberCalling(OperationCallEventArgs)

Raises the Specialized_end_numberCalling event

protected virtual void OnSpecialized_end_numberCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnSpecialized_end_typesCalled(OperationCallEventArgs)

Raises the Specialized_end_typesCalled event

protected virtual void OnSpecialized_end_typesCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnSpecialized_end_typesCalling(OperationCallEventArgs)

Raises the Specialized_end_typesCalling event

protected virtual void OnSpecialized_end_typesCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

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

Specialized_end_number(object, object)

An association specializing another association has the same number of ends as the other association. parents()->select(oclIsKindOf(Association)).oclAsType(Association)->forAll(p | p.memberEnd->size() = self.memberEnd->size())

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

Specialized_end_types(object, object)

When an association specializes another association, every end of the specific association corresponds to an end of the general association, and the specific end reaches the same type or a subtype of the more general end. Sequence{1..self.memberEnd->size()}-> forAll(i | self.general->select(oclIsKindOf(Association)).oclAsType(Association)-> forAll(ga |self.memberEnd->at(i).type.conformsTo(ga.memberEnd->at(i).type)))

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

Events

Association_endsCalled

Gets fired after the operation association_ends got called

public event EventHandler<OperationCallEventArgs> Association_endsCalled

Event Type

EventHandler<OperationCallEventArgs>

Association_endsCalling

Gets fired before the operation association_ends gets called

public event EventHandler<OperationCallEventArgs> Association_endsCalling

Event Type

EventHandler<OperationCallEventArgs>

Binary_associationsCalled

Gets fired after the operation binary_associations got called

public event EventHandler<OperationCallEventArgs> Binary_associationsCalled

Event Type

EventHandler<OperationCallEventArgs>

Binary_associationsCalling

Gets fired before the operation binary_associations gets called

public event EventHandler<OperationCallEventArgs> Binary_associationsCalling

Event Type

EventHandler<OperationCallEventArgs>

IsDerivedChanged

Gets fired when the IsDerived property changed its value

public event EventHandler<ValueChangedEventArgs> IsDerivedChanged

Event Type

EventHandler<ValueChangedEventArgs>

IsDerivedChanging

Gets fired before the IsDerived property changes its value

public event EventHandler<ValueChangedEventArgs> IsDerivedChanging

Event Type

EventHandler<ValueChangedEventArgs>

Specialized_end_numberCalled

Gets fired after the operation specialized_end_number got called

public event EventHandler<OperationCallEventArgs> Specialized_end_numberCalled

Event Type

EventHandler<OperationCallEventArgs>

Specialized_end_numberCalling

Gets fired before the operation specialized_end_number gets called

public event EventHandler<OperationCallEventArgs> Specialized_end_numberCalling

Event Type

EventHandler<OperationCallEventArgs>

Specialized_end_typesCalled

Gets fired after the operation specialized_end_types got called

public event EventHandler<OperationCallEventArgs> Specialized_end_typesCalled

Event Type

EventHandler<OperationCallEventArgs>

Specialized_end_typesCalling

Gets fired before the operation specialized_end_types gets called

public event EventHandler<OperationCallEventArgs> Specialized_end_typesCalling

Event Type

EventHandler<OperationCallEventArgs>