UML.Semantic.Foundation.Core
Class Dependency

java.lang.Object
  |
  +--UML.Semantic.Foundation.Core.ModelElement
        |
        +--UML.Semantic.Foundation.Core.Dependency
All Implemented Interfaces:
Element, ElementAtt, LinkAtt
Direct Known Subclasses:
Binding, Refinement, Trace, Usage

public class Dependency
extends ModelElement

A dependency states that the implementation or functioning of one or more elements require the presence of one or more other elements. All of the elements must exist at the same level of meaning, i.e., they do not involve a shift in the level of abstraction or realization.

A dependency indicates a semantic relationship among model elements themselves (rather than instances of them) in which a change to one element may affect or require changes to other elements.

In the metamodel a Dependency is a directed relationship from a client (or clients) to a supplier (or suppliers) stating that the client is dependent on the supplier, i.e. the client element requires the presence and knowledge of the supplier element.

Dependencies may be stereotyped to differentiate various kinds of dependency.

To enable grouping of dependencies that belong together, a dependency can serve as a container for a group of Dependencies. This is useful, because often dependencies are between groups of elements (such as Packages, Models, Classifiers, etc. ). For example, the dependency of one package on another can be expanded into a set of dependencies among elements within the two packages


Constructor Summary
Dependency()
          Constructor.
 
Method Summary
 boolean check()
          Checks if well-formedness rules are respected in this model element.
 java.lang.String getDescription()
          Gets the text description of the dependency.
 void setClient(java.lang.String client)
          Adds a client to this dependency.
 void setDescription(java.lang.String desc)
          Sets the dependency description to the given value.
 void setSupplier(java.lang.String supplier)
          Adds a supplier to this dependency.
 
Methods inherited from class UML.Semantic.Foundation.Core.ModelElement
add, add, getBindingList, getConstraintList, getElementType, getErrors, getHref, getId, getIdentification, getIdref, getIndex, getInfo, 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
 

Constructor Detail

Dependency

public Dependency()
Constructor.

Method Detail

setDescription

public void setDescription(java.lang.String desc)
Sets the dependency description to the given value.


getDescription

public java.lang.String getDescription()
Gets the text description of the dependency.

Returns:
The dependency description string.

setClient

public void setClient(java.lang.String client)
Adds a client to this dependency.


setSupplier

public void setSupplier(java.lang.String supplier)
Adds a supplier to this dependency.


check

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

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