org.argouml.model
Class AbstractCoreHelperDecorator

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

public abstract class AbstractCoreHelperDecorator
extends java.lang.Object
implements CoreHelper

An abstract Decorator for the CoreHelper.


Constructor Summary
protected AbstractCoreHelperDecorator(CoreHelper component)
          Construct a new AbstractCoreHelperDecorator.
 
Method Summary
 void addAllStereotypes(java.lang.Object modelElement, java.util.Collection stereotypes)
          Add a collection of stereotype to a ModelElement.
 void addAnnotatedElement(java.lang.Object comment, java.lang.Object annotatedElement)
          Add an annotated element to a comment.
 void addClient(java.lang.Object handle, java.lang.Object element)
          Add a client model element to a Dependency.
 void addClientDependency(java.lang.Object handle, java.lang.Object dependency)
          Add a client Dependency to a ModelElement.
 void addComment(java.lang.Object element, java.lang.Object comment)
          Add a new comment to a ModelElement.
 void addConnection(java.lang.Object handle, int position, java.lang.Object connection)
          Add an End to a connection.
 void addConnection(java.lang.Object handle, java.lang.Object connection)
          Add an End to a connection.
 void addConstraint(java.lang.Object handle, java.lang.Object mc)
          Add a constraint to a ModelElement.
 void addDeploymentLocation(java.lang.Object handle, java.lang.Object node)
           
 void addElementResidence(java.lang.Object handle, java.lang.Object residence)
          Add an ElementResidence.
 void addFeature(java.lang.Object handle, int index, java.lang.Object f)
          Add a feature to a Classifier.
 void addFeature(java.lang.Object handle, java.lang.Object f)
          Add a feature to a Classifier.
 void addLink(java.lang.Object handle, java.lang.Object link)
          Add the given Link to the given Link or Association.
 void addLiteral(java.lang.Object handle, int index, java.lang.Object literal)
          Add an EnumerationLiteral to an Enumeration at the specified position.
 void addMethod(java.lang.Object handle, java.lang.Object m)
          Add a method to an Operation and copy the values of the Operation's visibility and scope attributes to the Method.
 void addOwnedElement(java.lang.Object handle, java.lang.Object me)
          Add a ModelElement to a Namespace.
 void addParameter(java.lang.Object handle, int index, java.lang.Object parameter)
          Add a Parameter to the given object at given location.
 void addParameter(java.lang.Object handle, java.lang.Object parameter)
          Add a Parameter to the given object.
 void addQualifier(java.lang.Object handle, int index, java.lang.Object qualifier)
           
 void addRaisedSignal(java.lang.Object handle, java.lang.Object sig)
          Add a raised Signal to a Message.
 void addSourceFlow(java.lang.Object handle, java.lang.Object flow)
          Add a source flow to a ModelElement.
 void addStereotype(java.lang.Object modelElement, java.lang.Object stereotype)
          Add a stereotype to a ModelElement.
 void addSupplier(java.lang.Object handle, java.lang.Object element)
          Add a supplier to a Dependency.
 void addSupplierDependency(java.lang.Object supplier, java.lang.Object dependency)
          Add a supplier dependency to a ModelElement.
 void addTargetFlow(java.lang.Object handle, java.lang.Object flow)
          Add a target flow to a ModelElement.
 void addTemplateArgument(java.lang.Object handle, int index, java.lang.Object argument)
          Add a TemplateArgument to the given object at given location.
 void addTemplateArgument(java.lang.Object handle, java.lang.Object argument)
          Add a TemplateArgument to the given object.
 void addTemplateParameter(java.lang.Object handle, int index, java.lang.Object parameter)
          Add a TemplateParameter to the given object at given location.
 void addTemplateParameter(java.lang.Object handle, java.lang.Object parameter)
          Add a TemplateTParameter to the given object.
 void clearStereotypes(java.lang.Object modelElement)
          Remove all stereotypes from a given ModelElement.
 boolean equalsAggregationKind(java.lang.Object associationEnd, java.lang.String kindType)
           
 java.util.Collection getAllAttributes(java.lang.Object clazz)
          Return all Attributes of a Classifier and of its parents.
 java.util.Collection getAllBehavioralFeatures(java.lang.Object element)
          Return all behavioralfeatures found in this element and its children.
 java.util.Collection getAllClasses(java.lang.Object ns)
          Return all classes found in this namespace and in its children.
 java.util.Collection getAllClassifiers(java.lang.Object namespace)
          Return all classifiers found in this namespace and in its children.
 java.util.Collection getAllComponents(java.lang.Object ns)
          Return all components found in this namespace and in its children.
 java.util.Collection getAllDataTypes(java.lang.Object ns)
          Return all components found in this namespace and in its children.
 java.util.Collection getAllInterfaces(java.lang.Object ns)
          Return all interfaces found in this namespace and in its children.
 java.util.Collection getAllMetaDatatypeNames()
          Returns names of all metamodel value elements including datatypes, enumerations, and primitive types.
 java.util.Collection getAllMetatypeNames()
          Returns names of all metatypes in metamodel.
 java.util.Collection getAllNodes(java.lang.Object ns)
          Return all components found in this namespace and in its children.
 java.util.Collection getAllPossibleNamespaces(java.lang.Object modelElement, java.lang.Object model)
          Return all possible namespaces that are valid owners of the given ModelElement as determined by the method isValidNamespace.
 java.util.Collection getAllRealizedInterfaces(java.lang.Object o)
          Return all interfaces that are realized by the given class or by its superclasses.
 java.util.Collection getAllSupertypes(java.lang.Object cls1)
          Return all elements of which this GeneralizableElement is a direct or indirect subtype.
 java.util.Collection getAllVisibleElements(java.lang.Object ns)
          Return a Set containing all ModelElements visible outside of the Namespace.
 java.util.Collection getAssociatedClassifiers(java.lang.Object classifier)
          Gets all classifiers that are associated to the given classifier (have an association relationship with the classifier).
 java.util.Collection getAssociateEndsInh(java.lang.Object classifier1)
          Return all AssociationEnds of a given Classifier plus all AssociationEnds of all of the Classifier's supertypes.
 java.lang.Object getAssociationEnd(java.lang.Object type, java.lang.Object assoc)
          Returns the associationend between a classifier and an associaton.
 java.util.Collection getAssociations(java.lang.Object classifier)
          Return all associations for a Classifier.
 java.util.Collection getAssociations(java.lang.Object from, java.lang.Object to)
          Gets the associations between the classifiers from and to.
 java.util.Collection getAttributesInh(java.lang.Object classifier)
          Return all attributes of a given Classifier, including inherited.
 java.util.List getBehavioralFeatures(java.lang.Object clazz)
          Return all behavioral features of a Classifier.
 java.lang.String getBody(java.lang.Object comment)
          Gets the body of a comment.
 java.util.Collection getChildren(java.lang.Object o)
          Return all children of a given GeneralizableElement on all levels (the complete subtree excluding the GeneralizableElement itself).
