org.argouml.model
Class ModelFacade

java.lang.Object
  |
  +--org.argouml.model.ModelFacade

public class ModelFacade
extends java.lang.Object

Facade object for the Model component in ArgoUML.

The purpose of this Facade object is to allow for decoupling other modules from the insides of the model. For this purpose all of the methods in this class give away and accept handles (of type java.lang.Object) to the objects within the model.

This is just getters and recognizers. This is because the Model component has an extremely complicated internal data structure with lots of internal dependencies. To manipulate these there is a whole set of factories and helpers within the Model that is to be used but to use them you need knowledge of the internals of the Model, specifically the NS-UML objects.

All methods in this facade are static.

Signature for all recognizers in this Facade: public static boolean isA(Object handle) public static boolean is(Object handle)

Signature for all getters in this Facade: public static Object get(Object handle) - 1..1 public static Iterator get(Object handle) - 0..* public static String getName(Object handle) - Name


Field Summary
static short ACC_PRIVATE
           
static short ACC_PROTECTED
           
static short ACC_PUBLIC
           
static short CLASSIFIER
           
static short GUARDED
           
static short INSTANCE
           
static short SEQUENTIAL
           
 
Method Summary
static void addClient(java.lang.Object a, java.lang.Object cls)
          Adds a client classifier to some abstraction.
static void addConstraint(java.lang.Object me, java.lang.Object mc)
          Adds a constraint to some model element.
static void addFeature(java.lang.Object cls, java.lang.Object f)
          Adds a feature to some classifier.
static void addMethod(java.lang.Object o, java.lang.Object m)
          Adds a method to some operation and copies the op's attributes to the method.
static void addOwnedElement(java.lang.Object ns, java.lang.Object me)
          Adds a model element to some namespace.
static void addSupplier(java.lang.Object a, java.lang.Object cls)
          Adds a supplier classifier to some abstraction.
static java.util.Collection getAssociatedClasses(java.lang.Object o)
          Returns all associated classes for some given classifier.
static java.lang.Object getAssociationEnd(java.lang.Object type, java.lang.Object assoc)
          Returns the association end between some classifier and some associaton.
static java.util.Collection getAssociationEnds(java.lang.Object handle)
          The list of Association Ends
static java.util.Collection getAttributes(java.lang.Object handle)
          The list of Attributes.
static java.util.Collection getBehaviors(java.lang.Object handle)
          Get the behaviors of a Modelelement.
static java.lang.Object getBody(java.lang.Object handle)
          Get the body of an Expression.
static java.lang.Object getChild(java.lang.Object handle)
          Get the child of a generalization.
static java.util.Collection getChildren(java.lang.Object handle)
          Get the children of some generalizable element
static java.util.Iterator getClientDependencies(java.lang.Object handle)
          Get the client dependencies of some classifier
static short getConcurrency(java.lang.Object o)
          Get the concurrency of an operation.
static java.util.Iterator getConnections(java.lang.Object handle)
          The list of Connections or AssociationEnds to an Association.
static java.util.Collection getFeatures(java.lang.Object handle)
          The list of Features from a Classifier.
static java.lang.Object getGeneralization(java.lang.Object child, java.lang.Object parent)
          Gets the generalization between two generalizable elements.
static java.util.Iterator getGeneralizations(java.lang.Object handle)
          The list of Generalizations from a GeneralizableElement.
static java.util.Collection getIncomings(java.lang.Object stateVertex)
          Returns the incoming transitions for some statevertex
static java.util.Collection getMessages(java.lang.Object handle)
          Returns the messages belonging to some interaction
static java.lang.String getName(java.lang.Object handle)
          The name of a model element or some diagram part.
static java.lang.Object getNamespace(java.lang.Object handle)
          Get the namespace of an element.
static java.util.Collection getOperations(ru.novosoft.uml.foundation.core.MClassifier mclassifier)
          This method returns all operations of a given Classifier
static java.util.Collection getOperations(java.lang.Object handle)
          The list of operations
static java.util.Iterator getOperationsInh(java.lang.Object handle)
          The list of Operations of this classifier and all inherited.
