org.argouml.model.uml
Class CoreHelperImpl

java.lang.Object
  extended byorg.argouml.model.uml.CoreHelperImpl
All Implemented Interfaces:
org.argouml.model.CoreHelper

class CoreHelperImpl
extends Object
implements org.argouml.model.CoreHelper

Helper class for UML Foundation::Core Package.

Current implementation is a placeholder.

Since:
ARGO0.11.2

Field Summary
private static Logger LOG
          Logger.
private  NSUMLModelImplementation nsmodel
          The model implementation.
 
Constructor Summary
(package private) CoreHelperImpl(NSUMLModelImplementation implementation)
          Don't allow instantiation.
 
Method Summary
 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 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 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.
 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 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 getAssociatedClassifiers(Object aclassifier)
          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 oclassifier)
          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.
private  void getChildren(Collection currentChildren, ru.novosoft.uml.foundation.core.MGeneralization gen)
          Adds all children recursively to the Collection in the first argument.
 Collection getChildren(Object o)
          Returns all children from some given generalizableelement on all levels (the complete tree excluding the generalizable element itself).
 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 achild, Object aparent)
          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 paramters of the given operation which have the MParamterDirectionType 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 ogeneralizableelement)
          This method returns all Classifiers of which this class is a direct subtype.
 boolean hasCompositeEnd(Object association)
           
private  Collection internalGetAllRealizedInterfaces(Object o, Collection col, Set visited)
          Helper method for getAllRealizedInterfaces.
 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.
private  boolean isValidNamespace(ru.novosoft.uml.foundation.core.MAssociation assoc, ru.novosoft.uml.foundation.core.MNamespace ns)
           
private  boolean isValidNamespace(ru.novosoft.uml.behavior.collaborations.MCollaboration collab, ru.novosoft.uml.foundation.core.MNamespace ns)
           
private  boolean isValidNamespace(ru.novosoft.uml.foundation.core.MGeneralizableElement gen, ru.novosoft.uml.foundation.core.MNamespace ns)
           
private  boolean isValidNamespace(ru.novosoft.uml.foundation.core.MGeneralization gen, ru.novosoft.uml.foundation.core.MNamespace ns)
           
private  boolean isValidNamespace(ru.novosoft.uml.foundation.core.MStructuralFeature struc, ru.novosoft.uml.foundation.core.MNamespace ns)
           
 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 removeConstraint(Object handle, Object cons)
          Remove the given constraint from a given ModelElement.
 void removeDeploymentLocation(Object handle, Object node)
           
 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 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, Constraint or Expression.
 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 setDefaultValue(Object handle, Object expr)
          Sets a default value of some parameter.
 void setDiscriminator(Object handle, String discriminator)
           
 void setFeature(Object elem, int i, Object impl)
          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 setStereotype(Object handle, Object stereo)
          Sets the stereotype of some modelelement.
 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
 

Field Detail

LOG

private static final Logger LOG
Logger.


nsmodel

private NSUMLModelImplementation nsmodel
The model implementation.

Constructor Detail

CoreHelperImpl

CoreHelperImpl(NSUMLModelImplementation implementation)
Don't allow instantiation.

Parameters:
implementation - To get other helpers and factories.
Method Detail

isSubType

public boolean isSubType(Object type,
                         Object subType)
Determine if a meta type is a subtype of another.

Specified by:
isSubType in interface org.argouml.model.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.

getAllSupertypes

public Collection getAllSupertypes(Object cls1)
This method returns all Classifiers of which this class is a direct or indirect subtype.

Specified by:
getAllSupertypes in interface org.argouml.model.CoreHelper
Parameters:
cls1 - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a MGeneralizableElement

getSupertypes

public Collection getSupertypes(Object ogeneralizableelement)
This method returns all Classifiers of which this class is a direct subtype.

Specified by:
getSupertypes in interface org.argouml.model.CoreHelper
Parameters:
ogeneralizableelement - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a MGeneralizableElement

getAssociateEnds

public Collection getAssociateEnds(Object classifier)
This method returns all opposite AssociationEnds of a given Classifier.

Specified by:
getAssociateEnds in interface org.argouml.model.CoreHelper
Parameters:
classifier - the classifier you want to have the opposite association ends for
Returns:
a collection of the opposite associationends

getAssociateEndsInh

public Collection getAssociateEndsInh(Object classifier1)
This method returns all opposite AssociationEnds of a given Classifier, including inherited.

Specified by:
getAssociateEndsInh in interface org.argouml.model.CoreHelper
Parameters:
classifier1 - the classifier you want to have the opposite association ends for
Returns:
a collection of the opposite associationends

removeFeature

public void removeFeature(Object cls,
                          Object feature)
This method removes a feature from a classifier.

Specified by:
removeFeature in interface org.argouml.model.CoreHelper
Parameters:
cls - the classifier
feature - the feature to be removed

getFeatureName

public String getFeatureName(Object o)
This method returns the name of a feature.

Specified by:
getFeatureName in interface org.argouml.model.CoreHelper
Parameters:
o - is the feature
Returns:
name

isMethod

public boolean isMethod(Object o)
This method returns if the object is a method.

Specified by:
isMethod in interface org.argouml.model.CoreHelper
Parameters:
o - object
Returns:
true if it's a method, false if not

isOperation

public boolean isOperation(Object o)
This method returns if the object is an operation.

Specified by:
isOperation in interface org.argouml.model.CoreHelper
Parameters:
o - object
Returns:
true if it's an operation, false if not

getOperations

public Collection getOperations(Object classifier)
This method returns all operations of a given Classifier.

Specified by:
getOperations in interface org.argouml.model.CoreHelper
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations

setOperations

public void setOperations(Object classifier,
                          Collection operations)
This method replaces all operations of the given classifier by the given collection of operations.

Specified by:
setOperations in interface org.argouml.model.CoreHelper
Parameters:
classifier - the given classifier
operations - the new operations

getAttributes

public Collection getAttributes(Object classifier)
This method returns all attributes of a given Classifier.

Specified by:
getAttributes in interface org.argouml.model.CoreHelper
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes

setAttributes

public void setAttributes(Object classifier,
                          Collection attributes)
This method replaces all attributes of the given classifier by the given collection of attributes.

Specified by:
setAttributes in interface org.argouml.model.CoreHelper
Parameters:
classifier - the classifier
attributes - the new attributes

getAttributesInh

public Collection getAttributesInh(Object classifier)
This method returns all attributes of a given Classifier, including inherited.

Specified by:
getAttributesInh in interface org.argouml.model.CoreHelper
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes

getOperationsInh

public Collection getOperationsInh(Object classifier)
This method returns all operations of a given Classifier, including inherited.

Specified by:
getOperationsInh in interface org.argouml.model.CoreHelper
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations

getReturnParameter

public Object getReturnParameter(Object operation1)
This method finds all paramters of the given operation which have the MParamterDirectionType RETURN. If it is only one, it is returned. In case there are no return parameters, null is returned. If there is more than one return paramter, first of them is returned, but a message is logged.

Specified by:
getReturnParameter in interface org.argouml.model.CoreHelper
Parameters:
operation1 - the operation you want to find the return parameter for.
Returns:
If this operation has only one paramter with Kind: RETURN, this is it, otherwise null

getReturnParameters

public Collection getReturnParameters(Object operation)
Returns all return parameters for an operation.

Specified by:
getReturnParameters in interface org.argouml.model.CoreHelper
Parameters:
operation - is the operation.
Returns:
Collection

getSpecification

public Object getSpecification(Object object)
Returns the operation that some method realized. Returns null if object isn't a method or, possibly, if the method isn't properly defined.

Specified by:
getSpecification in interface org.argouml.model.CoreHelper
Parameters:
object - the method you want the realized operation of.
Returns:
an operation, or null.

getSpecifications

public Collection getSpecifications(Object classifier)
Returns all Interfaces of which this class is a realization.

Specified by:
getSpecifications in interface org.argouml.model.CoreHelper
Parameters:
classifier - the class you want to have the interfaces for
Returns:
a collection of the Interfaces

getSubtypes

public Collection getSubtypes(Object cls)
This method returns all Classifiers of which this class is a direct supertype.

Specified by:
getSubtypes in interface org.argouml.model.CoreHelper
Parameters:
cls - the class you want to have the children for
Returns:
a collection of the children, each of which is a MGeneralizableElement

getAllBehavioralFeatures

public Collection getAllBehavioralFeatures(Object element)
Returns all behavioralfeatures found in this element and its children.

Specified by:
getAllBehavioralFeatures in interface org.argouml.model.CoreHelper
Parameters:
element - is the element
Returns:
Collection

getBehavioralFeatures

public Collection getBehavioralFeatures(Object clazz)
Returns all behavioral features of some classifier.

Specified by:
getBehavioralFeatures in interface org.argouml.model.CoreHelper
Parameters:
clazz - The classifier
Returns:
the collection with all behavioral features of some classifier

getAllInterfaces

public Collection getAllInterfaces(Object ns)
Returns all interfaces found in this namespace and in its children.

Specified by:
getAllInterfaces in interface org.argouml.model.CoreHelper
Parameters:
ns - the given namespace
Returns:
Collection with all interfaces found

getAllClasses

public Collection getAllClasses(Object ns)
Returns all classes found in this namespace and in its children.

Specified by:
getAllClasses in interface org.argouml.model.CoreHelper
Parameters:
ns - is the namespace.
Returns:
Collection

getRealizedInterfaces

public Collection getRealizedInterfaces(Object cls)
Return all interfaces the given class realizes.

Specified by:
getRealizedInterfaces in interface org.argouml.model.CoreHelper
Parameters:
cls - the classifier
Returns:
Collection

getExtendedClassifiers

public Collection getExtendedClassifiers(Object clazz)
Returns all classes some generalizable element extends.

Specified by:
getExtendedClassifiers in interface org.argouml.model.CoreHelper
Parameters:
clazz - is the generalizable element
Returns:
Collection

getGeneralization

public Object getGeneralization(Object achild,
                                Object aparent)
Gets the generalization between two generalizable elements. Returns null if there is none.

Specified by:
getGeneralization in interface org.argouml.model.CoreHelper
Parameters:
achild - is the child generalizable element.
aparent - is the parent generalizable element.
Returns:
MGeneralization

getFlows

public Collection getFlows(Object source,
                           Object target)
Returns all flows from some source modelelement to a target modelelement.

Specified by:
getFlows in interface org.argouml.model.CoreHelper
Parameters:
source - is the source model element.
target - is the target model element.
Returns:
Collection

getExtendingElements

public Collection getExtendingElements(Object clazz)
Returns all elements that extend some class.

Specified by:
getExtendingElements in interface org.argouml.model.CoreHelper
Parameters:
clazz - is the class (a generalizable element)
Returns:
Collection

getExtendingClassifiers

public Collection getExtendingClassifiers(Object clazz)
Returns all classifiers that extend some classifier.

Specified by:
getExtendingClassifiers in interface org.argouml.model.CoreHelper
Parameters:
clazz - is the classifier.
Returns:
Collection

getAllComponents

public Collection getAllComponents(Object ns)
Returns all components found in this namespace and in its children.

Specified by:
getAllComponents in interface org.argouml.model.CoreHelper
Parameters:
ns - is the namespace.
Returns:
Collection

getAllDataTypes

public Collection getAllDataTypes(Object ns)
Returns all components found in this namespace and in its children.

Specified by:
getAllDataTypes in interface org.argouml.model.CoreHelper
Parameters:
ns - is the namespace
Returns:
Collection

getAllNodes

public Collection getAllNodes(Object ns)
Returns all components found in this namespace and in its children.

Specified by:
getAllNodes in interface org.argouml.model.CoreHelper
Parameters:
ns - is the namespace
Returns:
Collection

getAssociatedClassifiers

public Collection getAssociatedClassifiers(Object aclassifier)
Gets all classifiers that are associated to the given classifier (have an association relationship with the classifier).

Specified by:
getAssociatedClassifiers in interface org.argouml.model.CoreHelper
Parameters:
aclassifier - an MClassifier
Returns:
Collection

getAssociations

public Collection getAssociations(Object from,
                                  Object to)
Gets the associations between the classifiers from and to. Returns null if from or to is null or if there is no association between them.

Specified by:
getAssociations in interface org.argouml.model.CoreHelper
Parameters:
from - a classifier
to - a classifier
Returns:
MAssociation

getAllClassifiers

public Collection getAllClassifiers(Object namespace)
Returns all classifiers found in this namespace and in its children.

Specified by:
getAllClassifiers in interface org.argouml.model.CoreHelper
Parameters:
namespace - the given namespace
Returns:
Collection the collection of all classifiers found in the namespace

getAssociations

public Collection getAssociations(Object oclassifier)
Returns all associations for some classifier.

Specified by:
getAssociations in interface org.argouml.model.CoreHelper
Parameters:
oclassifier - the given classifier
Returns:
Collection all associations for the given classifier

getAssociationEnd

public Object getAssociationEnd(Object type,
                                Object assoc)
Returns the associationend between a classifier and an associaton.

Specified by:
getAssociationEnd in interface org.argouml.model.CoreHelper
Parameters:
type - is the classifier
assoc - is the association
Returns:
MAssociationEnd

getAllContents

public 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.

Specified by:
getAllContents in interface org.argouml.model.CoreHelper
Parameters:
clazz - is the classifier
Returns:
Collection

getAllAttributes

public Collection getAllAttributes(Object clazz)
Returns all attributes of some classifier and of its parents.

Specified by:
getAllAttributes in interface org.argouml.model.CoreHelper
Parameters:
clazz - is the classifier
Returns:
Collection

getSource

public Object getSource(Object relationship)
Returns the source of a relation. The source of a relation is defined as the modelelement that propagates this relation. If there are more then 1 sources, only the first is returned. If there is no source, null is returned. Examples of sources include classifiers that are types to associationends, usecases that are bases to extend and include relations and so on. A source is allways the start from the arrow in the fig, the destination the end.

This method also works to get the source of a Link.

TODO: move this method to a generic ModelHelper

Specified by:
getSource in interface org.argouml.model.CoreHelper
Parameters:
relationship - is the relation
Returns:
Object

getDestination

public Object getDestination(Object relationship)
Returns the destination of a relation. The destination of a relation is defined as the modelelement that receives this relation. If there are more then 1 destinations, only the first is returned. If there is no destination, null is returned. Examples of sources include classifiers that are types to associationends, usecases that are bases to extend and include relations and so on. In the case of an association, the destination is defined as the type of the second element in the connections list.

This method also works for links.

TODO: move this method to a generic ModelHelper

Specified by:
getDestination in interface org.argouml.model.CoreHelper
Parameters:
relationship - is the relation
Returns:
object

getDependencies

public Collection getDependencies(Object supplierObj,
                                  Object clientObj)
Returns the dependencies between some supplier modelelement and some client modelelement. Does not return the vica versa relationship (dependency 'from client to supplier').