protected  CoreHelper getComponent()
          The component we are decorating.
 java.util.Collection getDependencies(java.lang.Object supplier, java.lang.Object client)
          Return the dependencies between a supplier ModelElement and a client ModelElement.
 java.lang.Object getDestination(java.lang.Object relationship)
          Returns the destination of a relation or link.
 java.util.Collection getExtendedClassifiers(java.lang.Object clazz)
          Return all classes that the given GeneralizableElement extends.
 java.util.Collection getExtendingClassifiers(java.lang.Object clazz)
          Return all classifiers that extend a Classifier.
 java.util.Collection getExtendingElements(java.lang.Object clazz)
          Return all elements that extend a Class.
 java.lang.Object getFirstSharedNamespace(java.lang.Object ns1, java.lang.Object ns2)
          Return the first namespace which two namespaces share.
 java.util.Collection getFlows(java.lang.Object source, java.lang.Object target)
          Return all flows connecting from a source ModelElement to a target ModelElement.
 java.lang.Object getGeneralization(java.lang.Object child, java.lang.Object parent)
          Gets the generalization between two GeneralizableElements.
 java.util.Collection getOperationsInh(java.lang.Object classifier)
          Return all operations of a given Classifier, including inherited.
 java.lang.Object getPackageImport(java.lang.Object supplier, java.lang.Object client)
          Return the packageImport (Permission with <<import>> or <<access>> stereotype in UML 1.4) between a supplier Package and a client Namespace, if any.
 java.util.Collection getPackageImports(java.lang.Object client)
          Return all packageImports (Permissions with <<import>> or <<access>> stereotype in UML 1.4) that this Namespace is a client of.
 java.util.Collection getParents(java.lang.Object generalizableElement)
          Return the collection of all direct parents.
 java.util.Collection getRealizedInterfaces(java.lang.Object cls)
          Return all interfaces the given class realizes.
 java.util.Collection getRelationships(java.lang.Object source, java.lang.Object dest)
          Return all relationships between the source and destination ModelElement and vice versa.
 java.util.List getReturnParameters(java.lang.Object operation)
          Return all return parameters for an Operation.
 java.lang.Object getSource(java.lang.Object relationship)
          Return the source of a relation or Link.
 java.lang.Object getSpecification(java.lang.Object object)
          Return the Operation which is the specification for a Method.
 java.util.Collection getSubtypes(java.lang.Object cls)
          Return all Classifiers of which this class is a direct supertype.
 java.util.Collection getSupertypes(java.lang.Object generalizableElement)
          Return the immediate supertypes of a GeneralizableElement.
 boolean hasCompositeEnd(java.lang.Object association)
          Determine whether an Association has at least one AssociationEnd of AggregationKind Composite.
 boolean isSubType(java.lang.Object type, java.lang.Object subType)
          Determine if a meta type is a subtype of another.
 boolean isValidNamespace(java.lang.Object mObj, java.lang.Object nsObj)
          Return true if the given ModelElement may be owned by the given namespace.
 void removeAnnotatedElement(java.lang.Object handle, java.lang.Object me)
          Remove the given ModelElement from a given comment.
 void removeClientDependency(java.lang.Object handle, java.lang.Object dep)
          Remove a dependency from a ModelElement.
 void removeConnection(java.lang.Object handle, java.lang.Object connection)
          Remove a connection between an Association & AssociationEnd or between a Link & LinkEnd.
 void removeConstraint(java.lang.Object handle, java.lang.Object cons)
          Remove the given constraint from a given ModelElement.
 void removeDeploymentLocation(java.lang.Object handle, java.lang.Object node)
          Remove a deployment location.
 void removeElementResidence(java.lang.Object handle, java.lang.Object residence)
          Remove an ElementResidence.
 void removeFeature(java.lang.Object cls, java.lang.Object feature)
          Remove a Feature from a Classifier.
 void removeLiteral(java.lang.Object enu, java.lang.Object literal)
          Remove an EnumerationLiteral from an Enumeration.
 void removeOwnedElement(java.lang.Object handle, java.lang.Object value)
          Remove an owned model element from a namespace.
 void removeParameter(java.lang.Object handle, java.lang.Object parameter)
          Remove a Parameter from an Operation.
 void removeQualifier(java.lang.Object handle, java.lang.Object parameter)
          Remove a Qualifier from a AssociationEnd.
 void removeSourceFlow(java.lang.Object handle, java.lang.Object flow)
          Remove a source flow from a ModelElement.
 void removeStereotype(java.lang.Object modelElement, java.lang.Object stereotype)
          Remove a stereotype from a ModelElement.
 void removeSupplierDependency(java.lang.Object supplier, java.lang.Object dependency)
          Add a supplier dependency to a ModelElement.
 void removeTargetFlow(java.lang.Object handle, java.lang.Object flow)
          Add a target flow to a ModelElement.
 void removeTemplateArgument(java.lang.Object handle, java.lang.Object argument)
          Remove a TemplateArgument from a Binding.
 void removeTemplateParameter(java.lang.Object handle, java.lang.Object parameter)
          Remove a TemplateParameter from a ModelElement.
 void setAbstract(java.lang.Object handle, boolean flag)
          Set the isAbstract attribute of a GeneralizableElement.
 void setActive(java.lang.Object handle, boolean active)
          Set the isActive attribute of a UML Class.
 void setAggregation(java.lang.Object handle, java.lang.Object aggregationKind)
          Set the aggregation attribute of an AssociationEnd.
 void setAnnotatedElements(java.lang.Object handle, java.util.Collection elems)
          Set the list of annotated elements for the given comment.
 void setAssociation(java.lang.Object handle, java.lang.Object association)
          Set the association of a ModelElement.
 void setAttributes(java.lang.Object classifier, java.util.List attributes)
          Replace all attributes of the given classifier by the given collection of attributes.
 void setBody(java.lang.Object handle, java.lang.Object expr)
          Sets a body of a given Method or Constraint.
 void setBody(java.lang.Object handle, java.lang.String body)
          Set the body of a comment.
 void setChangeability(java.lang.Object handle, java.lang.Object ck)
          Deprecated. 
 void setChild(java.lang.Object handle, java.lang.Object child)
          Set the child for a generalization.
 void setConcurrency(java.lang.Object handle, java.lang.Object concurrencyKind)
          Set the concurrency of an Operation.
 void setConnections(java.lang.Object handle, java.util.Collection elems)
          Sets the list of connections of the given association or link.
 void setContainer(java.lang.Object handle, java.lang.Object component)
          Set the Container of the given ElementResidence to the given Component.
 void setDefaultElement(java.lang.Object handle, java.lang.Object element)
          Sets the default ModelEelement of a TemplateParameter.
 void setDefaultValue(java.lang.Object handle, java.lang.Object expr)
          Set the defaultValue of a Parameter.
 void setDiscriminator(java.lang.Object handle, java.lang.String discriminator)
          Set the discriminator of a Generalization.
 void setEnumerationLiterals(java.lang.Object enumeration, java.util.List literals)
          Set the (ordered) list of literals of an Enumeration.
 void setFeature(java.lang.Object elem, int i, java.lang.Object feature)
          Set the Feature of a Classifier at the given position.
 void setFeatures(java.lang.Object handle, java.util.Collection features)
          Sets the features of a Classifier.
 void setInitialValue(java.lang.Object at, java.lang.Object expr)
          Set the initialValue of an Attribute.
 void setKind(java.lang.Object handle, java.lang.Object kind)
          Set the kind of a Parameter or the Pseudostate.
 void setLeaf(java.lang.Object handle, boolean flag)
          Set the isLeaf attribute of a GeneralizableElement.
 void setModelElementContainer(java.lang.Object handle, java.lang.Object container)
          Set the container that owns the handle.
 void setMultiplicity(java.lang.Object handle, java.lang.Object arg)
          Set the multiplicity of a ModelElement.
 void setName(java.lang.Object handle, java.lang.String name)
          Set the name of a ModelElement.
 void setNamespace(java.lang.Object handle, java.lang.Object ns)
          Set the namespace of a ModelElement.
 void setNavigable(java.lang.Object handle, boolean flag)
          Set the navigability of an AssociationEnd.
 void setOperations(java.lang.Object classifier, java.util.List operations)
          Replace all operations of the given classifier by the given list of operations.
 void setOrdering(java.lang.Object handle, java.lang.Object ok)
          Set the OrderingKind of a given AssociationEnd.
 void setOwner(java.lang.Object handle, java.lang.Object owner)
          Set the owner of a Feature or a TagDefinition.
 void setParameter(java.lang.Object handle, java.lang.Object parameter)
          Set the parameter of a TemplateParameter.
 void setParameters(java.lang.Object handle, java.util.Collection parameters)
          Set the parameters of a classifier, event, objectflowstate or behavioralfeature.
 void setParent(java.lang.Object handle, java.lang.Object parent)
          Set the parent of a generalization.
 void setPowertype(java.lang.Object handle, java.lang.Object pt)
          Set the powerType of a Generalization.
 void setQualifiers(java.lang.Object handle, java.util.List elems)
          Set the qualifier attributes of an AssociationEnd.
 void setQuery(java.lang.Object handle, boolean flag)
          Sets the isQuery attribute of a BehavioralFeature.
 void setRaisedSignals(java.lang.Object handle, java.util.Collection raisedSignals)
          Set the raised signals of a BehavioralFeature.
 void setReadOnly(java.lang.Object handle, boolean isReadOnly)
          Set the isReadOnly (UML 2.x) or changeable (UML 1.x) attribute of a StructuralFeature or AssociationEnd.
 void setResident(java.lang.Object handle, java.lang.Object resident)
          Sets the ModelElement of a ElementResidence.
 void setResidents(java.lang.Object handle, java.util.Collection residents)
          Sets the residents of a NodeInstance or ComponentInstance.
 void setRoot(java.lang.Object handle, boolean flag)
          Set the isRoot attribute of a GeneralizableElement.
 void setSources(java.lang.Object handle, java.util.Collection specifications)
           
 void setSpecification(java.lang.Object handle, boolean specification)
          Set the isSpecification attribute for the ElementOwnership of a ModelElement.
 void setSpecifications(java.lang.Object handle, java.util.Collection specifications)
          Set the specifications of an AssociationEnd.
 void setStatic(java.lang.Object handle, boolean isStatic)
          Set the isStatic (UML 2.x) or ownerScope (UML 1.x) attribute of a feature.
 void setTaggedValue(java.lang.Object handle, java.lang.String tag, java.lang.String value)
          Deprecated. 
 void setTargetScope(java.lang.Object handle, java.lang.Object scopeKind)
          Deprecated. 
 void setType(java.lang.Object handle, java.lang.Object type)
          Set the type of a ModelElement.
 void setVisibility(java.lang.Object handle, java.lang.Object visibility)
          Set the visibility of a ModelElement, ElementResidence, ElementImport.
 
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
addRaisedException, setSpecification, setSpecification
 

