Class Association
A link is a tuple of values that refer to typed objects. An Association classifies a set of links, each of which is an instance of the Association. Each value in the link refers to an instance of the type of the corresponding end of the Association. <p>From package UML::StructuredClassifiers.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Association")]
public class Association : Classifier, IAssociation, IRelationship, IClassifier, ITemplateableElement, IType, IPackageableElement, IParameterableElement, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Association
- Implements
- Derived
- 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. <p>From package UML::StructuredClassifiers.</p>
[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. <p>From package UML::StructuredClassifiers.</p>
[XmlElementName("navigableOwnedEnd")]
[XmlAttribute(true)]
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)
Ends of Associations with more than two ends must be owned by the Association itself. memberEnd->size() > 2 implies ownedEnd->includesAll(memberEnd)
public bool Association_ends(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Binary_associations(object, object)
Only binary Associations can be aggregations. memberEnd->exists(aggregation <> AggregationKind::none) implies (memberEnd->size() = 2 and memberEnd->exists(aggregation = AggregationKind::none))
public bool Binary_associations(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Ends_must_be_typed(object, object)
memberEnd->forAll(type->notEmpty())
public bool Ends_must_be_typed(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe 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
feature
stringThe requested feature
Returns
- IList
A non-generic list of elements
GetEndTypes()
endType is derived from the types of the member ends. result = (memberEnd->collect(type)->asSet()) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IType> GetEndTypes()
Returns
GetExpressionForAttribute(string)
Gets the property expression for the given attribute
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
attribute
stringThe 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
IsBinary()
Determines whether this association is a binary association, i.e. whether it has exactly two member ends.
public bool IsBinary()
Returns
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
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe 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 corresponding general end. Sequence{1..memberEnd->size()}-> forAll(i | 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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.