Specified by:
getDependencies in interface org.argouml.model.CoreHelper
Parameters:
supplierObj - a MModelElement
clientObj - a MModelElement
Returns:
Collection

getRelationships

public Collection getRelationships(Object source,
                                   Object dest)
Returns all relationships between the source and dest modelelement and vica versa.

Specified by:
getRelationships in interface org.argouml.model.CoreHelper
Parameters:
source - is the source model element
dest - is the destination model element
Returns:
Collection

isValidNamespace

public boolean isValidNamespace(Object mObj,
                                Object nsObj)
Returns true if some modelelement may be owned by the given namespace.

Specified by:
isValidNamespace in interface org.argouml.model.CoreHelper
Parameters:
mObj - a MModelElement
nsObj - a MNamespace
Returns:
boolean

isValidNamespace

private boolean isValidNamespace(ru.novosoft.uml.behavior.collaborations.MCollaboration collab,
                                 ru.novosoft.uml.foundation.core.MNamespace ns)

isValidNamespace

private boolean isValidNamespace(ru.novosoft.uml.foundation.core.MGeneralization gen,
                                 ru.novosoft.uml.foundation.core.MNamespace ns)

isValidNamespace

private boolean isValidNamespace(ru.novosoft.uml.foundation.core.MStructuralFeature struc,
                                 ru.novosoft.uml.foundation.core.MNamespace ns)

isValidNamespace

private boolean isValidNamespace(ru.novosoft.uml.foundation.core.MAssociation assoc,
                                 ru.novosoft.uml.foundation.core.MNamespace ns)

isValidNamespace

private boolean isValidNamespace(ru.novosoft.uml.foundation.core.MGeneralizableElement gen,
                                 ru.novosoft.uml.foundation.core.MNamespace ns)

getFirstSharedNamespace

public Object getFirstSharedNamespace(Object ns1,
                                      Object ns2)
Gets the first namespace two namespaces share. That is: it returns the first namespace that owns the given namespaces itself or some owner of the given namespaces.

Specified by:
getFirstSharedNamespace in interface org.argouml.model.CoreHelper
Parameters:
ns1 - is the first name space
ns2 - is the second name space
Returns:
MNamespace

getAllPossibleNamespaces

public Collection getAllPossibleNamespaces(Object modelElement,
                                           Object model)
Returns all possible namespaces that may be selected by some given modelelement. Which namespaces are allowed, is decided in the method isValidNamespace.

Specified by:
getAllPossibleNamespaces in interface org.argouml.model.CoreHelper
Parameters:
modelElement - is the model element
model - the model to search
Returns:
Collection

getChildren

public Collection getChildren(Object o)
Returns all children from some given generalizableelement on all levels (the complete tree excluding the generalizable element itself).

Specified by:
getChildren in interface org.argouml.model.CoreHelper
Parameters:
o - is the generalizable element
Returns:
Collection
Throws:
IllegalStateException - if there is a circular reference.

getChildren

private void getChildren(Collection currentChildren,
                         ru.novosoft.uml.foundation.core.MGeneralization gen)
Adds all children recursively to the Collection in the first argument.

Parameters:
currentChildren - collection to collect them in.
gen - element whose children are added.
Throws:
IllegalStateException - if there is a circular reference.

getAllRealizedInterfaces

public Collection getAllRealizedInterfaces(Object o)
Returns all interfaces that are realized by the given class or by its superclasses. It's possible that interfaces occur twice in the collection returned. In that case there is a double reference to that interface.

Specified by:
getAllRealizedInterfaces in interface org.argouml.model.CoreHelper
Parameters:
o - is the given class
Returns:
Collection

internalGetAllRealizedInterfaces

private Collection internalGetAllRealizedInterfaces(Object o,
                                                    Collection col,
                                                    Set visited)
Helper method for getAllRealizedInterfaces.

Parameters:
o -
col -
visited -
Returns:
Collection

hasCompositeEnd

public final boolean hasCompositeEnd(Object association)
Specified by:
hasCompositeEnd in interface org.argouml.model.CoreHelper
Parameters:
association - the association to be investigated
Returns:
true if one of the association ends of the given association is of the composite kind

equalsAggregationKind

public final boolean equalsAggregationKind(Object associationEnd,
                                           String kindType)
Specified by:
equalsAggregationKind in interface org.argouml.model.CoreHelper
Parameters:
associationEnd - is the association end
kindType - the MAggregationKind as a string in lower case letter, eg: composite.
Returns:
true if the aggregation kinds are the same.

removeAnnotatedElement

public void removeAnnotatedElement(Object handle,
                                   Object me)
Remove the given modelelement from a given comment.

Specified by:
removeAnnotatedElement in interface org.argouml.model.CoreHelper
Parameters:
handle - MComment
me - MModelElement

removeClientDependency

public void removeClientDependency(Object handle,
                                   Object dep)
This method removes a dependency from a model element.

Specified by:
removeClientDependency in interface org.argouml.model.CoreHelper
Parameters:
handle - is the model element
dep - is the dependency

removeConstraint