Constructor Detail

AbstractCoreHelperDecorator

protected AbstractCoreHelperDecorator(CoreHelper component)
Construct a new AbstractCoreHelperDecorator.

Parameters:
component - The component to decorate.
Method Detail

getComponent

protected CoreHelper getComponent()
The component we are decorating.

Returns:
Returns the component.

clearStereotypes

public void clearStereotypes(java.lang.Object modelElement)
Description copied from interface: CoreHelper
Remove all stereotypes from a given ModelElement.

Specified by:
clearStereotypes in interface CoreHelper
Parameters:
modelElement - model element

isSubType

public boolean isSubType(java.lang.Object type,
                         java.lang.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.

getAllSupertypes

public java.util.Collection getAllSupertypes(java.lang.Object cls1)
Description copied from interface: CoreHelper
Return all elements of which this GeneralizableElement is a direct or indirect subtype.

Note: This follows the Generalizations in UML, so the results do not include Interfaces which are connected to Classes by Realizations.

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

getSupertypes

public java.util.Collection getSupertypes(java.lang.Object generalizableElement)
Description copied from interface: CoreHelper
Return the immediate supertypes of a GeneralizableElement.

Specified by:
getSupertypes in interface CoreHelper
Parameters:
generalizableElement - the element you want to have the parents for
Returns:
a collection of the parents, each of which is a GeneralizableElement.

getAssociateEndsInh

public java.util.Collection getAssociateEndsInh(java.lang.Object classifier1)
Description copied from interface: CoreHelper
Return all AssociationEnds of a given Classifier plus all AssociationEnds of all of the Classifier's supertypes.

Note: Until 0.24 this was documented as returning the opposite ends, but the implementation has returned the near ends since at least beginning of the MDR implementation (0.18).

Specified by:
getAssociateEndsInh in interface CoreHelper
Parameters:
classifier1 - the classifier for which to get the association ends
Returns:
a collection of the AssociationEnds

removeFeature

public void removeFeature(java.lang.Object cls,
                          java.lang.Object feature)
Description copied from interface: CoreHelper
Remove a Feature from a Classifier.

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

removeLiteral

public void removeLiteral(java.lang.Object enu,
                          java.lang.Object literal)
Description copied from interface: CoreHelper
Remove an EnumerationLiteral from an Enumeration.

Specified by:
removeLiteral in interface CoreHelper
Parameters:
enu - the enumeration
literal - the literal to be removed

setOperations

public void setOperations(java.lang.Object classifier,
                          java.util.List operations)
Description copied from interface: CoreHelper
Replace all operations of the given classifier by the given list of operations.

Specified by:
setOperations in interface CoreHelper
Parameters:
classifier - the given classifier
operations - the new operations

setAttributes

public void setAttributes(java.lang.Object classifier,
                          java.util.List attributes)
Description copied from interface: CoreHelper
Replace all attributes of the given classifier by the given collection of attributes.

Specified by:
setAttributes in interface CoreHelper
Parameters:
classifier - the classifier
attributes - an ordered list of new attributes

getAttributesInh

public java.util.Collection getAttributesInh(java.lang.Object classifier)
Description copied from interface: CoreHelper
Return 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

getOperationsInh

public java.util.Collection getOperationsInh(java.lang.Object classifier)
Description copied from interface: CoreHelper
Return 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

getParents

public java.util.Collection getParents(java.lang.Object generalizableElement)
Description copied from interface: CoreHelper
Return the collection of all direct parents.

This function is additional operation number 1 for a GeneralizableElement from the UML1.4 standard.

Specified by:
getParents in interface CoreHelper
Parameters:
generalizableElement - the given element
Returns:
a collection of GeneralizableElement

getReturnParameters

public java.util.List getReturnParameters(java.lang.Object operation)
Description copied from interface: CoreHelper
Return all return parameters for an Operation.

Specified by:
getReturnParameters in interface CoreHelper
Parameters:
operation - is the operation.
Returns:
List of parameters of with direction kind of Return.

getSpecification

public java.lang.Object getSpecification(java.lang.Object object)
Description copied from interface: CoreHelper
Return the Operation which is the specification for a Method.

There is also a method in the Facade interface with the same name which may be what you want if you are looking for the specification of something other than a Method.

Specified by:
getSpecification in interface CoreHelper
Parameters:
object - the method you want the realized operation of.
Returns:
an operation, or null.
See Also:
Facade.getSpecification(Object)

getSubtypes

public java.util.Collection getSubtypes(java.lang.Object cls)
Description copied from interface: CoreHelper
Return all Classifiers of which this class is a direct supertype.

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

getAllBehavioralFeatures

public java.util.Collection getAllBehavioralFeatures(java.lang.Object element)
Description copied from interface: CoreHelper
Return all behavioralfeatures found in this element and its children.

Specified by:
getAllBehavioralFeatures in interface CoreHelper
Parameters:
element - is the element
Returns:
Collection

getBehavioralFeatures

public java.util.List getBehavioralFeatures(java.lang.Object clazz)
Description copied from interface: CoreHelper
Return all behavioral features of a Classifier.

Specified by:
getBehavioralFeatures in interface CoreHelper
Parameters:
clazz - The classifier
Returns:
the list with all behavioral features of the classifier

getAllInterfaces

public java.util.Collection getAllInterfaces(java.lang.Object ns)
Description copied from interface: CoreHelper
Return all interfaces found in this namespace and in its children.

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

getAllClasses

public java.util.Collection getAllClasses(java.lang.Object ns)
Description copied from interface: CoreHelper
Return all classes found in this namespace and in its children.

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

getRealizedInterfaces

public java.util.Collection getRealizedInterfaces(java.lang.Object cls)
Description copied from interface: CoreHelper
Return all interfaces the given class realizes.

Specified by:
getRealizedInterfaces in interface CoreHelper
Parameters:
cls - the classifier
Returns:
Collection

getExtendedClassifiers

public java.util.Collection getExtendedClassifiers(java.lang.Object clazz)
Description copied from interface: CoreHelper
Return all classes that the given GeneralizableElement extends.

Specified by:
getExtendedClassifiers in interface CoreHelper
Parameters:
clazz - is the GeneralizableElement
Returns:
Collection

getGeneralization

public java.lang.Object getGeneralization(java.lang.Object child,
                                          java.lang.Object parent)
Description copied from interface: CoreHelper
Gets the generalization between two GeneralizableElements. Returns null if there is none.

Specified by:
getGeneralization in interface CoreHelper
Parameters:
child - is the child GeneralizableElement.
parent - is the parent GeneralizableElement.
Returns:
Generalization

getBody

public java.lang.String getBody(java.lang.Object comment)
Description copied from interface: CoreHelper
Gets the body of a comment.

Specified by:
getBody in interface CoreHelper
Parameters:
comment - the comment
Returns:
the body of the comment

getFlows

public java.util.Collection getFlows(java.lang.Object source,
                                     java.lang.Object target)
Description copied from interface: CoreHelper
Return all flows connecting from a source ModelElement to a target ModelElement.

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

getExtendingElements

public java.util.Collection getExtendingElements(java.lang.Object clazz)
Description copied from interface: CoreHelper
Return all elements that extend a Class.

Specified by:
getExtendingElements in interface CoreHelper
Parameters:
clazz - is the class (a GeneralizableElement)
Returns:
Collection

getExtendingClassifiers

public java.util.Collection getExtendingClassifiers(java.lang.Object clazz)
Description copied from interface: CoreHelper
Return all classifiers that extend a Classifier.

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

getAllComponents

public java.util.Collection getAllComponents(java.lang.Object ns)
Description copied from interface: CoreHelper
Return all components found in this namespace and in its children.

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

getAllDataTypes

public java.util.Collection getAllDataTypes(java.lang.Object ns)
Description copied from interface: CoreHelper
Return all components found in this namespace and in its children.

Specified by:
getAllDataTypes in interface CoreHelper
Parameters:
ns - is the namespace
Returns:
Collection

getAllNodes

public java.util.Collection getAllNodes(java.lang.Object ns)
Description copied from interface: CoreHelper
Return all components found in this namespace and in its children.

Specified by:
getAllNodes in interface CoreHelper
Parameters:
ns - is the namespace
Returns:
Collection

getAssociatedClassifiers

public java.util.Collection getAssociatedClassifiers(java.lang.Object classifier)
Description copied from interface: CoreHelper
Gets all classifiers that are associated to the given classifier (have an association relationship with the classifier).

Specified by:
getAssociatedClassifiers in interface CoreHelper
Parameters:
classifier - an Classifier
Returns:
Collection

getAssociations

public java.util.Collection getAssociations(java.lang.Object from,
                                            java.lang.Object to)
Description copied from interface: CoreHelper
Gets the associations between the classifiers from and to. Returns an empty collection if no Associations are found.

Specified by:
getAssociations in interface CoreHelper
Parameters:
from - a classifier
to - a classifier
Returns:
a Collection with Associations

getAllClassifiers

public java.util.Collection getAllClassifiers(java.lang.Object namespace)
Description copied from interface: CoreHelper
Return all classifiers found in this namespace and in its children.

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

getAssociations

public java.util.Collection getAssociations(java.lang.Object classifier)
Description copied from interface: CoreHelper
Return all associations for a Classifier.

Specified by:
getAssociations in interface CoreHelper
Parameters:
classifier - the given classifier
Returns:
Collection all associations for the given classifier

getAssociationEnd

public java.lang.Object getAssociationEnd(java.lang.Object type,
                                          java.lang.Object assoc)
Description copied from interface: CoreHelper
Returns the associationend between a classifier and an associaton.

Specified by:
getAssociationEnd in interface CoreHelper
Parameters:
type - is the classifier
assoc - is the association
Returns:
An AssociationEnd.

getAllAttributes

public java.util.Collection getAllAttributes(java.lang.Object clazz)
Description copied from interface: CoreHelper
Return all Attributes of a Classifier and of its parents.

Specified by:
getAllAttributes in interface CoreHelper
Parameters:
clazz - is the classifier
Returns:
Collection

getAllVisibleElements

public java.util.Collection getAllVisibleElements(java.lang.Object ns)
Description copied from interface: CoreHelper
Return a Set containing all ModelElements visible outside of the Namespace. This is an "Additional Operation" from the UML spec.

Specified by:
getAllVisibleElements in interface CoreHelper
Parameters:
ns - the given namespace
Returns:
the collection with ModelElements

getSource

public java.lang.Object getSource(java.lang.Object relationship)
Description copied from interface: CoreHelper
Return the source of a relation or Link. 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 always the start from the arrow in the fig, the destination the end.

TODO: move this method to a generic ModelHelper

Specified by:
getSource in interface CoreHelper
Parameters:
relationship - is the relation
Returns:
Object

getDestination

public java.lang.Object getDestination(java.lang.Object relationship)
Description copied from interface: CoreHelper
Returns the destination of a relation or link. 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.

TODO: move this method to a generic ModelHelper

Specified by:
getDestination in interface CoreHelper
Parameters:
relationship - is the relation
Returns:
object

getDependencies

public java.util.Collection getDependencies(java.lang.Object supplier,
                                            java.lang.Object client)
Description copied from interface: CoreHelper
Return the dependencies between a supplier ModelElement and a client ModelElement. Does not return the inverse relationship (dependency 'from client to supplier').

Specified by:
getDependencies in interface CoreHelper
Parameters:
supplier - a ModelElement
client - a ModelElement
Returns:
Collection

getPackageImport

public java.lang.Object getPackageImport(java.lang.Object supplier,
                                         java.lang.Object client)
Description copied from interface: CoreHelper
Return the packageImport (Permission with <<import>> or <<access>> stereotype in UML 1.4) between a supplier Package and a client Namespace, if any.

Specified by:
getPackageImport in interface CoreHelper
Parameters:
supplier - a Package
client - a Namespace
Returns:
the import or null

getPackageImports

public java.util.Collection getPackageImports(java.lang.Object client)
Description copied from interface: CoreHelper
Return all packageImports (Permissions with <<import>> or <<access>> stereotype in UML 1.4) that this Namespace is a client of.

Specified by:
getPackageImports in interface CoreHelper
Parameters:
client - a Namespace
Returns:
Collection of imports

getRelationships

public java.util.Collection getRelationships(java.lang.Object source,
                                             java.lang.Object dest)
Description copied from interface: CoreHelper
Return all relationships between the source and destination ModelElement and vice versa.

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

isValidNamespace

public boolean isValidNamespace(java.lang.Object mObj,
                                java.lang.Object nsObj)
Description copied from interface: CoreHelper
Return true if the given ModelElement may be owned by the given namespace.

Simply returns false if the parameters are not the expected UML elements - any Object is accepted.

Specified by:
isValidNamespace in interface CoreHelper
Parameters:
mObj - a ModelElement
nsObj - a Namespace
Returns:
boolean

getFirstSharedNamespace

public java.lang.Object getFirstSharedNamespace(java.lang.Object ns1,
                                                java.lang.Object ns2)
Description copied from interface: CoreHelper
Return the first namespace which two namespaces share. That is: it returns the first namespace that owns the given namespaces themselves or an owner of the given namespaces.

Specified by:
getFirstSharedNamespace in interface CoreHelper
Parameters:
ns1 - is the first name space
ns2 - is the second name space
Returns:
The Namespace.

getAllPossibleNamespaces

public java.util.Collection getAllPossibleNamespaces(java.lang.Object modelElement,
                                                     java.lang.Object model)
Description copied from interface: CoreHelper
Return all possible namespaces that are valid owners of the given ModelElement as determined by the method isValidNamespace.

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

getChildren

public java.util.Collection getChildren(java.lang.Object o)
Description copied from interface: CoreHelper
Return all children of a given GeneralizableElement on all levels (the complete subtree excluding the GeneralizableElement itself).

Specified by:
getChildren in interface CoreHelper
Parameters:
o - is the GeneralizableElement
Returns:
Collection

getAllRealizedInterfaces

public java.util.Collection getAllRealizedInterfaces(java.lang.Object o)
Description copied from interface: CoreHelper
Return 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 CoreHelper
Parameters:
o - is the given class
Returns:
Collection

hasCompositeEnd

public boolean hasCompositeEnd(java.lang.Object association)
Description copied from interface: CoreHelper
Determine whether an Association has at least one AssociationEnd of AggregationKind Composite.

Specified by:
hasCompositeEnd in interface 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 boolean equalsAggregationKind(java.lang.Object associationEnd,
                                     java.lang.String kindType)
Specified by:
equalsAggregationKind in interface CoreHelper
Parameters:
associationEnd - is the association end
kindType - the AggregationKind as a string in lower case, eg: composite.
Returns:
true if the aggregation kinds are the same.

removeAnnotatedElement

public void removeAnnotatedElement(java.lang.Object handle,
                                   java.lang.Object me)
Description copied from interface: CoreHelper
Remove the given ModelElement from a given comment.

Specified by:
removeAnnotatedElement in interface CoreHelper
Parameters:
handle - Comment
me - ModelElement

removeClientDependency

public void removeClientDependency(java.lang.Object handle,
                                   java.lang.Object dep)
Description copied from interface: CoreHelper
Remove a dependency from a ModelElement.

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

removeConstraint

public void removeConstraint(java.lang.Object handle,
                             java.lang.Object cons)
Description copied from interface: CoreHelper
Remove the given constraint from a given ModelElement.

Specified by:
removeConstraint in interface CoreHelper
Parameters:
handle - ModelElement
cons - Constraint

removeOwnedElement

public void removeOwnedElement(java.lang.Object handle,
                               java.lang.Object value)
Description copied from interface: CoreHelper
Remove an owned model element from a namespace.

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

removeParameter

public void removeParameter(java.lang.Object handle,
                            java.lang.Object parameter)
Description copied from interface: CoreHelper
Remove a Parameter from an Operation.

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

removeQualifier

public void removeQualifier(java.lang.Object handle,
                            java.lang.Object parameter)
Description copied from interface: CoreHelper
Remove a Qualifier from a AssociationEnd.

Specified by:
removeQualifier in interface CoreHelper
Parameters:
handle - the AssociationEnd
parameter - the Qualifier attribute to be removed

removeSourceFlow

public void removeSourceFlow(java.lang.Object handle,
                             java.lang.Object flow)
Description copied from interface: CoreHelper
Remove a source flow from a ModelElement.

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

removeSupplierDependency

public void removeSupplierDependency(java.lang.Object supplier,
                                     java.lang.Object dependency)
Description copied from interface: CoreHelper
Add a supplier dependency to a ModelElement.

Specified by:
removeSupplierDependency in interface CoreHelper
Parameters:
supplier - the supplier
dependency - the dependency

removeStereotype

public void removeStereotype(java.lang.Object modelElement,
                             java.lang.Object stereotype)
Description copied from interface: CoreHelper
Remove a stereotype from a ModelElement.

Specified by:
removeStereotype in interface CoreHelper
Parameters:
modelElement - model element
stereotype - stereotype

removeTargetFlow

public void removeTargetFlow(java.lang.Object handle,
                             java.lang.Object flow)
Description copied from interface: CoreHelper
Add a target flow to a ModelElement.

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

removeTemplateArgument

public void removeTemplateArgument(java.lang.Object handle,
                                   java.lang.Object argument)
Description copied from interface: CoreHelper
Remove a TemplateArgument from a Binding.

Specified by:
removeTemplateArgument in interface CoreHelper
Parameters:
handle - The Binding.
argument - The argument.

removeTemplateParameter

public void removeTemplateParameter(java.lang.Object handle,
                                    java.lang.Object parameter)
Description copied from interface: CoreHelper
Remove a TemplateParameter from a ModelElement.

Specified by:
removeTemplateParameter in interface CoreHelper
Parameters:
handle - The element.
parameter - The parameter.

addAnnotatedElement

public void addAnnotatedElement(java.lang.Object comment,
                                java.lang.Object annotatedElement)
Description copied from interface: CoreHelper
Add an annotated element to a comment.

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

addClient

public void addClient(java.lang.Object handle,
                      java.lang.Object element)
Description copied from interface: CoreHelper
Add a client model element to a Dependency.

Specified by:
addClient in interface CoreHelper
Parameters:
handle - the Dependency.
element - The model element.

addClientDependency

public void addClientDependency(java.lang.Object handle,
                                java.lang.Object dependency)
Description copied from interface: CoreHelper
Add a client Dependency to a ModelElement.

Specified by:
addClientDependency in interface CoreHelper
Parameters:
handle - the ModelElement
dependency - the dependency

addComment

public void addComment(java.lang.Object element,
                       java.lang.Object comment)
Description copied from interface: CoreHelper
Add a new comment to a ModelElement.

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

addConnection

public void addConnection(java.lang.Object handle,
                          java.lang.Object connection)
Description copied from interface: CoreHelper
Add an End to a connection.

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

addConnection

public void addConnection(java.lang.Object handle,
                          int position,
                          java.lang.Object connection)
Description copied from interface: CoreHelper
Add an End to a connection.

Specified by:
addConnection in interface CoreHelper
Parameters:
handle - Association or Link
position - the 0-based position at which to insert the AssociationEnd or LinkEnd
connection - AssociationEnd or LinkEnd

addConstraint

public void addConstraint(java.lang.Object handle,
                          java.lang.Object mc)
Description copied from interface: CoreHelper
Add a constraint to a ModelElement.

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

addDeploymentLocation

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

addFeature

public void addFeature(java.lang.Object handle,
                       int index,
                       java.lang.Object f)
Description copied from interface: CoreHelper
Add a feature to a Classifier.

Specified by:
addFeature in interface CoreHelper
Parameters:
handle - classifier
index - position
f - feature

addFeature

public void addFeature(java.lang.Object handle,
                       java.lang.Object f)
Description copied from interface: CoreHelper
Add a feature to a Classifier.

Specified by:
addFeature in interface CoreHelper
Parameters:
handle - classifier
f - feature

addLiteral

public void addLiteral(java.lang.Object handle,
                       int index,
                       java.lang.Object literal)
Description copied from interface: CoreHelper
Add an EnumerationLiteral to an Enumeration at the specified position.

Specified by:
addLiteral in interface CoreHelper
Parameters:
handle - the enumeration
index - the position
literal - the EnumerationLiteral to be added

addLink

public void addLink(java.lang.Object handle,
                    java.lang.Object link)
Description copied from interface: CoreHelper
Add the given Link to the given Link or Association.

Specified by:
addLink in interface CoreHelper
Parameters:
handle - the Link or Association
link - Link

addMethod

public void addMethod(java.lang.Object handle,
                      java.lang.Object m)
Description copied from interface: CoreHelper
Add a method to an Operation and copy the values of the Operation's visibility and scope attributes to the Method.

Specified by:
addMethod in interface CoreHelper
Parameters:
handle - is the operation
m - is the method

addOwnedElement

public void addOwnedElement(java.lang.Object handle,
                            java.lang.Object me)
Description copied from interface: CoreHelper
Add a ModelElement to a Namespace.

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

addParameter

public void addParameter(java.lang.Object handle,
                         int index,
                         java.lang.Object parameter)
Description copied from interface: CoreHelper
Add a Parameter to the given object at given location.

Specified by:
addParameter in interface CoreHelper
Parameters:
handle - The object that will get the Parameter: Event, BehavioralFeature.
index - the location
parameter - Object that will be added

addParameter

public void addParameter(java.lang.Object handle,
                         java.lang.Object parameter)
Description copied from interface: CoreHelper
Add a Parameter to the given object.

Specified by:
addParameter in interface CoreHelper
Parameters:
handle - The object that will get the Parameter: ObjectFlowState, Event, BehavioralFeature, Classifier.
parameter - Object that will be added

addQualifier

public void addQualifier(java.lang.Object handle,
                         int index,
                         java.lang.Object qualifier)
Specified by:
addQualifier in interface CoreHelper
Parameters:
handle - the Association End
index - the 0-based position at which to insert the Qualifier
qualifier - the Qualifier attribute

addRaisedSignal

public void addRaisedSignal(java.lang.Object handle,
                            java.lang.Object sig)
Description copied from interface: CoreHelper
Add a raised Signal to a Message.

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

addSourceFlow

public void addSourceFlow(java.lang.Object handle,
                          java.lang.Object flow)
Description copied from interface: CoreHelper
Add a source flow to a ModelElement.

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

addAllStereotypes

public void addAllStereotypes(java.lang.Object modelElement,
                              java.util.Collection stereotypes)
Description copied from interface: CoreHelper
Add a collection of stereotype to a ModelElement.

Specified by:
addAllStereotypes in interface CoreHelper
Parameters:
modelElement - model element
stereotypes - stereotype

addStereotype

public void addStereotype(java.lang.Object modelElement,
                          java.lang.Object stereotype)
Description copied from interface: CoreHelper
Add a stereotype to a ModelElement.

Specified by:
addStereotype in interface CoreHelper
Parameters:
modelElement - model element
stereotype - stereotype

addSupplier

public void addSupplier(java.lang.Object handle,
                        java.lang.Object element)
Description copied from interface: CoreHelper
Add a supplier to a Dependency.

Specified by:
addSupplier in interface CoreHelper
Parameters:
handle - the Dependency to which to add the supplier
element - supplier model element

addSupplierDependency

public void addSupplierDependency(java.lang.Object supplier,
                                  java.lang.Object dependency)
Description copied from interface: CoreHelper
Add a supplier dependency to a ModelElement.

Specified by:
addSupplierDependency in interface CoreHelper
Parameters:
supplier - the supplier
dependency - the dependency

addTargetFlow

public void addTargetFlow(java.lang.Object handle,
                          java.lang.Object flow)
Description copied from interface: CoreHelper
Add a target flow to a ModelElement.

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

addTemplateArgument

public void addTemplateArgument(java.lang.Object handle,
                                int index,
                                java.lang.Object argument)
Description copied from interface: CoreHelper
Add a TemplateArgument to the given object at given location.

Specified by:
addTemplateArgument in interface CoreHelper
Parameters:
handle - The object that will get the TemplateParameter
index - the location
argument - Object that will be added

addTemplateArgument

public void addTemplateArgument(java.lang.Object handle,
                                java.lang.Object argument)
Description copied from interface: CoreHelper
Add a TemplateArgument to the given object.

Specified by:
addTemplateArgument in interface CoreHelper
Parameters:
handle - The object that will get the TemplateArgument
argument - Object that will be added

addTemplateParameter

public void addTemplateParameter(java.lang.Object handle,
                                 int index,
                                 java.lang.Object parameter)
Description copied from interface: CoreHelper
Add a TemplateParameter to the given object at given location.

Specified by:
addTemplateParameter in interface CoreHelper
Parameters:
handle - The object that will get the TemplateParameter
index - the location
parameter - Object that will be added

addTemplateParameter

public void addTemplateParameter(java.lang.Object handle,
                                 java.lang.Object parameter)
Description copied from interface: CoreHelper
Add a TemplateTParameter to the given object.

Specified by:
addTemplateParameter in interface CoreHelper
Parameters:
handle - The object that will get the TemplateParameter
parameter - Object that will be added

setAnnotatedElements

public void setAnnotatedElements(java.lang.Object handle,
                                 java.util.Collection elems)
Description copied from interface: CoreHelper
Set the list of annotated elements for the given comment.

Specified by:
setAnnotatedElements in interface CoreHelper
Parameters:
handle - the given comment
elems - the collection of annotated ModelElements

setAssociation

public void setAssociation(java.lang.Object handle,
                           java.lang.Object association)
Description copied from interface: CoreHelper
Set the association of a ModelElement.

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

setRaisedSignals

public void setRaisedSignals(java.lang.Object handle,
                             java.util.Collection raisedSignals)
Description copied from interface: CoreHelper
Set the raised signals of a BehavioralFeature.

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

setBody

public void setBody(java.lang.Object handle,
                    java.lang.Object expr)
Description copied from interface: CoreHelper
Sets a body of a given Method or Constraint.

Specified by:
setBody in interface CoreHelper
Parameters:
handle - The method or constraint.
expr - The body of the expression. If it is a method, this must be a ProcedureExpression. If it is a Constraint, this must be a BooleanExpression.

setChild

public void setChild(java.lang.Object handle,
                     java.lang.Object child)
Description copied from interface: CoreHelper
Set the child for a generalization.

Specified by:
setChild in interface CoreHelper
Parameters:
handle - Generalization
child - GeneralizableElement

setConnections

public void setConnections(java.lang.Object handle,
                           java.util.Collection elems)
Description copied from interface: CoreHelper
Sets the list of connections of the given association or link.

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

setDefaultElement

public void setDefaultElement(java.lang.Object handle,
                              java.lang.Object element)
Description copied from interface: CoreHelper
Sets the default ModelEelement of a TemplateParameter.

Specified by:
setDefaultElement in interface CoreHelper
Parameters:
handle - is the TemplateParameter
element - is the default ModelElement or null

setDefaultValue

public void setDefaultValue(java.lang.Object handle,
                            java.lang.Object expr)
Description copied from interface: CoreHelper
Set the defaultValue of a Parameter.

Specified by:
setDefaultValue in interface CoreHelper
Parameters:
handle - is the Parameter
expr - the Expression to be used as the default value

setDiscriminator

public void setDiscriminator(java.lang.Object handle,
                             java.lang.String discriminator)
Description copied from interface: CoreHelper
Set the discriminator of a Generalization.

Specified by:
setDiscriminator in interface CoreHelper
Parameters:
handle - a Generalization
discriminator - the String representing the discriminator

setFeature

public void setFeature(java.lang.Object elem,
                       int i,
                       java.lang.Object feature)
Description copied from interface: CoreHelper
Set the Feature of a Classifier at the given position.

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

setFeatures

public void setFeatures(java.lang.Object handle,
                        java.util.Collection features)
Description copied from interface: CoreHelper
Sets the features of a Classifier.

Specified by:
setFeatures in interface CoreHelper
Parameters:
handle - the Classifier to set features to
features - the list of features. NOTE: although the API allows any type of Collection, the list of features is ordered, so only a List should be passed here. Other types of collections will be converted to a List in their natural order (which may not be the desired order.

setContainer

public void setContainer(java.lang.Object handle,
                         java.lang.Object component)
Description copied from interface: CoreHelper
Set the Container of the given ElementResidence to the given Component.

Specified by:
setContainer in interface CoreHelper
Parameters:
handle - the ElementResidence
component - the Component

setInitialValue

public void setInitialValue(java.lang.Object at,
                            java.lang.Object expr)
Description copied from interface: CoreHelper
Set the initialValue of an Attribute.

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

setModelElementContainer

public void setModelElementContainer(java.lang.Object handle,
                                     java.lang.Object container)
Description copied from interface: CoreHelper
Set the container that owns the handle.

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

Use a more specific method such as setOwner, setContainer, etc if at all possible, rather than this method.

Specified by:
setModelElementContainer in interface CoreHelper
Parameters:
handle - The ModelElement that must be added to the container
container - The owning ModelElement

setNamespace

public void setNamespace(java.lang.Object handle,
                         java.lang.Object ns)
Description copied from interface: CoreHelper
Set the namespace of a ModelElement.

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

setOwner

public void setOwner(java.lang.Object handle,
                     java.lang.Object owner)
Description copied from interface: CoreHelper
Set the owner of a Feature or a TagDefinition.

Specified by:
setOwner in interface CoreHelper
Parameters:
handle - Feature or TagDefinition
owner - Classifier or null

setStatic

public void setStatic(java.lang.Object handle,
                      boolean isStatic)
Description copied from interface: CoreHelper
Set the isStatic (UML 2.x) or ownerScope (UML 1.x) attribute of a feature. As a special backward compatibility bridge, if passed a UML 1.4 AssociationEnd, it will set the targetScope instead of the ownerScope (since AssociationEnds don't have an ownerScope).

Specified by:
setStatic in interface CoreHelper
Parameters:
handle - feature or association end
isStatic - true if static (Classifier scope in UML 1.x). False is equivalent to the UML 1.x ScopeKind of 'Instance'.

setParameter

public void setParameter(java.lang.Object handle,
                         java.lang.Object parameter)
Description copied from interface: CoreHelper
Set the parameter of a TemplateParameter.

Specified by:
setParameter in interface CoreHelper
Parameters:
handle - the TemplateParameter
parameter - the dummy ModelElement to be used as the parameter

setParameters

public void setParameters(java.lang.Object handle,
                          java.util.Collection parameters)
Description copied from interface: CoreHelper
Set the parameters of a classifier, event, objectflowstate or behavioralfeature.

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

setParent

public void setParent(java.lang.Object handle,
                      java.lang.Object parent)
Description copied from interface: CoreHelper
Set the parent of a generalization.

Specified by:
setParent in interface CoreHelper
Parameters:
handle - generalization
parent - GeneralizableElement (parent)

setQualifiers

public void setQualifiers(java.lang.Object handle,
                          java.util.List elems)
Description copied from interface: CoreHelper
Set the qualifier attributes of an AssociationEnd.

Specified by:
setQualifiers in interface CoreHelper
Parameters:
handle - the association end
elems - List of Attributes to be set as qualifiers

setResident

public void setResident(java.lang.Object handle,
                        java.lang.Object resident)
Description copied from interface: CoreHelper
Sets the ModelElement of a ElementResidence.

Specified by:
setResident in interface CoreHelper
Parameters:
handle - ElementResidence
resident - ModelElement or null

setResidents

public void setResidents(java.lang.Object handle,
                         java.util.Collection residents)
Description copied from interface: CoreHelper
Sets the residents of a NodeInstance or ComponentInstance.

Specified by:
setResidents in interface CoreHelper
Parameters:
handle - the NodeInstance or ComponentInstance
residents - collection of ComponentInstances (in case the handle is a NodeInstance) or Instances (in case the handle is a ComponentInstance)

setSources

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

setSpecifications

public void setSpecifications(java.lang.Object handle,
                              java.util.Collection specifications)
Description copied from interface: CoreHelper
Set the specifications of an AssociationEnd.

Specified by:
setSpecifications in interface CoreHelper
Parameters:
handle - the association end
specifications - collection

setTaggedValue

@Deprecated
public void setTaggedValue(java.lang.Object handle,
                                      java.lang.String tag,
                                      java.lang.String value)
Deprecated. 

Description copied from interface: CoreHelper
Set a tagged value of a ModelElement.

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

setType

public void setType(java.lang.Object handle,
                    java.lang.Object type)
Description copied from interface: CoreHelper
Set the type of a ModelElement.

Specified by:
setType in interface CoreHelper
Parameters:
handle - a ModelElement which is one of: Parameter, AssociationEnd, StructuralFeature, ClassifierInState, or ObjectFlowState.
type - a Classifier representing the type

removeDeploymentLocation

public void removeDeploymentLocation(java.lang.Object handle,
                                     java.lang.Object node)
Description copied from interface: CoreHelper
Remove a deployment location.

Specified by:
removeDeploymentLocation in interface CoreHelper
Parameters:
handle - Component from which to remove deploymentLocation
node - Node to be removed

setAbstract

public void setAbstract(java.lang.Object handle,
                        boolean flag)
Description copied from interface: CoreHelper
Set the isAbstract attribute of a GeneralizableElement.

Specified by:
setAbstract in interface CoreHelper
Parameters:
handle - the GeneralizableElement
flag - is true if it should be abstract

setActive

public void setActive(java.lang.Object handle,
                      boolean active)
Description copied from interface: CoreHelper
Set the isActive attribute of a UML Class.

Specified by:
setActive in interface CoreHelper
Parameters:
handle - Class
active - boolean

setAggregation

public void setAggregation(java.lang.Object handle,
                           java.lang.Object aggregationKind)
Description copied from interface: CoreHelper
Set the aggregation attribute of an AssociationEnd.

Specified by:
setAggregation in interface CoreHelper
Parameters:
handle - the AssociationEnd
aggregationKind - an AggregationKind of Aggregate, Composite, or None returned from Model.getAggregationKind().

setLeaf

public void setLeaf(java.lang.Object handle,
                    boolean flag)
Description copied from interface: CoreHelper
Set the isLeaf attribute of a GeneralizableElement.

Specified by:
setLeaf in interface CoreHelper
Parameters:
handle - the GeneralizableElement
flag - is true if it is a leaf, ie it has no subtypes.

setChangeability

@Deprecated
public void setChangeability(java.lang.Object handle,
                                        java.lang.Object ck)
Deprecated. 

Description copied from interface: CoreHelper
Set the Changeability of a StructuralFeature or AssociationEnd.

Specified by:
setChangeability in interface CoreHelper
Parameters:
handle - StructuralFeature or AssociationEnd
ck - a ChangeableKind of Changeable, Frozen or AddOnly returned from Model.getChangeableKind().

setReadOnly

public void setReadOnly(java.lang.Object handle,
                        boolean isReadOnly)
Description copied from interface: CoreHelper
Set the isReadOnly (UML 2.x) or changeable (UML 1.x) attribute of a StructuralFeature or AssociationEnd.

Specified by:
setReadOnly in interface CoreHelper
Parameters:
handle - is the feature
isReadOnly - true for ReadOnly (Frozen in UML 1.x).

setConcurrency

public void setConcurrency(java.lang.Object handle,
                           java.lang.Object concurrencyKind)
Description copied from interface: CoreHelper
Set the concurrency of an Operation.

Specified by:
setConcurrency in interface CoreHelper
Parameters:
handle - the Operation
concurrencyKind - a ConcurrencyKind of Concurrent, Guarded, or Sequential returned from Model.getConcurrencyKind().

setKind

public void setKind(java.lang.Object handle,
                    java.lang.Object kind)
Description copied from interface: CoreHelper
Set the kind of a Parameter or the Pseudostate.

Specified by:
setKind in interface CoreHelper
Parameters:
handle - is the Parameter or Pseudostate
kind - a direction kind returned from Model.getDirectionKind() or a pseudostate kind returned from Model.getPseudostateKind().

setMultiplicity

public void setMultiplicity(java.lang.Object handle,
                            java.lang.Object arg)
Description copied from interface: CoreHelper
Set the multiplicity of a ModelElement.

Specified by:
setMultiplicity in interface CoreHelper
Parameters:
handle - model element
arg - multiplicity as string OR multiplicity object, null is a valid value (unspecified)

setName

public void setName(java.lang.Object handle,
                    java.lang.String name)
Description copied from interface: CoreHelper
Set the name of a ModelElement.

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

setBody

public void setBody(java.lang.Object handle,
                    java.lang.String body)
Description copied from interface: CoreHelper
Set the body of a comment.

NOTE: For UML 1.3, this actually set Comment.name, but for UML 1.4 it sets Comment.body. This is a behavior change in the API.

Specified by:
setBody in interface CoreHelper
Parameters:
handle - the Comment element
body - the string

setNavigable

public void setNavigable(java.lang.Object handle,
                         boolean flag)
Description copied from interface: CoreHelper
Set the navigability of an AssociationEnd.

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

setOrdering

public void setOrdering(java.lang.Object handle,
                        java.lang.Object ok)
Description copied from interface: CoreHelper
Set the OrderingKind of a given AssociationEnd.

Specified by:
setOrdering in interface CoreHelper
Parameters:
handle - AssociationEnd
ok - an OrderingKind returned from Model.getOrderingKind().

setPowertype

public void setPowertype(java.lang.Object handle,
                         java.lang.Object pt)
Description copied from interface: CoreHelper
Set the powerType of a Generalization.

Specified by:
setPowertype in interface CoreHelper
Parameters:
handle - Generalization
pt - the Classifier to set as the powerType or null to clear the powerType.

setQuery

public void setQuery(java.lang.Object handle,
                     boolean flag)
Description copied from interface: CoreHelper
Sets the isQuery attribute of a BehavioralFeature.

Specified by:
setQuery in interface CoreHelper
Parameters:
handle - is the behavioral feature
flag - new value for the isQuery attribute

setRoot

public void setRoot(java.lang.Object handle,
                    boolean flag)
Description copied from interface: CoreHelper
Set the isRoot attribute of a GeneralizableElement.

Specified by:
setRoot in interface CoreHelper
Parameters:
handle - model element
flag - is true if it is a root ie it has no supertypes

setSpecification

public void setSpecification(java.lang.Object handle,
                             boolean specification)
Description copied from interface: CoreHelper
Set the isSpecification attribute for the ElementOwnership of a ModelElement.

Specified by:
setSpecification in interface CoreHelper
Parameters:
handle - ModelElement
specification - true of the element is specification

setTargetScope

@Deprecated
public void setTargetScope(java.lang.Object handle,
                                      java.lang.Object scopeKind)
Deprecated. 

Description copied from interface: CoreHelper
Set the targetScope of an AssociationEnd or StructuralFeature.

Specified by:
setTargetScope in interface CoreHelper
Parameters:
handle - the model element
scopeKind - a ScopeKind of Instance or Classifier returned from Model.getScopeKind().

setVisibility

public void setVisibility(java.lang.Object handle,
                          java.lang.Object visibility)
Description copied from interface: CoreHelper
Set the visibility of a ModelElement, ElementResidence, ElementImport.

Specified by:
setVisibility in interface CoreHelper
Parameters:
handle - element
visibility - is the visibility

removeConnection

public void removeConnection(java.lang.Object handle,
                             java.lang.Object connection)
Description copied from interface: CoreHelper
Remove a connection between an Association & AssociationEnd or between a Link & LinkEnd.

Specified by:
removeConnection in interface CoreHelper
Parameters:
handle - Association or Link
connection - AssociationEnd or LinkEnd

addElementResidence

public void addElementResidence(java.lang.Object handle,
                                java.lang.Object residence)
Description copied from interface: CoreHelper
Add an ElementResidence.

Specified by:
addElementResidence in interface CoreHelper
Parameters:
handle - ModelElement
residence - ElementResidence to add

removeElementResidence

public void removeElementResidence(java.lang.Object handle,
                                   java.lang.Object residence)
Description copied from interface: CoreHelper
Remove an ElementResidence.

Specified by:
removeElementResidence in interface CoreHelper
Parameters:
handle - ModelElement
residence - ElementResidence to remove

setEnumerationLiterals

public void setEnumerationLiterals(java.lang.Object enumeration,
                                   java.util.List literals)
Description copied from interface: CoreHelper
Set the (ordered) list of literals of an Enumeration.

Specified by:
setEnumerationLiterals in interface CoreHelper
Parameters:
enumeration - Enumeration to add EnumerationLiterals too
literals - A list of EnumerationLiterals

getAllMetatypeNames

public java.util.Collection getAllMetatypeNames()
Description copied from interface: CoreHelper
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.

Specified by:
getAllMetatypeNames in interface CoreHelper
Returns:
Collection containing Strings with names of all metatypes

getAllMetaDatatypeNames

public java.util.Collection getAllMetaDatatypeNames()
Description copied from interface: CoreHelper
Returns names of all metamodel value elements including datatypes, enumerations, and primitive types. 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.

Specified by:
getAllMetaDatatypeNames in interface CoreHelper
Returns:
Collection containing Strings with names of all metatypes


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook