org.argouml.model.uml
Class ModelManagementFactoryImpl

java.lang.Object
  extended byorg.argouml.model.uml.AbstractUmlModelFactory
      extended byorg.argouml.model.uml.ModelManagementFactoryImpl
All Implemented Interfaces:
org.argouml.model.ModelManagementFactory

public class ModelManagementFactoryImpl
extends AbstractUmlModelFactory
implements org.argouml.model.ModelManagementFactory

Factory to create UML classes for the UML ModelManagement package.

TODO: Change visibility to package after reflection problem solved.

Since:
ARGO0.11.2

Field Summary
private  NSUMLModelImplementation nsmodel
          The model implementation.
 
Constructor Summary
(package private) ModelManagementFactoryImpl(NSUMLModelImplementation implementation)
          Don't allow instantiation.
 
Method Summary
 Object buildPackage(String name, String uuid)
          Build an empty but initialized instance of a UML Package with a given name, and set it's UUID, if it doesn't exist.
 Object copyPackage(Object source, Object ns)
          Copies a package, but not any elements within it.
 Object createElementImport()
          Create an empty but initialized instance of a UML ElementImport.
 Object createModel()
          Create an empty but initialized instance of a UML Model.
 Object createPackage()
          Create an empty but initialized instance of a UML Package.
 Object createSubsystem()
          Create an empty but initialized instance of a UML Subsystem.
(package private)  void deleteElementImport(Object elem)
           
(package private)  void deleteModel(Object elem)
           
(package private)  void deletePackage(Object elem)
           
(package private)  void deleteSubsystem(Object elem)
           
private  void doCopyPackage(ru.novosoft.uml.model_management.MPackage source, ru.novosoft.uml.model_management.MPackage target)
          Used by the copy functions.
 
Methods inherited from class org.argouml.model.uml.AbstractUmlModelFactory
addListenersToModelElement, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsmodel

private NSUMLModelImplementation nsmodel
The model implementation.

Constructor Detail

ModelManagementFactoryImpl

ModelManagementFactoryImpl(NSUMLModelImplementation implementation)
Don't allow instantiation.

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

createModel

public Object createModel()
Create an empty but initialized instance of a UML Model.

Specified by:
createModel in interface org.argouml.model.ModelManagementFactory
Returns:
an initialized UML Model instance.

createElementImport

public Object createElementImport()
Create an empty but initialized instance of a UML ElementImport.

Specified by:
createElementImport in interface org.argouml.model.ModelManagementFactory
Returns:
an initialized UML ElementImport instance.

createPackage

public Object createPackage()
Create an empty but initialized instance of a UML Package.

Specified by:
createPackage in interface org.argouml.model.ModelManagementFactory
Returns:
an initialized UML Package instance.

buildPackage

public Object buildPackage(String name,
                           String uuid)
Build an empty but initialized instance of a UML Package with a given name, and set it's UUID, if it doesn't exist.

Specified by:
buildPackage in interface org.argouml.model.ModelManagementFactory
Parameters:
name - is the given name
uuid - is the UUID.
Returns:
an initialized UML Package instance.

createSubsystem

public Object createSubsystem()
Create an empty but initialized instance of a UML Subsystem.

Specified by:
createSubsystem in interface org.argouml.model.ModelManagementFactory
Returns:
an initialized UML Subsystem instance.

deleteElementImport

void deleteElementImport(Object elem)
Parameters:
elem - to be deleted

deleteModel

void deleteModel(Object elem)
Parameters:
elem - to be deleted

deletePackage

void deletePackage(Object elem)
Parameters:
elem - to be deleted

deleteSubsystem

void deleteSubsystem(Object elem)
Parameters:
elem - to be deleted

copyPackage

public Object copyPackage(Object source,
                          Object ns)
Copies a package, but not any elements within it. This does however not mean the package will be empty, since eg it or it's parents may reference a stereotype within it causing that to be copied into it.

Specified by:
copyPackage in interface org.argouml.model.ModelManagementFactory
Parameters:
source - is the package to copy.
ns - is the namespace to put the copy in.
Returns:
the newly created package.

doCopyPackage

private void doCopyPackage(ru.novosoft.uml.model_management.MPackage source,
                           ru.novosoft.uml.model_management.MPackage target)
Used by the copy functions. Do not call this function directly.

Parameters:
source - The source package.
target - The target package.


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