Class Association
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
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
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
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
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
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
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
featurestringThe 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
containerobjectThe 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
attributestringThe 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
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
elementIModelElementThe 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
eventArgsOperationCallEventArgsThe event data
OnAssociation_endsCalling(OperationCallEventArgs)
Raises the Association_endsCalling event
protected virtual void OnAssociation_endsCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnBinary_associationsCalled(OperationCallEventArgs)
Raises the Binary_associationsCalled event
protected virtual void OnBinary_associationsCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnBinary_associationsCalling(OperationCallEventArgs)
Raises the Binary_associationsCalling event
protected virtual void OnBinary_associationsCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnIsDerivedChanged(ValueChangedEventArgs)
Raises the IsDerivedChanged event
protected virtual void OnIsDerivedChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnIsDerivedChanging(ValueChangedEventArgs)
Raises the IsDerivedChanging event
protected virtual void OnIsDerivedChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnSpecialized_end_numberCalled(OperationCallEventArgs)
Raises the Specialized_end_numberCalled event
protected virtual void OnSpecialized_end_numberCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSpecialized_end_numberCalling(OperationCallEventArgs)
Raises the Specialized_end_numberCalling event
protected virtual void OnSpecialized_end_numberCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSpecialized_end_typesCalled(OperationCallEventArgs)
Raises the Specialized_end_typesCalled event
protected virtual void OnSpecialized_end_typesCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSpecialized_end_typesCalling(OperationCallEventArgs)
Raises the Specialized_end_typesCalling event
protected virtual void OnSpecialized_end_typesCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)
Parameters
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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
Events
Association_endsCalled
Gets fired after the operation association_ends got called
public event EventHandler<OperationCallEventArgs> Association_endsCalled
Event Type
Association_endsCalling
Gets fired before the operation association_ends gets called
public event EventHandler<OperationCallEventArgs> Association_endsCalling
Event Type
Binary_associationsCalled
Gets fired after the operation binary_associations got called
public event EventHandler<OperationCallEventArgs> Binary_associationsCalled
Event Type
Binary_associationsCalling
Gets fired before the operation binary_associations gets called
public event EventHandler<OperationCallEventArgs> Binary_associationsCalling
Event Type
IsDerivedChanged
Gets fired when the IsDerived property changed its value
public event EventHandler<ValueChangedEventArgs> IsDerivedChanged
Event Type
IsDerivedChanging
Gets fired before the IsDerived property changes its value
public event EventHandler<ValueChangedEventArgs> IsDerivedChanging
Event Type
Specialized_end_numberCalled
Gets fired after the operation specialized_end_number got called
public event EventHandler<OperationCallEventArgs> Specialized_end_numberCalled
Event Type
Specialized_end_numberCalling
Gets fired before the operation specialized_end_number gets called
public event EventHandler<OperationCallEventArgs> Specialized_end_numberCalling
Event Type
Specialized_end_typesCalled
Gets fired after the operation specialized_end_types got called
public event EventHandler<OperationCallEventArgs> Specialized_end_typesCalled
Event Type
Specialized_end_typesCalling
Gets fired before the operation specialized_end_types gets called
public event EventHandler<OperationCallEventArgs> Specialized_end_typesCalling