static java.util.Iterator getOtherAssociationEnds(java.lang.Object handle)
          The list of Associations Ends connected to this association end
static java.util.Collection getOutgoings(java.lang.Object stateVertex)
          Returns the list of Transitions outgoing from the given stateVertex.
static java.util.Collection getOwnedElements(java.lang.Object handle)
          The list of owned elements of the the package.
static java.lang.Object getOwner(java.lang.Object f)
          Return the owner of a feature.
static java.lang.Object getParameter(java.lang.Object op, int n)
          Get a parameter of an operation.
static java.util.Iterator getParameters(java.lang.Object handle)
          Get the parameters of an operation.
static java.lang.Object getParent(java.lang.Object handle)
          Get the parent of a generalization.
static java.lang.Object getSource(java.lang.Object handle)
          Gets the source for some given transitions.
static java.util.Iterator getSpecializations(java.lang.Object handle)
          The list of Specializations from a GeneralizableElement.
static java.util.Collection getSpecifications(java.lang.Object cls)
          Returns all Interfaces of which this class is a realization.
static java.lang.Object getStereoType(java.lang.Object handle)
          Returns the stereotype belonging to some given modelelement
static java.util.Collection getStructuralFeatures(java.lang.Object classifier)
          This method returns all attributes of a given Classifier.
static java.util.Collection getSubvertices(java.lang.Object handle)
          Returns a collection with all subvertices belonging to the given composite state.
static java.util.Iterator getSupplierDependencies(java.lang.Object handle)
          The list of SupplierDependencies from a ModelElement.
static java.util.Collection getSuppliers(java.lang.Object handle)
          Returns the suppliers of an abstraction.
static java.lang.Object getTaggedValue(java.lang.Object modelElement, java.lang.String name)
          Return the tagged value with a specific tag.
static java.util.Iterator getTaggedValues(java.lang.Object modelElement)
          Return the tagged values iterator of a model element.
static java.lang.Object getTarget(java.lang.Object handle)
          Returns the target of some transition
static java.util.Collection getTransitions(java.lang.Object handle)
          Returns the transitions belonging to the given handle.
static java.lang.Object getType(java.lang.Object handle)
          The type of an attribute
static int getUpper(java.lang.Object handle)
          Returns the upper bound of the multiplicity of the given handle (an associationend).
static java.lang.String getValueOfTag(java.lang.Object tv)
          Return the value of some tagged value.
static boolean isAAssociation(java.lang.Object handle)
          Recognizer for Association.
static boolean isAAssociationEnd(java.lang.Object handle)
          Recognizer for AssociationEnd.
static boolean isAAssociationRole(java.lang.Object handle)
          Recognizer for AssociationRole
static boolean isAbstract(java.lang.Object handle)
          Recognizer for abstract classes and operations.
static boolean isAClass(java.lang.Object handle)
          Recognizer for Class
static boolean isAClassifier(java.lang.Object handle)
          Recognizer for Classifier
static boolean isACompositeState(java.lang.Object handle)
          Recognizer for CompositeState
static boolean isADataType(java.lang.Object handle)
          Recognizer for DataType
static boolean isADiagram(java.lang.Object handle)
          Recognizer for Diagram.
static boolean isAExpression(java.lang.Object handle)
          Recognizer for Expression
static boolean isAFeature(java.lang.Object handle)
          Recognizer for Feature
static boolean isAGeneralizableElement(java.lang.Object handle)
          Recognizer for GeneralizableElement
static boolean isAGeneralization(java.lang.Object handle)
          Recognizer for GeneralizableElement
static boolean isAInteraction(java.lang.Object handle)
          Recognizer for Interaction
static boolean isAInterface(java.lang.Object handle)
          Recognizer for Interface
static boolean isAMethod(java.lang.Object handle)
          Recognizer for Method
static boolean isAModel(java.lang.Object handle)
          Recognizer for Model
static boolean isAModelElement(java.lang.Object handle)
          Recognizer for ModelElement
static boolean isANamespace(java.lang.Object handle)
          Recognizer for Namespace
static boolean isAOperation(java.lang.Object handle)
          Recognizer for Operation
static boolean isAPackage(java.lang.Object handle)
          Recognizer for Package
static boolean isAStateMachine(java.lang.Object handle)
          Recognizer for StateMachine
static boolean isAStateVertex(java.lang.Object handle)
          Recognizer for StateVertex
static boolean isAStereotype(java.lang.Object handle)
          Recognizer for Stereotype
static boolean isAStructuralFeature(java.lang.Object handle)
          Recognizer for StructuralFeature
static boolean isATransition(java.lang.Object handle)
          Recognizer for Transition
static boolean isChangeable(java.lang.Object handle)
          Recognizer for attributes that are changeable
static boolean isClassifierScope(java.lang.Object handle)
          Recognizer for attributes with classifier scope.
static boolean isComposite(java.lang.Object handle)
          Returns true if a given associationend is a composite.
static boolean isConstructor(java.lang.Object handle)
          Recognizer for constructor.
static boolean isInitialized(java.lang.Object handle)
          Recognizer for attributes that are initialized.
static boolean isInstanceScope(java.lang.Object handle)
          Recognizer for attributes with instance scope.
static boolean isLeaf(java.lang.Object handle)
          Recognizer for leafs
static boolean isNavigable(java.lang.Object handle)
          Recognizer for Navigable elements
static boolean isPrimaryObject(java.lang.Object handle)
          Recognizer for primary objects.
static boolean isPrivate(java.lang.Object handle)
          Recognizer for attributes with private
static boolean isRealize(java.lang.Object handle)
          Recognizer for realize
static boolean isReturn(java.lang.Object handle)
          Recognizer for return
static boolean isSingleton(java.lang.Object handle)
          Recognizer for singleton.
static boolean isStereotype(java.lang.Object handle, java.lang.String stereotypename)
          Deprecated. ExtensionMechanismsFactory::isStereotype should be used instead. Since this should only ever be used together with predefined stereotypes the base class can be found in the UML 1.3 specification.
static boolean isTop(java.lang.Object handle)
           
static boolean isType(java.lang.Object handle)
          Recognizer for type.
static boolean isUtility(java.lang.Object handle)
          Recognizer for utility.
static java.lang.Object lookupIn(java.lang.Object o, java.lang.String name)
          Returns a named object in the given object by calling it's lookup method.
static void removeClientDependency(java.lang.Object o, java.lang.Object dep)
          This method removes a dependency from a model element.
static void removeFeature(java.lang.Object cls, java.lang.Object feature)
          This method removes a feature from a classifier.
static void removeParameter(java.lang.Object o, java.lang.Object p)
          This method removes a parameter from an operation.
static void setAbstract(java.lang.Object o, boolean flag)
          Sets if of some classifier is abstract.
static void setBody(java.lang.Object m, java.lang.Object expr)
          Sets a body of some method.
static void setChangeable(java.lang.Object o, boolean flag)
          Set the changeability of some feature.
static void setConcurrency(java.lang.Object o, short c)
          Set the concurrency of some operation.
static void setInitialValue(java.lang.Object at, java.lang.Object expr)
          Sets an initial value of some attribute.
static void setKindToIn(java.lang.Object p)
          Set some parameters kind to 'in'.
static void setKindToReturn(java.lang.Object p)
          Set some parameters kind to 'return'.
static void setLeaf(java.lang.Object o, boolean flag)
          Sets if of some classifier is a leaf.
static void setMultiplicity(java.lang.Object o, java.lang.String mult)
          Sets a multiplicity of some attribute or association end.
static void setName(java.lang.Object o, java.lang.String name)
          Sets a name of some modelelement.
static void setNamespace(java.lang.Object o, java.lang.Object ns)
          Sets a namespace of some modelelement.
static void setNavigable(java.lang.Object o, boolean flag)
          Sets the navigability of some association end.
static void setOwnerScope(java.lang.Object f, short os)
          Set the owner scope of some feature.
static void setRoot(java.lang.Object o, boolean flag)
          Sets if of some classifier is a root.
static void setStereotype(java.lang.Object m, java.lang.Object stereo)
          Sets the stereotype of some modelelement.
static void setTaggedValue(java.lang.Object o, java.lang.String tag, java.lang.String value)
          Sets a tagged value of some modelelement.
static void setTargetScope(java.lang.Object ae, short ts)
          Set the target scope of some association end.
static void setType(java.lang.Object p, java.lang.Object cls)
          Sets the type of some parameter.
static void setValueOfTag(java.lang.Object tv, java.lang.String value)
          Sets a value of some taggedValue.
static void setVisibility(java.lang.Object o, short v)
          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

ACC_PUBLIC

public static final short ACC_PUBLIC

ACC_PRIVATE

public static final short ACC_PRIVATE

ACC_PROTECTED

public static final short ACC_PROTECTED

CLASSIFIER

public static final short CLASSIFIER

INSTANCE

public static final short INSTANCE

GUARDED

public static final short GUARDED

SEQUENTIAL

public static final short SEQUENTIAL
Method Detail

isAAssociation

public static boolean isAAssociation(java.lang.Object handle)
Recognizer for Association.
Parameters:
handle - candidate

isAAssociationEnd

public static boolean isAAssociationEnd(java.lang.Object handle)
Recognizer for AssociationEnd.
Parameters:
handle - candidate

isAAssociationRole

public static boolean isAAssociationRole(java.lang.Object handle)
Recognizer for AssociationRole
Parameters:
handle - candidate

isAbstract

public static boolean isAbstract(java.lang.Object handle)
Recognizer for abstract classes and operations.
Parameters:
handle - candidate

isAClass

public static boolean isAClass(java.lang.Object handle)
Recognizer for Class
Parameters:
handle - candidate

isAClassifier

public static boolean isAClassifier(java.lang.Object handle)
Recognizer for Classifier
Parameters:
handle - candidate

isADataType

public static boolean isADataType(java.lang.Object handle)
Recognizer for DataType
Parameters:
handle - candidate

isACompositeState

public static boolean isACompositeState(java.lang.Object handle)
Recognizer for CompositeState
Parameters:
handle - candidate

isAExpression

public static boolean isAExpression(java.lang.Object handle)
Recognizer for Expression
Parameters:
handle - candidate

isAFeature

public static boolean isAFeature(java.lang.Object handle)
Recognizer for Feature
Parameters:
handle - candidate

isAGeneralizableElement

public static boolean isAGeneralizableElement(java.lang.Object handle)
Recognizer for GeneralizableElement
Parameters:
handle - candidate

isAGeneralization

public static boolean isAGeneralization(java.lang.Object handle)
Recognizer for GeneralizableElement
Parameters:
handle - candidate

isAInteraction

public static boolean isAInteraction(java.lang.Object handle)
Recognizer for Interaction
Parameters:
handle - candidate

isAInterface

public static boolean isAInterface(java.lang.Object handle)
Recognizer for Interface
Parameters:
handle - candidate

isAMethod

public static boolean isAMethod(java.lang.Object handle)
Recognizer for Method
Parameters:
handle - candidate

isAModel

public static boolean isAModel(java.lang.Object handle)
Recognizer for Model
Parameters:
handle - candidate

isAModelElement

public static boolean isAModelElement(java.lang.Object handle)
Recognizer for ModelElement
Parameters:
handle - candidate

isANamespace

public static boolean isANamespace(java.lang.Object handle)
Recognizer for Namespace
Parameters:
handle - candidate

isAOperation

public static boolean isAOperation(java.lang.Object handle)
Recognizer for Operation
Parameters:
handle - candidate

isAPackage

public static boolean isAPackage(java.lang.Object handle)
Recognizer for Package
Parameters:
handle - candidate

isAStateMachine

public static boolean isAStateMachine(java.lang.Object handle)
Recognizer for StateMachine
Parameters:
handle - candidate

isAStateVertex

public static boolean isAStateVertex(java.lang.Object handle)
Recognizer for StateVertex
Parameters:
handle - candidate

isAStereotype

public static boolean isAStereotype(java.lang.Object handle)
Recognizer for Stereotype
Parameters:
handle - candidate

isAStructuralFeature

public static boolean isAStructuralFeature(java.lang.Object handle)
Recognizer for StructuralFeature
Parameters:
handle - candidate

isATransition

public static boolean isATransition(java.lang.Object handle)
Recognizer for Transition
Parameters:
handle - candidate

isChangeable

public static boolean isChangeable(java.lang.Object handle)
Recognizer for attributes that are changeable
Parameters:
handle - candidate

isClassifierScope

public static boolean isClassifierScope(java.lang.Object handle)
Recognizer for attributes with classifier scope.
Parameters:
handle - candidate

isConstructor

public static boolean isConstructor(java.lang.Object handle)
Recognizer for constructor.
Parameters:
handle - candidate

isComposite

public static boolean isComposite(java.lang.Object handle)
Returns true if a given associationend is a composite.
Parameters:
handle -  
Returns:
boolean

isInitialized

public static boolean isInitialized(java.lang.Object handle)
Recognizer for attributes that are initialized.
Parameters:
handle - candidate
true - if the attribute is initialized.

isInstanceScope

public static boolean isInstanceScope(java.lang.Object handle)
Recognizer for attributes with instance scope.
Parameters:
handle - candidate

isLeaf

public static boolean isLeaf(java.lang.Object handle)
Recognizer for leafs
Parameters:
handle - candidate GeneralizableElement

isNavigable

public static boolean isNavigable(java.lang.Object handle)
Recognizer for Navigable elements
Parameters:
handle - candidate

isPrimaryObject

public static boolean isPrimaryObject(java.lang.Object handle)
Recognizer for primary objects. A primary object is an object that is created by the parser or by a user. Object that are created when importing some other object are not.
Parameters:
handle - candidate

isPrivate

public static boolean isPrivate(java.lang.Object handle)
Recognizer for attributes with private
Parameters:
handle - candidate

isRealize

public static boolean isRealize(java.lang.Object handle)
Recognizer for realize
Parameters:
handle - candidate

isReturn

public static boolean isReturn(java.lang.Object handle)
Recognizer for return
Parameters:
handle - candidate parameter

isSingleton

public static boolean isSingleton(java.lang.Object handle)
Recognizer for singleton.
Parameters:
handle - candidate

isStereotype

public static boolean isStereotype(java.lang.Object handle,
                                   java.lang.String stereotypename)
Deprecated. ExtensionMechanismsFactory::isStereotype should be used instead. Since this should only ever be used together with predefined stereotypes the base class can be found in the UML 1.3 specification.

Recognizer for a specific stereotype.
Parameters:
handle - candidate
stereotype - a string that is the stereotype name.
Returns:
true if handle is a singleton.

isTop

public static boolean isTop(java.lang.Object handle)

isType

public static boolean isType(java.lang.Object handle)
Recognizer for type.
Parameters:
handle - candidate

isUtility

public static boolean isUtility(java.lang.Object handle)
Recognizer for utility.
Parameters:
handle - candidate

isADiagram

public static boolean isADiagram(java.lang.Object handle)
Recognizer for Diagram.
Parameters:
handle - candidate

getAssociationEnd

public static java.lang.Object getAssociationEnd(java.lang.Object type,
                                                 java.lang.Object assoc)
Returns the association end between some classifier and some associaton.
Parameters:
type -  
assoc -  
Returns:
association end

getAssociationEnds

public static java.util.Collection getAssociationEnds(java.lang.Object handle)
The list of Association Ends
Parameters:
handle - the object that we get the association ends from.
Returns:
Iterator with association ends.

getAttributes

public static java.util.Collection getAttributes(java.lang.Object handle)
The list of Attributes.
Parameters:
handle - classifier to examine.
Returns:
iterator with attributes.

getBehaviors

public static java.util.Collection getBehaviors(java.lang.Object handle)
Get the behaviors of a Modelelement.
Parameters:
handle - modelelement to examine.
Returns:
the behaviors.

getBody

public static java.lang.Object getBody(java.lang.Object handle)
Get the body of an Expression.
Parameters:
handle - expression.
Returns:
the body.

getChild

public static java.lang.Object getChild(java.lang.Object handle)
Get the child of a generalization. TODO: Check that the concepts parent and child exist in the UML model.
Parameters:
handle - generalization.
Returns:
the child.

getChildren

public static java.util.Collection getChildren(java.lang.Object handle)
Get the children of some generalizable element
Parameters:
handle - to the generalizable element.
Returns:
a collection with all children.

getClientDependencies

public static java.util.Iterator getClientDependencies(java.lang.Object handle)
Get the client dependencies of some classifier
Parameters:
handle - to the classifier.
Returns:
an iterator with all client dependencies.

getConcurrency

public static short getConcurrency(java.lang.Object o)
Get the concurrency of an operation.
Parameters:
o - operation.
Returns:
the concurrency.

getConnections

public static java.util.Iterator getConnections(java.lang.Object handle)
The list of Connections or AssociationEnds to an Association.
Parameters:
handle - to the association.
Returns:
an Iterator with all connections.

getFeatures

public static java.util.Collection getFeatures(java.lang.Object handle)
The list of Features from a Classifier.
Parameters:
handle - Classifier to retrieve from.
Returns:
Collection with Features

getGeneralization

public static java.lang.Object getGeneralization(java.lang.Object child,
                                                 java.lang.Object parent)
Gets the generalization between two generalizable elements. Returns null if there is none.
Parameters:
child -  
parent -  
Returns:
The generalization

getGeneralizations

public static java.util.Iterator getGeneralizations(java.lang.Object handle)
The list of Generalizations from a GeneralizableElement.
Parameters:
handle - GeneralizableElement to retrieve from.
Returns:
Iterator with Generalizations

getIncomings

public static java.util.Collection getIncomings(java.lang.Object stateVertex)
Returns the incoming transitions for some statevertex
Parameters:
handle -  
Returns:
Collection

getMessages

public static java.util.Collection getMessages(java.lang.Object handle)
Returns the messages belonging to some interaction
Parameters:
handle -  
Returns:
Collection

getNamespace

public static java.lang.Object getNamespace(java.lang.Object handle)
Get the namespace of an element.
Parameters:
handle - the model element that we are getting the namespace of

getOperations

public static java.util.Collection getOperations(java.lang.Object handle)
The list of operations
Parameters:
handle - classifier to examine.
Returns:
Collection with operations.

getOperationsInh

public static java.util.Iterator getOperationsInh(java.lang.Object handle)
The list of Operations of this classifier and all inherited.
Parameters:
handle - classifier to examine.
Returns:
Iterator with operations.

getOutgoings

public static java.util.Collection getOutgoings(java.lang.Object stateVertex)
Returns the list of Transitions outgoing from the given stateVertex.
Parameters:
statevertex -  
Returns:
Collection

getOtherAssociationEnds

public static java.util.Iterator getOtherAssociationEnds(java.lang.Object handle)
The list of Associations Ends connected to this association end
Parameters:
handle - association end to start from

getOwnedElements

public static java.util.Collection getOwnedElements(java.lang.Object handle)
The list of owned elements of the the package.
Parameters:
handle - package to retrieve from.
Returns:
Iterator with operations

getParameter

public static java.lang.Object getParameter(java.lang.Object op,
                                            int n)
Get a parameter of an operation.
Parameters:
op - operation to retrieve from
n - parameter number
Returns:
parameter.

getParameters

public static java.util.Iterator getParameters(java.lang.Object handle)
Get the parameters of an operation.
Parameters:
handle - operation to retrieve from
Returns:
Iterator with operations.

getParent

public static java.lang.Object getParent(java.lang.Object handle)
Get the parent of a generalization. TODO: Check that the concepts parent and child exist in the UML model.
Parameters:
handle - generalization.
Returns:
the parent.

getSource

public static java.lang.Object getSource(java.lang.Object handle)
Gets the source for some given transitions.
Parameters:
handle -  
Returns:
Object

getSpecializations

public static java.util.Iterator getSpecializations(java.lang.Object handle)
The list of Specializations from a GeneralizableElement.
Parameters:
handle - GeneralizableElement to retrieve from.
Returns:
Iterator with Specializations.

getStereoType

public static java.lang.Object getStereoType(java.lang.Object handle)
Returns the stereotype belonging to some given modelelement
Parameters:
handle -  
Returns:
Object

getSubvertices

public static java.util.Collection getSubvertices(java.lang.Object handle)
Returns a collection with all subvertices belonging to the given composite state.
Parameters:
handle -  
Returns:
Collection

getSupplierDependencies

public static java.util.Iterator getSupplierDependencies(java.lang.Object handle)
The list of SupplierDependencies from a ModelElement.
Parameters:
handle - model element.

getType

public static java.lang.Object getType(java.lang.Object handle)
The type of an attribute
Parameters:
handle - the attribute

getTarget

public static java.lang.Object getTarget(java.lang.Object handle)
Returns the target of some transition
Parameters:
handle -  
Returns:
Object

getUpper

public static int getUpper(java.lang.Object handle)
Returns the upper bound of the multiplicity of the given handle (an associationend).
Parameters:
handle -  
Returns:
int

getTransitions

public static java.util.Collection getTransitions(java.lang.Object handle)
Returns the transitions belonging to the given handle. The handle can be a statemachine or a composite state. If it's a statemachine the transitions will be given back belonging to that statemachine. If it's a compositestate the internal transitions of that compositestate will be given back.
Parameters:
handle -  
Returns:
Collection

getStructuralFeatures

public static java.util.Collection getStructuralFeatures(java.lang.Object classifier)
This method returns all attributes of a given Classifier.
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes

getOperations

public static java.util.Collection getOperations(ru.novosoft.uml.foundation.core.MClassifier mclassifier)
This method returns all operations of a given Classifier
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations

getSpecifications

public static java.util.Collection getSpecifications(java.lang.Object cls)
Returns all Interfaces of which this class is a realization.
Parameters:
cls - the class you want to have the interfaces for
Returns:
a collection of the Interfaces

getSuppliers

public static java.util.Collection getSuppliers(java.lang.Object handle)
Returns the suppliers of an abstraction.
Parameters:
abstraction -  
Returns:
a collection of the suppliers

getAssociatedClasses

public static java.util.Collection getAssociatedClasses(java.lang.Object o)
Returns all associated classes for some given classifier. Returns an empty collection if the given argument o is not a classifier. The given parameter is included in the returned collection if it has a self- referencing association.
Parameters:
o -  
Returns:
Collection

getName

public static java.lang.String getName(java.lang.Object handle)
The name of a model element or some diagram part.
Parameters:
handle - that points out the object.

getOwner

public static java.lang.Object getOwner(java.lang.Object f)
Return the owner of a feature.
Parameters:
feature -  
Returns:
classifier

getTaggedValues

public static java.util.Iterator getTaggedValues(java.lang.Object modelElement)
Return the tagged values iterator of a model element.
Parameters:
element - The tagged values belong to this.
Returns:
The tagged values iterator

getTaggedValue

public static java.lang.Object getTaggedValue(java.lang.Object modelElement,
                                              java.lang.String name)
Return the tagged value with a specific tag.
Parameters:
element - The tagged value belongs to this.
name - The tag.
Returns:
The found tag, null if not found

getValueOfTag

public static java.lang.String getValueOfTag(java.lang.Object tv)
Return the value of some tagged value.
Parameters:
tv - The tagged value.
name - The tag.
Returns:
The found value, null if not found

lookupIn

public static java.lang.Object lookupIn(java.lang.Object o,
                                        java.lang.String name)
Returns a named object in the given object by calling it's lookup method.
Parameters:
namespace -  
name - of the model element
Returns:
found object, null otherwise

addFeature

public static void addFeature(java.lang.Object cls,
                              java.lang.Object f)
Adds a feature to some classifier.
Parameters:
classifier -  
feature -  

addMethod

public static void addMethod(java.lang.Object o,
                             java.lang.Object m)
Adds a method to some operation and copies the op's attributes to the method.
Parameters:
operation -  
method -  

addOwnedElement

public static void addOwnedElement(java.lang.Object ns,
                                   java.lang.Object me)
Adds a model element to some namespace.
Parameters:
ns - namespace
me - model element

addSupplier

public static void addSupplier(java.lang.Object a,
                               java.lang.Object cls)
Adds a supplier classifier to some abstraction.
Parameters:
a - abstraction
cls - supplier classifier

addClient

public static void addClient(java.lang.Object a,
                             java.lang.Object cls)
Adds a client classifier to some abstraction.
Parameters:
a - abstraction
cls - client classifier

removeClientDependency

public static void removeClientDependency(java.lang.Object o,
                                          java.lang.Object dep)
This method removes a dependency from a model element.
Parameters:
model - element
dependency -  

removeFeature

public static void removeFeature(java.lang.Object cls,
                                 java.lang.Object feature)
This method removes a feature from a classifier.
Parameters:
classifier -  
feature -  

removeParameter

public static void removeParameter(java.lang.Object o,
                                   java.lang.Object p)
This method removes a parameter from an operation.
Parameters:
operation -  
parameter -  

setBody

public static void setBody(java.lang.Object m,
                           java.lang.Object expr)
Sets a body of some method.
Parameters:
method -  
expression -  

setInitialValue

public static void setInitialValue(java.lang.Object at,
                                   java.lang.Object expr)
Sets an initial value of some attribute.
Parameters:
attribute -  
expression -  

setMultiplicity

public static void setMultiplicity(java.lang.Object o,
                                   java.lang.String mult)
Sets a multiplicity of some attribute or association end.
Parameters:
attribute - or association end
multiplicity - as string

setName

public static void setName(java.lang.Object o,
                           java.lang.String name)
Sets a name of some modelelement.
Parameters:
model - element
name -  

setNamespace

public static void setNamespace(java.lang.Object o,
                                java.lang.Object ns)
Sets a namespace of some modelelement.
Parameters:
model - element
namespace -  

setNavigable

public static void setNavigable(java.lang.Object o,
                                boolean flag)
Sets the navigability of some association end.
Parameters:
association - end
navigability - flag

setVisibility

public static void setVisibility(java.lang.Object o,
                                 short v)
Set the visibility of some modelelement.
Parameters:
model - element
visibility -  

setOwnerScope

public static void setOwnerScope(java.lang.Object f,
                                 short os)
Set the owner scope of some feature.
Parameters:
feature -  
owner - scope

setTargetScope

public static void setTargetScope(java.lang.Object ae,
                                  short ts)
Set the target scope of some association end.
Parameters:
association - end
target - scope

setConcurrency

public static void setConcurrency(java.lang.Object o,
                                  short c)
Set the concurrency of some operation.
Parameters:
operation -  
concurrency -  

setChangeable

public static void setChangeable(java.lang.Object o,
                                 boolean flag)
Set the changeability of some feature.
Parameters:
feature -  
changeability - flag

setAbstract

public static void setAbstract(java.lang.Object o,
                               boolean flag)
Sets if of some classifier is abstract.
Parameters:
classifier -  
flag -  

setLeaf

public static void setLeaf(java.lang.Object o,
                           boolean flag)
Sets if of some classifier is a leaf.
Parameters:
classifier -  
flag -  

setRoot

public static void setRoot(java.lang.Object o,
                           boolean flag)
Sets if of some classifier is a root.
Parameters:
classifier -  
flag -  

setKindToIn

public static void setKindToIn(java.lang.Object p)
Set some parameters kind to 'in'.
Parameters:
parameter -  

setKindToReturn

public static void setKindToReturn(java.lang.Object p)
Set some parameters kind to 'return'.
Parameters:
parameter -  

setType

public static void setType(java.lang.Object p,
                           java.lang.Object cls)
Sets the type of some parameter.
Parameters:
parameter -  
type -  

setTaggedValue

public static void setTaggedValue(java.lang.Object o,
                                  java.lang.String tag,
                                  java.lang.String value)
Sets a tagged value of some modelelement.
Parameters:
model - element
tag -  
value -  

setValueOfTag

public static void setValueOfTag(java.lang.Object tv,
                                 java.lang.String value)
Sets a value of some taggedValue.
Parameters:
taggedValue -  
value -  

setStereotype

public static void setStereotype(java.lang.Object m,
                                 java.lang.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.
Parameters:
m - model element
stereo - stereotype

addConstraint

public static void addConstraint(java.lang.Object me,
                                 java.lang.Object mc)
Adds a constraint to some model element.
Parameters:
me - model element
mc - constraint


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook