org.argouml.model
Class AbstractCoreHelperDecorator

java.lang.Object
  extended byorg.argouml.model.AbstractCoreHelperDecorator
All Implemented Interfaces:
CoreHelper

public abstract class AbstractCoreHelperDecorator
extends Object
implements CoreHelper

An abstract Decorator for the CoreHelper.


Method Summary
 void addAllStereotypes(Object modelElement, Collection stereotypes)
          Adds a collection of stereotype to some modelelement.
 void addAnnotatedElement(Object comment, Object annotatedElement)
          Adds an annotated element to a comment.
 void addClient(Object handle, Object element)
          Adds a client model element to some dependency.
 void addClientDependency(Object handle, Object dependency)
          Adds a client dependency to some modelelement.
 void addComment(Object element, Object comment)
          Add a new comment to a model element.
 void addConnection(Object handle, Object connection)
          Add an End to a connection.
 void addConstraint(Object handle, Object mc)
          Adds a constraint to some model element.
 void addDeploymentLocation(Object handle, Object node)
           
 void addElementResidence(Object handle, Object residence)
          Add an ElementResidence.
 void addFeature(Object handle, int index, Object f)
          Adds a feature to some classifier.
 void addFeature(Object handle, Object f)
          Adds a feature to some classifier.
 void addLink(Object handle, Object link)
          Add the given Link to the given Link or Association.
 void addMethod(Object handle, Object m)
          Adds a method to some operation and copies the op's attributes to the method.
 void addOwnedElement(Object handle, Object me)
          Adds a model element to some namespace.
 void addParameter(Object handle, int index, Object parameter)
          Add a Parameter to the given object at given location.
 void addParameter(Object handle, Object parameter)
          Add a Parameter to the given object.
 void addRaisedSignal(Object handle, Object sig)
          Add a raised Signal to a Message or Operation.
 void addSourceFlow(Object handle, Object flow)
          Add a source flow to a model element.
 void addStereotype(Object modelElement, Object stereotype)
          Adds a stereotype to some modelelement.
 void addSupplier(Object handle, Object element)
          Adds a supplier classifier to some abstraction.
 void addSupplierDependency(Object supplier, Object dependency)
          Adds a supplier dependency to some modelelement.
 void addTaggedValue(Object handle, Object taggedValue)
          Adds a TaggedValue to a ModelElement.
 void addTargetFlow(Object handle, Object flow)
          Add a target flow to a model element.
 void clearStereotypes(Object modelElement)
          Removes all stereotypes from a given modelelement.
 boolean equalsAggregationKind(Object associationEnd, String kindType)
           
 Collection getAllAttributes(Object clazz)
          Returns all attributes of some classifier and of its parents.
 Collection getAllBehavioralFeatures(Object element)
          Returns all behavioralfeatures found in this element and its children.
 Collection getAllClasses(Object ns)
          Returns all classes found in this namespace and in its children.
 Collection getAllClassifiers(Object namespace)
          Returns all classifiers found in this namespace and in its children.
 Collection getAllComponents(Object ns)
          Returns all components found in this namespace and in its children.
 Collection getAllContents(Object clazz)
          Returns the contents (owned elements) of this classifier and all its parents as specified in section 2.5.3.8 of the UML 1.3 spec.
 Collection getAllDataTypes(Object ns)
          Returns all components found in this namespace and in its children.
 Collection getAllInterfaces(Object ns)
          Returns all interfaces found in this namespace and in its children.
 Collection getAllMetatypeNames()
          Returns names of all metatypes in metamodel TODO: This method rightly belongs in a separate interface dealing with instances of MOF types as opposed to UML types like all the rest of the methods here do.
 Collection getAllNodes(Object ns)
          Returns all components found in this namespace and in its children.
 Collection getAllPossibleNamespaces(Object modelElement, Object model)
          Returns all possible namespaces that may be selected by some given modelelement.
 Collection getAllRealizedInterfaces(Object o)
          Returns all interfaces that are realized by the given class or by its superclasses.
 Collection getAllSupertypes(Object cls1)
          This method returns all Classifiers of which this class is a direct or indirect subtype.
 Collection getAllVisibleElements(Object ns)
          Returns a Set containing all ModelElements visible outside of the Namespace.
 Collection getAssociatedClassifiers(Object classifier)
          Gets all classifiers that are associated to the given classifier (have an association relationship with the classifier).
 Collection getAssociateEnds(Object classifier)
          This method returns all opposite AssociationEnds of a given Classifier.
 Collection getAssociateEndsInh(Object classifier1)
          This method returns all opposite AssociationEnds of a given Classifier, including inherited.
 Object getAssociationEnd(Object type, Object assoc)
          Returns the associationend between a classifier and an associaton.
 Collection getAssociations(Object classifier)
          Returns all associations for some classifier.
 Collection getAssociations(Object from, Object to)
          Gets the associations between the classifiers from and to.
 Collection getAttributes(Object classifier)
          This method returns all attributes of a given Classifier.
 Collection getAttributesInh(Object classifier)
          This method returns all attributes of a given Classifier, including inherited.
 Collection getBehavioralFeatures(Object clazz)
          Returns all behavioral features of some classifier.
 String getBody(Object comment)
          Gets the body of a comment.
 Collection getChildren(Object o)
          Returns all children from some given generalizableelement on all levels (the complete tree excluding the generalizable element itself).
