org.eclipse.uml2.uml
Interface Association

All Superinterfaces:
Classifier, Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, NamedElement, Namespace, org.eclipse.emf.common.notify.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()

Method Summary
 Property createNavigableOwnedEnd(java.lang.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(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Navigable Owned End' reference list
 Property createOwnedEnd(java.lang.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(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new Property, with the specified 'Name', and 'Type', and appends it to the 'Owned End' containment reference list
 Type getEndType(java.lang.String name)
          Retrieves the first Type with the specified 'Name' from the 'End Type' reference list
 Type getEndType(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first Type with the specified 'Name' from the 'End Type' reference list
 org.eclipse.emf.common.util.EList<Type> getEndTypes()
          Returns the value of the 'End Type' reference list.
 Property getMemberEnd(java.lang.String name, Type type)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Member End' reference list
 Property getMemberEnd(java.lang.String name, Type type, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Member End' reference list
 org.eclipse.emf.common.util.EList<Property> getMemberEnds()
          Returns the value of the 'Member End' reference list.
 Property getNavigableOwnedEnd(java.lang.String name, Type type)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Navigable Owned End' reference list
 Property getNavigableOwnedEnd(java.lang.String name, Type type, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Navigable Owned End' reference list
 org.eclipse.emf.common.util.EList<Property> getNavigableOwnedEnds()
          Returns the value of the 'Navigable Owned End' reference list.
 Property getOwnedEnd(java.lang.String name, Type type)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned End' containment reference list
 Property getOwnedEnd(java.lang.String name, Type type, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned End' containment reference list
 org.eclipse.emf.common.util.EList<Property> 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(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Association ends of associations with more than two ends must be owned by the association.
 boolean validateBinaryAssociations(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Only binary associations can be aggregations.
 boolean validateSpecializedEndNumber(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          An association specializing another association has the same number of ends as the other association.
 boolean validateSpecializedEndTypes(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> 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.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, eInvoke, 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.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, eInvoke, 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.Type
conformsTo, createAssociation, getAssociations, getPackage, setPackage
 
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, eInvoke, 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.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
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, eInvoke, 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.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
 
Methods inherited from interface org.eclipse.uml2.uml.Relationship
getRelatedElements
 

Method Detail

isDerived

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:
setIsDerived(boolean), UMLPackage.getAssociation_IsDerived()

setIsDerived

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

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

getEndTypes

org.eclipse.emf.common.util.EList<Type> getEndTypes()
Returns the value of the 'End Type' reference list. The list contents are of type Type.

This feature subsets the following features:

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

Type getEndType(java.lang.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:
getEndTypes()

getEndType

Type getEndType(java.lang.String name,
                boolean ignoreCase,
                org.eclipse.emf.ecore.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:
getEndTypes()

getMemberEnds

org.eclipse.emf.common.util.EList<Property> 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'.

This feature subsets the following features:

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

Property getMemberEnd(java.lang.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:
getMemberEnds()

getMemberEnd

Property getMemberEnd(java.lang.String name,
                      Type type,
                      boolean ignoreCase,
                      org.eclipse.emf.ecore.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:
getMemberEnds()

getNavigableOwnedEnds

org.eclipse.emf.common.util.EList<Property> getNavigableOwnedEnds()
Returns the value of the 'Navigable Owned End' reference list. The list contents are of type Property.

This feature subsets the following features:

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

Property createNavigableOwnedEnd(java.lang.String name,
                                 Type type,
                                 org.eclipse.emf.ecore.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:
getNavigableOwnedEnds()

createNavigableOwnedEnd

Property createNavigableOwnedEnd(java.lang.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:
getNavigableOwnedEnds()

getNavigableOwnedEnd

Property getNavigableOwnedEnd(java.lang.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:
getNavigableOwnedEnds()

getNavigableOwnedEnd

Property getNavigableOwnedEnd(java.lang.String name,
                              Type type,
                              boolean ignoreCase,
                              org.eclipse.emf.ecore.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:
getNavigableOwnedEnds()

getOwnedEnds

org.eclipse.emf.common.util.EList<Property> 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'.

This feature subsets the following features:

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

Property createOwnedEnd(java.lang.String name,
                        Type type,
                        org.eclipse.emf.ecore.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:
getOwnedEnds()

createOwnedEnd

Property createOwnedEnd(java.lang.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:
getOwnedEnds()

getOwnedEnd

Property getOwnedEnd(java.lang.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:
getOwnedEnds()

getOwnedEnd

Property getOwnedEnd(java.lang.String name,
                     Type type,
                     boolean ignoreCase,
                     org.eclipse.emf.ecore.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:
getOwnedEnds()

validateSpecializedEndNumber

boolean validateSpecializedEndNumber(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> 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())

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateSpecializedEndTypes

boolean validateSpecializedEndTypes(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> 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

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateBinaryAssociations

boolean validateBinaryAssociations(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)
Only binary associations can be aggregations. self.memberEnd->exists(aggregation <> Aggregation::none) implies self.memberEnd->size() = 2

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateAssociationEnds

boolean validateAssociationEnds(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)
Association ends of associations with more than two ends must be owned by the association. if memberEnd->size() > 2 then ownedEnd->includesAll(memberEnd)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

isBinary

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


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