public void removeConstraint(Object handle,
                             Object cons)
Remove the given constraint from a given ModelElement.

Specified by:
removeConstraint in interface org.argouml.model.CoreHelper
Parameters:
handle - ModelElement
cons - Constraint

removeOwnedElement

public void removeOwnedElement(Object handle,
                               Object value)
Removes a owned model element from a namespace.

Specified by:
removeOwnedElement in interface org.argouml.model.CoreHelper
Parameters:
handle - is the name space
value - is the model element

removeParameter

public void removeParameter(Object handle,
                            Object parameter)
This method removes a parameter from an operation.

Specified by:
removeParameter in interface org.argouml.model.CoreHelper
Parameters:
handle - The operation.
parameter - The parameter.

removeSourceFlow

public void removeSourceFlow(Object handle,
                             Object flow)
Remove a source flow from a model element.

Specified by:
removeSourceFlow in interface org.argouml.model.CoreHelper
Parameters:
handle - The model element.
flow - The flow.

removeSupplierDependency

public void removeSupplierDependency(Object supplier,
                                     Object dependency)
Adds a supplier dependency to some modelelement.

Specified by:
removeSupplierDependency in interface org.argouml.model.CoreHelper
Parameters:
supplier - the supplier
dependency - the dependency

removeTaggedValue

public 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.

Specified by:
removeTaggedValue in interface org.argouml.model.CoreHelper
Parameters:
handle - the model element to remove the tagged value from
name - the name of the tagged value
Throws:
IllegalArgumentException - if handle isn't a model element

removeTargetFlow

public void removeTargetFlow(Object handle,
                             Object flow)
Add a target flow to a model element.

Specified by:
removeTargetFlow in interface org.argouml.model.CoreHelper
Parameters:
handle - The model element.
flow - The flow to add.

addAnnotatedElement

public void addAnnotatedElement(Object comment,
                                Object annotatedElement)
Adds an annotated element to a comment.

Specified by:
addAnnotatedElement in interface org.argouml.model.CoreHelper
Parameters:
comment - The comment to which the element is annotated
annotatedElement - The element to annotate

addClient

public void addClient(Object handle,
                      Object element)
Adds a client model element to some dependency.

Specified by:
addClient in interface org.argouml.model.CoreHelper
Parameters:
handle - dependency.
element - The model element.
Throws:
IllegalArgumentException - if the handle is not a dependency or the element is not a model element.

addClientDependency

public void addClientDependency(Object handle,
                                Object dependency)
Adds a client dependency to some modelelement.

Specified by:
addClientDependency in interface org.argouml.model.CoreHelper
Parameters:
handle - the modelelement
dependency - the dependency

addComment

public void addComment(Object element,
                       Object comment)
Add a new comment to a model element.

Specified by:
addComment in interface org.argouml.model.CoreHelper
Parameters:
element - the element to which the comment is to be added
comment - the comment for the model element

addConnection

public void addConnection(Object handle,
                          Object connection)
Add an End to a connection.

Specified by:
addConnection in interface org.argouml.model.CoreHelper
Parameters:
handle - Association or Link
connection - AssociationEnd or LinkEnd

addConstraint

public void addConstraint(Object handle,
                          Object mc)
Adds a constraint to some model element.

Specified by:
addConstraint in interface org.argouml.model.CoreHelper
Parameters:
handle - model element
mc - constraint

addDeploymentLocation

public void addDeploymentLocation(Object handle,
                                  Object node)
Specified by:
addDeploymentLocation in interface org.argouml.model.CoreHelper
Parameters:
handle - Component
node - Node

addFeature

public void addFeature(Object handle,
                       int index,
                       Object f)
Adds a feature to some classifier.

Specified by:
addFeature in interface org.argouml.model.CoreHelper
Parameters:
handle - classifier
index - position
f - feature

addFeature

public void addFeature(Object handle,
                       Object f)
Adds a feature to some classifier.

Specified by:
addFeature in interface org.argouml.model.CoreHelper
Parameters:
handle - classifier
f - feature

addLink

public void addLink(Object handle,
                    Object link)
Add the given Link to the given Link or Association.

Specified by:
addLink in interface org.argouml.model.CoreHelper
Parameters:
handle - the Link or Association
link - Link

addMethod

public void addMethod(Object handle,
                      Object m)
Adds a method to some operation and copies the op's attributes to the method.

Specified by:
addMethod in interface org.argouml.model.CoreHelper
Parameters:
handle - is the operation
m - is the method

addOwnedElement

public void addOwnedElement(Object handle,
                            Object me)
Adds a model element to some namespace.

Specified by:
addOwnedElement in interface org.argouml.model.CoreHelper
Parameters:
handle - namespace
me - model element

addParameter

public void addParameter(Object handle,
                         int index,
                         Object parameter)
Add a Parameter to the given object at given location.

Specified by:
addParameter in interface org.argouml.model.CoreHelper
Parameters:
handle - The object that will get the Parameter: MEvent, MBehavioralFeature.
index - the location
parameter - Object that will be added

addParameter

public void addParameter(Object handle,
                         Object parameter)
Add a Parameter to the given object.

Specified by:
addParameter in interface org.argouml.model.CoreHelper
Parameters:
handle - The object that will get the Parameter: MObjectFlowState, MEvent, MBehavioralFeature, MClassifier.
parameter - Object that will be added

addRaisedSignal

public void addRaisedSignal(Object handle,
                            Object sig)
Add a raised Signal to a Message or Operation.

Specified by:
addRaisedSignal in interface org.argouml.model.CoreHelper
Parameters:
handle - the Message or Operation
sig - the Signal that is raised

addSourceFlow

public void addSourceFlow(Object handle,
                          Object flow)
Add a source flow to a model element.

Specified by:
addSourceFlow in interface org.argouml.model.CoreHelper
Parameters:
handle - The model element.
flow - The flow.

addSupplier

public void addSupplier(Object handle,
                        Object element)
Adds a supplier classifier to some abstraction.

Specified by:
addSupplier in interface org.argouml.model.CoreHelper
Parameters:
handle - abstraction
element - supplier model element

addSupplierDependency

public void addSupplierDependency(Object supplier,
                                  Object dependency)
Adds a supplier dependency to some modelelement.

Specified by:
addSupplierDependency in interface org.argouml.model.CoreHelper
Parameters:
supplier - the supplier
dependency - the dependency

addTaggedValue

public void addTaggedValue(Object handle,
                           Object taggedValue)
Adds a TaggedValue to a ModelElement.

Specified by:
addTaggedValue in interface org.argouml.model.CoreHelper
Parameters:
handle - ModelElement
taggedValue - TaggedValue

addTargetFlow

public void addTargetFlow(Object handle,
                          Object flow)
Add a target flow to a model element.

Specified by:
addTargetFlow in interface org.argouml.model.CoreHelper
Parameters:
handle - The model element.
flow - The flow to add.

setAbstract

public void setAbstract(Object handle,
                        boolean flag)
Sets if of some model element is abstract.

Specified by:
setAbstract in interface org.argouml.model.CoreHelper
Parameters:
handle - is the classifier
flag - is true if it should be abstract

setActive

public void setActive(Object handle,
                      boolean active)
Makes a Class active.

Specified by:
setActive in interface org.argouml.model.CoreHelper
Parameters:
handle - Class
active - boolean

setAggregation

public void setAggregation(Object handle,
                           Object aggregationKind)
Sets the aggregation of some model element.

Specified by:
setAggregation in interface org.argouml.model.CoreHelper
Parameters:
handle - the model element to set aggregation
aggregationKind - the aggregation kind

setAnnotatedElements

public void setAnnotatedElements(Object handle,
                                 Collection elems)
Sets the list of annotated elements of the given comment.

Specified by:
setAnnotatedElements in interface org.argouml.model.CoreHelper
Parameters:
handle - the given comment
elems - the list of annotated modelelements

setAssociation

public void setAssociation(Object handle,
                           Object association)
Sets the association of some model element.

Specified by:
setAssociation in interface org.argouml.model.CoreHelper
Parameters:
handle - the model element to set association
association - is the association

setLeaf

public void setLeaf(Object handle,
                    boolean flag)
Sets if some model element is a leaf.

Specified by:
setLeaf in interface org.argouml.model.CoreHelper
Parameters:
handle - model element
flag - is true if it is a leaf.

setRaisedSignals

public void setRaisedSignals(Object handle,
                             Collection raisedSignals)
Sets the raised signals of some behavioural feature.

Specified by:
setRaisedSignals in interface org.argouml.model.CoreHelper
Parameters:
handle - the behavioural feature
raisedSignals - the raised signals

setBody

public void setBody(Object handle,
                    Object expr)
Sets a body of a given Method, Constraint or Expression.

Specified by:
setBody in interface org.argouml.model.CoreHelper
Parameters:
handle - is the method, expression
expr - is the body string for the expression

setChangeability

public void setChangeability(Object handle,
                             Object ck)
Set the Changeability of a StructuralFeature or AssociationEnd.

Specified by:
setChangeability in interface org.argouml.model.CoreHelper
Parameters:
handle - StructuralFeature or AssociationEnd
ck - ChangeableKind

setChangeable

public void setChangeable(Object handle,
                          boolean flag)
Set the changeability of some feature.

Specified by:
setChangeable in interface org.argouml.model.CoreHelper
Parameters:
handle - is the feature
flag - is the changeability flag

setChild

public void setChild(Object handle,
                     Object child)
Set the child for a generalization.

Specified by:
setChild in interface org.argouml.model.CoreHelper
Parameters:
handle - Generalization
child - GeneralizableElement

setConcurrency

public void setConcurrency(Object handle,
                           Object concurrencyKind)
Set the concurrency of some operation.

Specified by:
setConcurrency in interface org.argouml.model.CoreHelper
Parameters:
handle - is the operation
concurrencyKind - is the concurrency

setConnections

public void setConnections(Object handle,
                           Collection elems)
Sets the list of connections of the given association or link.