protected  CoreHelper getComponent()
          The component we are decorating.
 Collection getDependencies(Object supplierObj, Object clientObj)
          Returns the dependencies between some supplier modelelement and some client modelelement.
 Object getDestination(Object relationship)
          Returns the destination of a relation.
 Collection getExtendedClassifiers(Object clazz)
          Returns all classes some generalizable element extends.
 Collection getExtendingClassifiers(Object clazz)
          Returns all classifiers that extend some classifier.
 Collection getExtendingElements(Object clazz)
          Returns all elements that extend some class.
 String getFeatureName(Object o)
          This method returns the name of a feature.
 Object getFirstSharedNamespace(Object ns1, Object ns2)
          Gets the first namespace two namespaces share.
 Collection getFlows(Object source, Object target)
          Returns all flows from some source modelelement to a target modelelement.
 Object getGeneralization(Object child, Object parent)
          Gets the generalization between two generalizable elements.
 Collection getOperations(Object classifier)
          This method returns all operations of a given Classifier.
 Collection getOperationsInh(Object classifier)
          This method returns all operations of a given Classifier, including inherited.
 Collection getRealizedInterfaces(Object cls)
          Return all interfaces the given class realizes.
 Collection getRelationships(Object source, Object dest)
          Returns all relationships between the source and dest modelelement and vica versa.
 Object getReturnParameter(Object operation1)
          This method finds all parameters of the given operation which have the ParameterDirectionType RETURN.
 Collection getReturnParameters(Object operation)
          Returns all return parameters for an operation.
 Object getSource(Object relationship)
          Returns the source of a relation.
 Object getSpecification(Object object)
          Returns the operation that some method realized.
 Collection getSpecifications(Object classifier)
          Returns all Interfaces of which this class is a realization.
 Collection getSubtypes(Object cls)
          This method returns all Classifiers of which this class is a direct supertype.
 Collection getSupertypes(Object generalizableElement)
          This method returns all Classifiers of which this class is a direct subtype.
 boolean hasCompositeEnd(Object association)
           
 boolean isMethod(Object o)
          This method returns if the object is a method.
 boolean isOperation(Object o)
          This method returns if the object is an operation.
 boolean isSubType(Object type, Object subType)
          Determine if a meta type is a subtype of another.
 boolean isValidNamespace(Object mObj, Object nsObj)
          Returns true if some modelelement may be owned by the given namespace.
 void removeAnnotatedElement(Object handle, Object me)
          Remove the given modelelement from a given comment.
 void removeClientDependency(Object handle, Object dep)
          This method removes a dependency from a model element.
 void removeConnection(Object handle, Object connection)
          Remove a connection between an Association & AssociationEnd or between a Link & LinkEnd.
 void removeConstraint(Object handle, Object cons)
          Remove the given constraint from a given ModelElement.
 void removeDeploymentLocation(Object handle, Object node)
          Remove a deployment location.
 void removeElementResidence(Object handle, Object residence)
          Remove an ElementResidence.
 void removeFeature(Object cls, Object feature)
          This method removes a feature from a classifier.
 void removeOwnedElement(Object handle, Object value)
          Removes a owned model element from a namespace.
 void removeParameter(Object handle, Object parameter)
          This method removes a parameter from an operation.
 void removeSourceFlow(Object handle, Object flow)
          Remove a source flow from a model element.
 void removeStereotype(Object modelElement, Object stereotype)
          Removes a stereotype from some modelelement.
 void removeSupplierDependency(Object supplier, Object dependency)
          Adds a supplier dependency to some modelelement.
 void removeTaggedValue(Object handle, String name)
          Removes a named tagged value from a model element, ie subsequent calls to getTaggedValue will return null for name, at least until a tagged value with that name has been added again.
 void removeTargetFlow(Object handle, Object flow)
          Add a target flow to a model element.
 void setAbstract(Object handle, boolean flag)
          Sets if of some model element is abstract.
 void setActive(Object handle, boolean active)
          Makes a Class active.
 void setAggregation(Object handle, Object aggregationKind)
          Sets the aggregation of some model element.
 void setAnnotatedElements(Object handle, Collection elems)
          Sets the list of annotated elements of the given comment.
 void setAssociation(Object handle, Object association)
          Sets the association of some model element.
 void setAttributes(Object classifier, Collection attributes)
          This method replaces all attributes of the given classifier by the given collection of attributes.
 void setBody(Object handle, Object expr)
          Sets a body of a given Method or Constraint.
 void setBody(Object handle, String body)
          Sets the body of a comment.
 void setChangeability(Object handle, Object ck)
          Set the Changeability of a StructuralFeature or AssociationEnd.
 void setChangeable(Object handle, boolean flag)
          Set the changeability of some feature.
 void setChild(Object handle, Object child)
          Set the child for a generalization.
 void setConcurrency(Object handle, Object concurrencyKind)
          Set the concurrency of some operation.
 void setConnections(Object handle, Collection elems)
          Sets the list of connections of the given association or link.
 void setContainer(Object handle, Object component)
          Set the Container of the given ElementResidence to the given Component.
 void setDefaultValue(Object handle, Object expr)
          Sets a default value of some parameter.
 void setDiscriminator(Object handle, String discriminator)
           
 void setEnumerationLiterals(Object enumeration, List literals)
          Set the (ordered) list of literals of an Enumeration.
 void setFeature(Object elem, int i, Object feature)
          Set the feature at the given position.
 void setFeatures(Object handle, Collection features)
          Sets the features of some model element.
 void setImplementationLocation(Object handle, Object component)
          Set the ImplementationLocation of the given ElementResidence to the given Component.
 void setInitialValue(Object at, Object expr)
          Sets an initial value.
 void setKind(Object handle, Object kind)
          Set some parameters kind.
 void setKindToIn(Object handle)
          Set some parameters kind to 'in'.
 void setKindToInOut(Object handle)
          Set some parameters kind to 'in/out'.
 void setKindToOut(Object handle)
          Set some parameters kind to 'out'.
 void setKindToReturn(Object handle)
          Set some parameters kind to 'return'.
 void setLeaf(Object handle, boolean flag)
          Sets if some model element is a leaf.
 void setModelElementContainer(Object handle, Object container)
          Sets the container that owns the handle.
 void setMultiplicity(Object handle, Object arg)
          Sets a multiplicity of some model element.
 void setName(Object handle, String name)
          Sets a name of some modelelement.
 void setNamespace(Object handle, Object ns)
          Sets a namespace of some modelelement.
 void setNavigable(Object handle, boolean flag)
          Sets the navigability of some association end.
 void setOperations(Object classifier, Collection operations)
          This method replaces all operations of the given classifier by the given collection of operations.
 void setOrdering(Object handle, Object ok)
          Set the OrderingKind of a given AssociationEnd.
 void setOwner(Object handle, Object owner)
          Set the owner of a Feature.
 void setOwnerScope(Object handle, Object os)
           
 void setParameters(Object handle, Collection parameters)
          Sets the parameters of a classifier, event, objectflowstate or behavioralfeature.
 void setParent(Object handle, Object parent)
          Sets the parent of a generalization.
 void setPowertype(Object handle, Object pt)
          Set the PowerType of a Generalization.
 void setQualifiers(Object handle, Collection elems)
          Sets the qualified attributes of an association end.
 void setQuery(Object handle, boolean flag)
          Sets the query flag of a behavioral feature.
 void setRaisedSignals(Object handle, Collection raisedSignals)
          Sets the raised signals of some behavioural feature.
 void setResident(Object handle, Object resident)
           
 void setResidents(Object handle, Collection residents)
          Sets the residents of some model element.
 void setRoot(Object handle, boolean flag)
          Sets if some model element is a root.
 void setSources(Object handle, Collection specifications)
           
 void setSpecification(Object handle, boolean specification)
          Set the Specification flag for a ModelElement.
 void setSpecifications(Object handle, Collection specifications)
          Sets the specifications of some association end.
 void setTaggedValue(Object handle, String tag, String value)
          Sets a tagged value of some modelelement.
 void setTaggedValues(Object handle, Collection taggedValues)
          Set the TaggedValues of a ModelElement.
 void setTargetScope(Object handle, Object scopeKind)
          Set the target scope of some association end or structural feature.
 void setType(Object handle, Object type)
          Sets the type of some parameter.
 void setUUID(Object handle, String uuid)
          Set the UUID of this element.
 void setVisibility(Object handle, Object visibility)
          Set the visibility of some modelelement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.argouml.model.CoreHelper
setSpecification, setSpecification
 

Method Detail

getComponent

protected CoreHelper getComponent()
The component we are decorating.

Returns:
Returns the component.

clearStereotypes

public void clearStereotypes(Object modelElement)
Description copied from interface: CoreHelper
Removes all stereotypes from a given modelelement.

Specified by:
clearStereotypes in interface CoreHelper
Parameters:
modelElement - model element
See Also:
org.argouml.model.CoreHelper#clearStereotypes( java.lang.Object, java.lang.Object)

isSubType

public boolean isSubType(Object type,
                         Object subType)
Description copied from interface: CoreHelper
Determine if a meta type is a subtype of another.

Specified by:
isSubType in interface CoreHelper
Parameters:
type - The parent metatype.
subType - The metatype to test for being a subtype.
Returns:
true is subType is a sub-type of type.
See Also:
CoreHelper.isSubType( java.lang.Object, java.lang.Object)

getAllSupertypes

public Collection getAllSupertypes(Object cls1)
Description copied from interface: CoreHelper
This method returns all Classifiers of which this class is a direct or indirect subtype.

Specified by:
getAllSupertypes in interface CoreHelper
Parameters:
cls1 - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a GeneralizableElement.
See Also:
CoreHelper.getAllSupertypes(java.lang.Object)

getSupertypes

public Collection getSupertypes(Object generalizableElement)
Description copied from interface: CoreHelper
This method returns all Classifiers of which this class is a direct subtype.

Specified by:
getSupertypes in interface CoreHelper
Parameters:
generalizableElement - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a GeneralizableElement.
See Also:
CoreHelper.getSupertypes(java.lang.Object)

getAssociateEnds

public Collection getAssociateEnds(Object classifier)
Description copied from interface: CoreHelper
This method returns all opposite AssociationEnds of a given Classifier.

Specified by:
getAssociateEnds in interface CoreHelper
Parameters:
classifier - the classifier you want to have the opposite association ends for
Returns:
a collection of the opposite associationends
See Also:
CoreHelper.getAssociateEnds(java.lang.Object)

getAssociateEndsInh

public Collection getAssociateEndsInh(Object classifier1)
Description copied from interface: CoreHelper
This method returns all opposite AssociationEnds of a given Classifier, including inherited.

Specified by:
getAssociateEndsInh in interface CoreHelper
Parameters:
classifier1 - the classifier you want to have the opposite association ends for
Returns:
a collection of the opposite associationends
See Also:
CoreHelper.getAssociateEndsInh(java.lang.Object)

removeFeature

public void removeFeature(Object cls,
                          Object feature)
Description copied from interface: CoreHelper
This method removes a feature from a classifier.

Specified by:
removeFeature in interface CoreHelper
Parameters:
cls - the classifier
feature - the feature to be removed
See Also:
CoreHelper.removeFeature( java.lang.Object, java.lang.Object)

getFeatureName

public String getFeatureName(Object o)
Description copied from interface: CoreHelper
This method returns the name of a feature.

Specified by:
getFeatureName in interface CoreHelper
Parameters:
o - is the feature
Returns:
name
See Also:
CoreHelper.getFeatureName(java.lang.Object)

isMethod

public boolean isMethod(Object o)
Description copied from interface: CoreHelper
This method returns if the object is a method.

Specified by:
isMethod in interface CoreHelper
Parameters:
o - object
Returns:
true if it's a method, false if not
See Also:
CoreHelper.isMethod(java.lang.Object)

isOperation

public boolean isOperation(Object o)
Description copied from interface: CoreHelper
This method returns if the object is an operation.

Specified by:
isOperation in interface CoreHelper
Parameters:
o - object
Returns:
true if it's an operation, false if not
See Also:
CoreHelper.isOperation(java.lang.Object)

getOperations

public Collection getOperations(Object classifier)
Description copied from interface: CoreHelper
This method returns all operations of a given Classifier.

Specified by:
getOperations in interface CoreHelper
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations
See Also:
CoreHelper.getOperations(java.lang.Object)

setOperations

public void setOperations(Object classifier,
                          Collection operations)
Description copied from interface: CoreHelper
This method replaces all operations of the given classifier by the given collection of operations.

Specified by:
setOperations in interface CoreHelper
Parameters:
classifier - the given classifier
operations - the new operations
See Also:
CoreHelper.setOperations( java.lang.Object, java.util.Collection)

getAttributes

public Collection getAttributes(Object classifier)
Description copied from interface: CoreHelper
This method returns all attributes of a given Classifier.

Specified by:
getAttributes in interface CoreHelper
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes
See Also:
CoreHelper.getAttributes(java.lang.Object)

setAttributes

public void setAttributes(Object classifier,
                          Collection attributes)
Description copied from interface: CoreHelper
This method replaces all attributes of the given classifier by the given collection of attributes.

Specified by:
setAttributes in interface CoreHelper
Parameters:
classifier - the classifier
attributes - the new attributes
See Also:
CoreHelper.setAttributes( java.lang.Object, java.util.Collection)

getAttributesInh

public Collection getAttributesInh(Object classifier)
Description copied from interface: CoreHelper
This method returns all attributes of a given Classifier, including inherited.

Specified by:
getAttributesInh in interface CoreHelper
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes
See Also:
CoreHelper.getAttributesInh(java.lang.Object)

getOperationsInh

public Collection getOperationsInh(Object classifier)
Description copied from interface: CoreHelper
This method returns all operations of a given Classifier, including inherited.

Specified by:
getOperationsInh in interface CoreHelper
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations
See Also:
CoreHelper.getOperationsInh(java.lang.Object)

getReturnParameter

public Object getReturnParameter(Object operation1