UML.Semantic.Foundation.Core
Class Association

java.lang.Object
  |
  +--UML.Semantic.Foundation.Core.ModelElement
        |
        +--UML.Semantic.Foundation.Core.Namespace
              |
              +--UML.Semantic.Foundation.Core.GeneralizableElement
                    |
                    +--UML.Semantic.Foundation.Core.Association
All Implemented Interfaces:
Element, ElementAtt, LinkAtt
Direct Known Subclasses:
AssociationRole

public class Association
extends GeneralizableElement

An association defines a semantic relationship between classifiers; the instances of an association are a set of tuples relating instances of the classifiers. Each tuple value may appear at most once.

In the metamodel an Association is a declaration of a semantic relationship between Classifiers, such as Classes. An Association has at least two AssociationEnds. Each end is connected to a Classifier; the same Classifier may be connected to more than one AssociationEnds in the same Association. The Association represents a set of connections among instances of the Classifiers. An instance of an Association is a Link, which is a tuple of Instances drawn from the corresponding Classifiers.


Field Summary
static int AGGR_COMPOSITE
          The constant used to represent "composite" aggregation kind.
static int AGGR_NONE
          The constant used to represent "none" aggregation kind.
static int AGGR_SHARED
          The constant used to represent "shared" aggregation kind.
 
Constructor Summary
Association()
          Constructor.
 
Method Summary
 void add(AssociationEnd elem)
          Adds an association end to this association.
 boolean check()
          Checks if well-formedness rules are respected in this model element.
 AssociationEnd connectionAt(int i)
          Gets the i-th association end (if exists) of this association.
 int getAggregation()
          Gets the aggregation kind of this association.
 java.util.Vector getConnection()
          Gets the set of association ends of this association.
 void getInfo()
          Gets info on Association.
 
Methods inherited from class UML.Semantic.Foundation.Core.GeneralizableElement
add, allOwnedElement, allSupertype, getGeneralization, getIsAbstract, getIsLeaf, getIsRoot, getSpecialization, getSupertype, inheritedOwnedElement, inheritedSupertype, setIsAbstract, setIsLeaf, setIsRoot
 
Methods inherited from class UML.Semantic.Foundation.Core.Namespace
add, allContents, allContents, getOwnedElement, subContents
 
Methods inherited from class UML.Semantic.Foundation.Core.ModelElement
add, getBindingList, getConstraintList, getElementType, getErrors, getHref, getId, getIdentification, getIdref, getIndex, getIsOwned, getLabel, getLocator, getName, getNamespace, getNamespaceId, getStereotype, getTemplate, getTemplateParameterList, getTitle, getUuid, getUuidref, getVisibility, getVisibilitySymbol, getWarnings, setElementType, setErrors, setHref, setId, setIdref, setIndex, setIsOwned, setLabel, setName, setNamespace, setTemplate, setTitle, setUuid, setUuidref, setVisibility, setWarnings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AGGR_NONE

public static final int AGGR_NONE
The constant used to represent "none" aggregation kind.

See Also:
Constant Field Values

AGGR_SHARED

public static final int AGGR_SHARED
The constant used to represent "shared" aggregation kind.

See Also:
Constant Field Values

AGGR_COMPOSITE

public static final int AGGR_COMPOSITE
The constant used to represent "composite" aggregation kind.

See Also:
Constant Field Values
Constructor Detail

Association

public Association()
Constructor.

Method Detail

add

public void add(AssociationEnd elem)
Adds an association end to this association.


getConnection

public java.util.Vector getConnection()
Gets the set of association ends of this association.


connectionAt

public AssociationEnd connectionAt(int i)
Gets the i-th association end (if exists) of this association.

Returns:
An AssociationEnd object.

getAggregation

public int getAggregation()
Gets the aggregation kind of this association.


check

public boolean check()
Checks if well-formedness rules are respected in this model element.

Overrides:
check in class GeneralizableElement
Returns:
True if check was successful, false otherwise.

getInfo

public void getInfo()
Gets info on Association.

Overrides:
getInfo in class GeneralizableElement