Specified by:
setConnections in interface org.argouml.model.CoreHelper
Parameters:
handle - the given association or link
elems - the list of association-ends or link-ends

setDefaultValue

public void setDefaultValue(Object handle,
                            Object expr)
Sets a default value of some parameter.

Specified by:
setDefaultValue in interface org.argouml.model.CoreHelper
Parameters:
handle - is the parameter
expr - is the expression

setDiscriminator

public void setDiscriminator(Object handle,
                             String discriminator)
Specified by:
setDiscriminator in interface org.argouml.model.CoreHelper
Parameters:
handle - a generalization
discriminator - the discriminator to set

setFeature

public void setFeature(Object elem,
                       int i,
                       Object impl)
Set the feature at the given position.

Specified by:
setFeature in interface org.argouml.model.CoreHelper
Parameters:
elem - The classifier to set.
i - The position. Start with 0.
impl - The feature to set.

setFeatures

public void setFeatures(Object handle,
                        Collection features)
Sets the features of some model element.

Specified by:
setFeatures in interface org.argouml.model.CoreHelper
Parameters:
handle - the model element to set features to
features - the list of features

setImplementationLocation

public void setImplementationLocation(Object handle,
                                      Object component)
Set the ImplementationLocation of the given ElementResidence to the given Component.

Specified by:
setImplementationLocation in interface org.argouml.model.CoreHelper
Parameters:
handle - the ElementResidence
component - the Component

setInitialValue

public void setInitialValue(Object at,
                            Object expr)
Sets an initial value.

Specified by:
setInitialValue in interface org.argouml.model.CoreHelper
Parameters:
at - attribute that we set the initial value of
expr - that is the value to set. Can be null.

setKind

public void setKind(Object handle,
                    Object kind)
Set some parameters kind.

Specified by:
setKind in interface org.argouml.model.CoreHelper
Parameters:
handle - is the parameter
kind - is the directionkind

setKindToIn

public void setKindToIn(Object handle)
Set some parameters kind to 'in'.

Specified by:
setKindToIn in interface org.argouml.model.CoreHelper
Parameters:
handle - is the parameter

setKindToInOut

public void setKindToInOut(Object handle)
Set some parameters kind to 'in/out'.

Specified by:
setKindToInOut in interface org.argouml.model.CoreHelper
Parameters:
handle - is the parameter

setKindToOut

public void setKindToOut(Object handle)
Set some parameters kind to 'out'.

Specified by:
setKindToOut in interface org.argouml.model.CoreHelper
Parameters:
handle - is the parameter

setKindToReturn

public void setKindToReturn(Object handle)
Set some parameters kind to 'return'.

Specified by:
setKindToReturn in interface org.argouml.model.CoreHelper
Parameters:
handle - is the parameter

setModelElementContainer

public void setModelElementContainer(Object handle,
                                     Object container)
Sets the container that owns the handle. This must be set correctly so every modelelement except the root model does have an owner. Otherwise the saving/loading will fail.

Warning: when changing the implementation of this method be warned that the sequence of the if then else tree DOES matter. Most notabely, do not move the setNamespace method any level up in the tree.

Warning: the implementation does not support setting the owner of actions. Use setState1 etc. on action for that goal

Specified by:
setModelElementContainer in interface org.argouml.model.CoreHelper
Parameters:
handle - The modelelement that must be added to the container
container - The owning modelelement
Throws:
IllegalArgumentException - when the handle or container is null or if the handle cannot be added to the container.

setMultiplicity

public void setMultiplicity(Object handle,
                            Object arg)
Sets a multiplicity of some model element.

Specified by:
setMultiplicity in interface org.argouml.model.CoreHelper
Parameters:
handle - model element
arg - multiplicity as string OR multiplicity object

setName

public void setName(Object handle,
                    String name)
Sets a name of some modelelement.

Specified by:
setName in interface org.argouml.model.CoreHelper
Parameters:
handle - is the model element
name - to set

setNamespace

public void setNamespace(Object handle,
                         Object ns)
Sets a namespace of some modelelement.

Specified by:
setNamespace in interface org.argouml.model.CoreHelper
Parameters:
handle - is the model element
ns - is the namespace. Can be null.

setNavigable

public void setNavigable(Object handle,
                         boolean flag)
Sets the navigability of some association end.

Specified by:
setNavigable in interface org.argouml.model.CoreHelper
Parameters:
handle - is the association end
flag - is the navigability flag

setOrdering

public void setOrdering(Object handle,
                        Object ok)
Set the OrderingKind of a given AssociationEnd.

Specified by:
setOrdering in interface org.argouml.model.CoreHelper
Parameters:
handle - AssociationEnd
ok - OrderingKind

setOwner

public void setOwner(Object handle,
                     Object owner)
Set the owner of a Feature.

Specified by:
setOwner in interface org.argouml.model.CoreHelper
Parameters:
handle - Feature
owner - Classifier or null

setOwnerScope

public void setOwnerScope(Object handle,
                          Object os)
Specified by:
setOwnerScope in interface org.argouml.model.CoreHelper
Parameters:
handle - Feature
os - ScopeKind

setParameters

public void setParameters(Object handle,
                          Collection parameters)
Sets the parameters of a classifier, event, objectflowstate or behavioralfeature.

Specified by:
setParameters in interface org.argouml.model.CoreHelper
Parameters:
handle - the classifier, event, objectflowstate or behavioralfeature
parameters - is a Collection of parameters

setParent

public void setParent(Object handle,
                      Object parent)
Sets the parent of a generalization.

Specified by:
setParent in interface org.argouml.model.CoreHelper
Parameters:
handle - generalization
parent - generalizable element (parent)

setPowertype

public void setPowertype(Object handle,
                         Object pt)
Set the PowerType of a Generalization.

Specified by:
setPowertype in interface org.argouml.model.CoreHelper
Parameters:
handle - Generalization
pt - Classifier

setQualifiers

public void setQualifiers(Object handle,
                          Collection elems)
Sets the qualified attributes of an association end.

Specified by:
setQualifiers in interface org.argouml.model.CoreHelper
Parameters:
handle - the association end
elems - is a Collection of qualifiers

setQuery

public void setQuery(Object handle,
                     boolean flag)
Sets the query flag of a behavioral feature.

Specified by:
setQuery in interface org.argouml.model.CoreHelper
Parameters:
handle - is the behavioral feature
flag - is the query flag

setResident

public void setResident(Object handle,
                        Object resident)
Specified by:
setResident in interface org.argouml.model.CoreHelper
Parameters:
handle - ElementResidence
resident - ModelElement or null

setResidents

public void setResidents(Object handle,
                         Collection residents)
Sets the residents of some model element.

Specified by:
setResidents in interface org.argouml.model.CoreHelper
Parameters:
handle - the model element
residents - collection

setRoot

public void setRoot(Object handle,
                    boolean flag)
Sets if some model element is a root.

Specified by:
setRoot in interface org.argouml.model.CoreHelper
Parameters:
handle - model element
flag - is true if it is a root

setSources

public void setSources(Object handle,
                       Collection specifications)
Specified by:
setSources in interface org.argouml.model.CoreHelper
Parameters:
handle - Flow
specifications - the collection of ModelEvents (sourceFlow)

setSpecification

public void setSpecification(Object handle,
                             boolean specification)
Set the Specification flag for a ModelElement.

Specified by:
setSpecification in interface org.argouml.model.CoreHelper
Parameters:
handle - ModelElement
specification - boolean

setSpecifications

public void setSpecifications(Object handle,
                              Collection specifications)
Sets the specifications of some association end.

Specified by:
setSpecifications in interface org.argouml.model.CoreHelper
Parameters:
handle - the association end
specifications - collection

setStereotype

public void setStereotype(Object handle,
                          Object stereo)
Sets the stereotype of some modelelement. The method also copies a stereotype that is not a part of the current model to the current model.

TODO: Currently does not copy the stereotype, but changes the namespace to the new model (kidnapping it). That might possibly be dangerous, especially if more complex profile models are developed. This documentation should say what is supposed to be done. I think it would have been better if the caller had been responsible for the stereotype being in the right model and been adviced of eg ModelManagementHelper.getCorrespondingElement(...). Or if that had been used here. This function could possibly assert that the caller had got it right.

Specified by:
setStereotype in interface org.argouml.model.CoreHelper
Parameters:
handle - model element
stereo - stereotype

setTaggedValue

public void setTaggedValue(Object handle,
                           String tag,
                           String value)
Sets a tagged value of some modelelement.

Specified by:
setTaggedValue in interface org.argouml.model.CoreHelper
Parameters:
handle - is the model element
tag - is the tag name (a string)
value - is the value

setTaggedValues

public void setTaggedValues(Object handle,
                            Collection taggedValues)
Set the TaggedValues of a ModelElement.

Specified by:
setTaggedValues in interface org.argouml.model.CoreHelper
Parameters:
handle - ModelElement
taggedValues - Collection of TaggedValues

setTargetScope

public void setTargetScope(Object handle,
                           Object scopeKind)
Set the target scope of some association end or structural feature.

Specified by:
setTargetScope in interface org.argouml.model.CoreHelper
Parameters:
handle - the model element
scopeKind - the target scope

setType

public void setType(Object handle,
                    Object type)
Sets the type of some parameter.

Specified by:
setType in interface org.argouml.model.CoreHelper
Parameters:
handle - is the model element
type - is the type (a classifier)

setUUID

public void setUUID(Object handle,
                    String uuid)
Set the UUID of this element.

Specified by:
setUUID in interface org.argouml.model.CoreHelper
Parameters:
handle - base element (MBase type)
uuid - is the UUID

setVisibility

public void setVisibility(Object handle,
                          Object visibility)
Set the visibility of some modelelement.

Specified by:
setVisibility in interface org.argouml.model.CoreHelper
Parameters:
handle - element
visibility - is the visibility

removeDeploymentLocation

public void removeDeploymentLocation(Object handle,
                                     Object node)
Specified by:
removeDeploymentLocation in interface org.argouml.model.CoreHelper
Parameters:
handle - Component
node - Node


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook