org.eclipse.uml2.uml
Interface Association

All Superinterfaces:
Classifier, Element, EModelElement, EObject, NamedElement, Namespace, Notifier, PackageableElement, ParameterableElement, RedefinableElement, Relationship, TemplateableElement, Type
All Known Subinterfaces:
AssociationClass, CommunicationPath, Extension

public interface Association
extends Classifier, Relationship

A representation of the model object 'Association'. An association describes a set of tuples whose values refer to typed instances. An instance of an association is called a link.

The following features are supported:

See Also:
UMLPackage.getAssociation()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 Property createNavigableOwnedEnd(String name, Type type)
          Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Navigable Owned End' reference list
 Property createNavigableOwnedEnd(String name, Type type, EClass eClass)
          Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Navigable Owned End' reference list
 Property createOwnedEnd(String name, Type type)
          Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Owned End' containment reference list
 Property createOwnedEnd(String name, Type type, EClass eClass)
          Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Owned End' containment reference list
 Type getEndType(String name)
          Retrieves the first Type with the specified 'Name' from the 'End Type' reference list
 Type getEndType(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first Type with the specified 'Name' from the 'End Type' reference list
 EList getEndTypes()
          Returns the value of the 'End Type' reference list.
 Property getMemberEnd(String name, Type type)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Member End' reference list
 Property getMemberEnd(String name, Type type, boolean ignoreCase, EClass eClass)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Member End' reference list
 EList getMemberEnds()
          Returns the value of the 'Member End' reference list.
 Property getNavigableOwnedEnd(String name, Type type)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Navigable Owned End' reference list
 Property getNavigableOwnedEnd(String name, Type type, boolean ignoreCase, EClass eClass, boolean createOnDemand)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Navigable Owned End' reference list
 EList getNavigableOwnedEnds()
          Returns the value of the 'Navigable Owned End' reference list.
 Property getOwnedEnd(String name, Type type)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned End' containment reference list
 Property getOwnedEnd(String name, Type type, boolean ignoreCase, EClass eClass, boolean createOnDemand)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned End' containment reference list
 EList getOwnedEnds()
          Returns the value of the 'Owned End' containment reference list.
 boolean isBinary()
           Determines whether this association is a binary association, i.e. whether it has exactly two member ends
 boolean isDerived()
          Returns the value of the 'Is Derived' attribute.
 void setIsDerived(boolean value)
          Sets the value of the 'Is Derived' attribute
 boolean validateAssociationEnds(DiagnosticChain diagnostics, Map context)
           Association ends of associations with more than two ends must be owned by the association.
 boolean validateBinaryAssociations(DiagnosticChain diagnostics, Map context)
           Only binary associations can be aggregations.
 boolean validateSpecializedEndNumber(DiagnosticChain diagnostics, Map context)
           An association specializing another association has the same number of ends as the other association.
 boolean validateSpecializedEndTypes(DiagnosticChain diagnostics, Map context)
           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.
 
Methods inherited from interface org.eclipse.uml2.uml.Classifier
allFeatures, allParents, conformsTo, createCollaborationUse, createGeneralization, createOwnedUseCase, createRepresentation, createSubstitution, getAllAttributes, getAllOperations, getAllUsedInterfaces, getAttribute, getAttribute, getAttributes, getCollaborationUse, getCollaborationUse, getCollaborationUses, getFeature, getFeature, getFeatures, getGeneral, getGeneral, getGeneralization, getGeneralization, getGeneralizations, getGenerals, getInheritedMember, getInheritedMember, getInheritedMembers, getOperation, getOperation, getOperations, getOwnedUseCase, getOwnedUseCase, getOwnedUseCases, getPowertypeExtent, getPowertypeExtent, getPowertypeExtents, getRedefinedClassifier, getRedefinedClassifier, getRedefinedClassifiers, getRepresentation, getSubstitution, getSubstitution, getSubstitutions, getUseCase, getUseCase, getUseCases, getUsedInterfaces, hasVisibilityOf, inherit, inheritableMembers, isAbstract, maySpecializeType, parents, setIsAbstract, setRepresentation, validateGeneralizationHierarchies, validateMapsToGeneralizationSet, validateNoCyclesInGeneralization, validateSpecializeType
 
Methods inherited from interface org.eclipse.uml2.uml.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.Type
conformsTo, createAssociation, getAssociations, getPackage, setPackage
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
 
Methods inherited from interface org.eclipse.uml2.uml.Relationship
getRelatedElements
 

Method Detail

isDerived

public boolean isDerived()
Returns the value of the 'Is Derived' attribute. The default value is "false". Specifies whether the association is derived from other model elements such as other associations or constraints.

Returns:
the value of the 'Is Derived' attribute.
See Also:
Association.setIsDerived(boolean), UMLPackage.getAssociation_IsDerived()

setIsDerived

public void setIsDerived(boolean value)
Sets the value of the 'Is Derived' attribute.

Parameters:
value - the new value of the 'Is Derived' attribute.
See Also:
Association.isDerived()

getEndTypes

public EList getEndTypes()
Returns the value of the 'End Type' reference list. The list contents are of type Type. References the classifiers that are used as types of the ends of the association.

Returns:
the value of the 'End Type' reference list.
See Also:
UMLPackage.getAssociation_EndType()

getEndType

public Type getEndType(String name)
Retrieves the first Type with the specified 'Name' from the 'End Type' reference list.

Parameters:
name - The 'Name' of the Type to retrieve, or null.
Returns:
The first Type with the specified 'Name', or null.
See Also:
Association.getEndTypes()

getEndType

public Type getEndType(String name,
                       boolean ignoreCase,
                       EClass eClass)
Retrieves the first Type with the specified 'Name' from the 'End Type' reference list.

Parameters:
name - The 'Name' of the Type to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Type to retrieve, or null.
Returns:
The first Type with the specified 'Name', or null.
See Also:
Association.getEndTypes()

getMemberEnds

public EList getMemberEnds()
Returns the value of the 'Member End' reference list. The list contents are of type Property. It is bidirectional and its opposite is 'Association'. Each end represents participation of instances of the classifier connected to the end in links of the association.

Returns:
the value of the 'Member End' reference list.
See Also:
UMLPackage.getAssociation_MemberEnd(), Property.getAssociation()

getMemberEnd

public Property getMemberEnd(String name,
                             Type type)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Member End' reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Association.getMemberEnds()

getMemberEnd

public Property getMemberEnd(String name,
                             Type type,
                             boolean ignoreCase,
                             EClass eClass)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Member End' reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Property to retrieve, or null.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Association.getMemberEnds()

getNavigableOwnedEnds

public EList getNavigableOwnedEnds()
Returns the value of the 'Navigable Owned End' reference list. The list contents are of type Property. The navigable ends that are owned by the association itself.

Returns:
the value of the 'Navigable Owned End' reference list.
See Also:
UMLPackage.getAssociation_NavigableOwnedEnd()

createNavigableOwnedEnd

public Property createNavigableOwnedEnd(String name,
                                        Type type,
                                        EClass eClass)
Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Navigable Owned End' reference list.

Parameters:
name - The 'Name' for the new Property, or null.
type - The 'Type' for the new Property, or null.
eClass - The Ecore class of the Property to create.
Returns:
The new Property.
See Also:
Association.getNavigableOwnedEnds()

createNavigableOwnedEnd

public Property createNavigableOwnedEnd(String name,
                                        Type type)
Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Navigable Owned End' reference list.

Parameters:
name - The 'Name' for the new Property, or null.
type - The 'Type' for the new Property, or null.
Returns:
The new Property.
See Also:
Association.getNavigableOwnedEnds()

getNavigableOwnedEnd

public Property getNavigableOwnedEnd(String name,
                                     Type type)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Navigable Owned End' reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Association.getNavigableOwnedEnds()

getNavigableOwnedEnd

public Property getNavigableOwnedEnd(String name,
                                     Type type,
                                     boolean ignoreCase,
                                     EClass eClass,
                                     boolean createOnDemand)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Navigable Owned End' reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Property to retrieve, or null.
createOnDemand - Whether to create a Property on demand if not found.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Association.getNavigableOwnedEnds()

getOwnedEnds

public EList getOwnedEnds()
Returns the value of the 'Owned End' containment reference list. The list contents are of type Property. It is bidirectional and its opposite is 'Owning Association'. The ends that are owned by the association itself.

Returns:
the value of the 'Owned End' containment reference list.
See Also:
UMLPackage.getAssociation_OwnedEnd(), Property.getOwningAssociation()

createOwnedEnd

public Property createOwnedEnd(String name,
                               Type type,
                               EClass eClass)
Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Owned End' containment reference list.

Parameters:
name - The 'Name' for the new Property, or null.
type - The 'Type' for the new Property, or null.
eClass - The Ecore class of the Property to create.
Returns:
The new Property.
See Also:
Association.getOwnedEnds()

createOwnedEnd

public Property createOwnedEnd(String name,
                               Type type)
Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Owned End' containment reference list.

Parameters:
name - The 'Name' for the new Property, or null.
type - The 'Type' for the new Property, or null.
Returns:
The new Property.
See Also:
Association.getOwnedEnds()

getOwnedEnd

public Property getOwnedEnd(String name,
                            Type type)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned End' containment reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Association.getOwnedEnds()

getOwnedEnd

public Property getOwnedEnd(String name,
                            Type type,
                            boolean ignoreCase,
                            EClass eClass,
                            boolean createOnDemand)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned End' containment reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Property to retrieve, or null.
createOnDemand - Whether to create a Property on demand if not found.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Association.getOwnedEnds()

validateSpecializedEndNumber

public boolean validateSpecializedEndNumber(DiagnosticChain diagnostics,
                                            Map context)
An association specializing another association has the same number of ends as the other association. self.parents()->forAll(p | p.memberEnd.size() = self.memberEnd.size())


validateSpecializedEndTypes

public boolean validateSpecializedEndTypes(DiagnosticChain diagnostics,
                                           Map context)
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. true


validateBinaryAssociations

public boolean validateBinaryAssociations(DiagnosticChain diagnostics,
                                          Map context)
Only binary associations can be aggregations. self.memberEnd->exists(aggregation <> Aggregation::none) implies self.memberEnd->size() = 2


validateAssociationEnds

public boolean validateAssociationEnds(DiagnosticChain diagnostics,
                                       Map context)
Association ends of associations with more than two ends must be owned by the association. if memberEnd->size() > 2 then ownedEnd->includesAll(memberEnd)


isBinary

public boolean isBinary()
Determines whether this association is a binary association, i.e. whether it has exactly two member ends.


Copyright 2003, 2006 IBM Corporation and others.
All Rights Reserved.