com.finalist.mmbase2uml
Class MMBase2UML

java.lang.Object
  extended by com.finalist.mmbase2uml.MMBase2UML

public class MMBase2UML
extends java.lang.Object

The MMBase2UMLTester reads an MMBase application and creates a XMI file containg a UML description of the MMBase application.

Version:
$Revision: 1.3 $, $Date: 2004/10/23 08:54:40 $
Author:
kors

Constructor Summary
MMBase2UML()
           
 
Method Summary
 com.finalist.uml14.simpleuml.SimpleModel createModel(net.sf.mmapps.modules.config.ApplicationConfiguration appConf)
          Parses the information of the MMBase application and returns a SimpleModel representing the application.
 com.finalist.uml14.simpleuml.SimpleModel createModel(net.sf.mmapps.modules.config.ApplicationConfiguration appConf, boolean addClassDiagram)
          Parses the information of the MMBase application and returns a SimpleModel representing the application.
 com.finalist.uml14.simpleuml.SimpleModel initModel(net.sf.mmapps.modules.config.ApplicationConfiguration appConf)
          Initialize a model with some standard needed features.
static void main(java.lang.String[] args)
          This application parses an MMBase application and than writes an XMI file that contains the UML description of the MMBase application.
 void parseApplication(java.lang.String sourcePath, java.lang.String targetPath)
          Analyses the sourcePath that was given.
 void parseApplication(java.lang.String sourcePath, java.lang.String targetPath, java.lang.String createClassDiagram)
          Analyses the sourcePath that was given.
 net.sf.mmapps.modules.config.Configuration readMultipleApp(java.lang.String dirPath)
          Reads multiple applications from the specified directory.
 net.sf.mmapps.modules.config.ApplicationConfiguration readRemoteApp(java.lang.String url)
          Reads a remote MMBase cloud and returns a Configuration with all the information about one application.
 net.sf.mmapps.modules.config.ApplicationConfiguration readSingleApp(java.lang.String filePath)
          Reads the MMBase application from the filepath.
 void writeModel(com.finalist.uml14.simpleuml.SimpleModel simpleModel, java.lang.String outputDir)
          Writes the model to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMBase2UML

public MMBase2UML()
Method Detail

main

public static void main(java.lang.String[] args)
This application parses an MMBase application and than writes an XMI file that contains the UML description of the MMBase application.

Parameters:
args - The first argument parsed is either a directory with multiple MMBase-applications, a directory with one single MMBase application or a remote url to a online MMBase application. The second argument may be the name of the output directory.

parseApplication

public void parseApplication(java.lang.String sourcePath,
                             java.lang.String targetPath)
Analyses the sourcePath that was given. Than start generating the correct XMI file(s). Also generate a class diagram in DI format.

Parameters:
sourcePath - The path to be parsed.
targetPath - The path to write the XMI files to.

parseApplication

public void parseApplication(java.lang.String sourcePath,
                             java.lang.String targetPath,
                             java.lang.String createClassDiagram)
Analyses the sourcePath that was given. Than start generating the correct XMI file(s).

Parameters:
sourcePath - The path to be parsed.
targetPath - The path to write the XMI files to.
createClassDiagram - "true" if a class diagram in DI format should be generated.

readSingleApp

public net.sf.mmapps.modules.config.ApplicationConfiguration readSingleApp(java.lang.String filePath)
Reads the MMBase application from the filepath.

Parameters:
filePath - A reference to a directory with a single MMBase application.
Returns:
A Configuration containing all the information about the MMBase application.

readMultipleApp

public net.sf.mmapps.modules.config.Configuration readMultipleApp(java.lang.String dirPath)
Reads multiple applications from the specified directory.

Parameters:
dirPath - A reference to a directory with multiple applications.
Returns:
A configuration containing multiple ApplicationConfigurations.

readRemoteApp

public net.sf.mmapps.modules.config.ApplicationConfiguration readRemoteApp(java.lang.String url)
Reads a remote MMBase cloud and returns a Configuration with all the information about one application.

Parameters:
url - A reference to the remotecloud.
Returns:
A Configuration containing the information of one application.

initModel

public com.finalist.uml14.simpleuml.SimpleModel initModel(net.sf.mmapps.modules.config.ApplicationConfiguration appConf)
Initialize a model with some standard needed features.

Parameters:
appConf - configuration of the application.
Returns:
The initialized model which can be extended with the needed classes.

createModel

public com.finalist.uml14.simpleuml.SimpleModel createModel(net.sf.mmapps.modules.config.ApplicationConfiguration appConf)
Parses the information of the MMBase application and returns a SimpleModel representing the application. Include a Class Diagram as well.

Parameters:
appConf - The application configuration.
Returns:
A SimpleModel that represents the given application.

createModel

public com.finalist.uml14.simpleuml.SimpleModel createModel(net.sf.mmapps.modules.config.ApplicationConfiguration appConf,
                                                            boolean addClassDiagram)
Parses the information of the MMBase application and returns a SimpleModel representing the application. Optional a class diagram will be added.

Parameters:
appConf - The application configuration.
addClassDiagram - if true, a class diagram will be added to the model im DI format.
Returns:
A SimpleModel that represents the given application.

writeModel

public void writeModel(com.finalist.uml14.simpleuml.SimpleModel simpleModel,
                       java.lang.String outputDir)
Writes the model to a file. The file has the "<>.xmi".

Parameters:
simpleModel - The model that has to be written to the file.
outputDir - the directory to write the model to.


Copyright © 2003-2006 mmapps. All Rights Reserved.