|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.model.uml.ModelManagementHelperImpl
Helper class for UML ModelManagement Package.
Current implementation is a placeholder.
Field Summary | |
private static Logger |
LOG
Logger. |
private NSUMLModelImplementation |
nsmodel
The model implementation. |
Constructor Summary | |
(package private) |
ModelManagementHelperImpl(NSUMLModelImplementation implementation)
Don't allow instantiation. |
Method Summary | |
boolean |
corresponds(Object obj1,
Object obj2)
Tests if two objects are of the same type, have the same name and the same relative position in the model. |
Collection |
getAllBehavioralFeatures(Object ns)
|
Collection |
getAllModelElementsOfKind(Object nsa,
Object type)
Returns all modelelements found in this namespace and its children that are of some class kind. |
Collection |
getAllModelElementsOfKind(Object nsa,
String kind)
Helper method for #getAllModelElementsOfKind(Object, Class) . |
Collection |
getAllModelElementsOfKindWithModel(Object model,
Object type)
Returns all modelelements of the given kind. |
Collection |
getAllNamespaces(Object ns)
Returns all namespaces found in this namespace and in its children This method is CPU intensive and therefore needs to be as efficient as possible. |
Collection |
getAllSubSystems(Object ns)
Returns all subsystems found in this namespace and in its children. |
Collection |
getAllSurroundingNamespaces(Object ns)
Returns all surrounding namespaces of some namespace ns. |
Object |
getCorrespondingElement(Object elem,
Object model)
Utility function for managing several overlayed models, eg a user model to which elements from some profile models is imported when needed. |
Object |
getCorrespondingElement(Object elem,
Object model,
boolean canCreate)
Utility function for managing several overlayed models, eg a user model to which elements from some profile models is imported when needed. |
Object |
getElement(Vector path,
Object theRootNamespace)
Get the modelelement a given path below a given root-namespace. |
private List |
getOwnerShipPath(Object elem)
|
Vector |
getPath(Object element)
Finds the absolute path of a ModelElement. |
boolean |
isCyclicOwnership(Object parent,
Object child)
Checks if a child for some ownershiprelationship (as in a namespace A is owned by a namespace B) is allready in the ownerhship relation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Logger LOG
private NSUMLModelImplementation nsmodel
Constructor Detail |
ModelManagementHelperImpl(NSUMLModelImplementation implementation)
implementation
- To get other helpers and factories.Method Detail |
public Collection getAllSubSystems(Object ns)
getAllSubSystems
in interface org.argouml.model.ModelManagementHelper
ns
- is the namespace
public Collection getAllNamespaces(Object ns)
getAllNamespaces
in interface org.argouml.model.ModelManagementHelper
ns
- namespace to process
public Collection getAllModelElementsOfKindWithModel(Object model, Object type)
getAllModelElementsOfKindWithModel
in interface org.argouml.model.ModelManagementHelper
model
- The model where we search.type
- is the class kind
public Collection getAllModelElementsOfKind(Object nsa, Object type)
This method is CPU intensive and therefore needs to be as efficient as possible.
getAllModelElementsOfKind
in interface org.argouml.model.ModelManagementHelper
nsa
- is the namespacetype
- is the class kind
public Collection getAllModelElementsOfKind(Object nsa, String kind)
#getAllModelElementsOfKind(Object, Class)
.
getAllModelElementsOfKind
in interface org.argouml.model.ModelManagementHelper
nsa
- namespace.kind
- name of class to find, this implementation will add the "M"
for NSUML.
public Collection getAllSurroundingNamespaces(Object ns)
getAllSurroundingNamespaces
in interface org.argouml.model.ModelManagementHelper
ns
- to process
public Collection getAllBehavioralFeatures(Object ns)
getAllBehavioralFeatures
in interface org.argouml.model.ModelManagementHelper
ns
- the given namespace
public Object getElement(Vector path, Object theRootNamespace)
getElement
in interface org.argouml.model.ModelManagementHelper
path
- the given paththeRootNamespace
- the given namespace to start from
public Vector getPath(Object element)
The returned Vector implicitly starts at the root (the model) and follows element's chain of owning namespaces back down to element. The first element will thus be the name of the top level namespace below the model, and the last element will be the name of element itself. Note thus that for the model the path will be empty.
getPath
in interface org.argouml.model.ModelManagementHelper
element
- is the object to resolve the path for.
IllegalArgumentException
- if element isn't a ModelElement
properly owned by namespaces and a model.public Object getCorrespondingElement(Object elem, Object model)
getCorrespondingElement
in interface org.argouml.model.ModelManagementHelper
elem
- is some element.model
- is the model the returned object shall belong to.
public Object getCorrespondingElement(Object elem, Object model, boolean canCreate)
getCorrespondingElement
in interface org.argouml.model.ModelManagementHelper
elem
- is some element.model
- is the model the returned object shall belong to.canCreate
- determines if objects can be copied into model.
public boolean corresponds(Object obj1, Object obj2)
corresponds
in interface org.argouml.model.ModelManagementHelper
obj1
- is an object.obj2
- is another object.
public boolean isCyclicOwnership(Object parent, Object child)
isCyclicOwnership
in interface org.argouml.model.ModelManagementHelper
parent
- The current leaf for the ownership relationchild
- The child that should be owned by the parent
private List getOwnerShipPath(Object elem)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |