org.biomage.tools.generate_classes
Class CreateMageDTDClasses

java.lang.Object
  extended by org.biomage.tools.generate_classes.CreateMageDTDClasses
Direct Known Subclasses:
CreateMageClasses

public class CreateMageDTDClasses
extends java.lang.Object


Field Summary
protected  java.lang.String[] args
          Description: The command line arguments.
protected  org.w3c.dom.Document cfgInfo
           
protected static java.lang.String DEFAULT_PATH
          Description: The default namespace.
 
Constructor Summary
CreateMageDTDClasses(java.lang.String[] args)
          Description: Constructor for the CreateMageDTDClasses object.
 
Method Summary
 void dispose()
           
 java.lang.String getArgumentToken(java.lang.String[] args, java.lang.String token)
          Description: Common code to obtain the argument associated with the option from the command line.
 org.w3c.dom.Document getDOMFromFile(java.lang.String xmlFile)
          Description: Reads the file and creates the DOM structure.
static java.lang.String getName()
           
 org.w3c.dom.Element getPackageNodeFromCfg()
          Description: Reads the file and creates the DOM structure and gets the XMI element.
static java.lang.String getVersion()
           
 org.w3c.dom.Element getXMINodeFromFile(java.lang.String xmlFile)
          Description: Reads the file and creates the DOM structure and gets the XMI element.
protected  org.w3c.dom.Element initialize()
          Description: Obtains the top node of the document.
static void main(java.lang.String[] args)
          Description: The main entry point for the XMLLoaderTestServer.
 void writeDocFile(java.util.Vector classes)
          Description: Writes the documentation out to the specified file..
 void writeDTDFile(java.util.Vector classes)
          Description: Writes the header to the DTD header then creates a WriteDTDFile to write the rest of the file.
 void writePlatform(java.util.Vector classes)
          Description: Picks the specified platform and calls the class that creates that platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

args

protected java.lang.String[] args
Description: The command line arguments.


cfgInfo

protected org.w3c.dom.Document cfgInfo

DEFAULT_PATH

protected static final java.lang.String DEFAULT_PATH
Description: The default namespace.

See Also:
Constant Field Values
Constructor Detail

CreateMageDTDClasses

public CreateMageDTDClasses(java.lang.String[] args)
                     throws java.lang.Exception
Description: Constructor for the CreateMageDTDClasses object.

Parameters:
Throws:
java.lang.Exception -

Method Detail

initialize

protected org.w3c.dom.Element initialize()
                                  throws java.lang.Exception
Description: Obtains the top node of the document.

Parameters:
args: - list of command line arguments.

Throws:
java.lang.Exception

getXMINodeFromFile

public org.w3c.dom.Element getXMINodeFromFile(java.lang.String xmlFile)
                                       throws java.lang.Exception
Description: Reads the file and creates the DOM structure and gets the XMI element.

Parameters:
xmiFile: - the file to parse

Returns:
the top-level node as an Element

Throws:
java.lang.Exception

getDOMFromFile

public org.w3c.dom.Document getDOMFromFile(java.lang.String xmlFile)
                                    throws java.lang.Exception
Description: Reads the file and creates the DOM structure.

Parameters:
xmiFile: - the file to parse

Returns:
the xml parsed as a DOM from the file

Throws:
java.lang.Exception

getPackageNodeFromCfg

public org.w3c.dom.Element getPackageNodeFromCfg()
                                          throws java.lang.Exception
Description: Reads the file and creates the DOM structure and gets the XMI element.

Parameters:
xmiFile: - the file to parse

Returns:
the top-level node as an Element

Throws:
java.lang.Exception

writeDTDFile

public void writeDTDFile(java.util.Vector classes)
                  throws java.lang.Exception
Description: Writes the header to the DTD header then creates a WriteDTDFile to write the rest of the file.

Parameters:
clases: - vector of CreateClassFiles, one per model object.

Throws:
java.lang.Exception

writeDocFile

public void writeDocFile(java.util.Vector classes)
                  throws java.lang.Exception
Description: Writes the documentation out to the specified file..

Parameters:
clases: - vector of CreateClassFiles, one per model object.

Throws:
java.lang.Exception

writePlatform

public void writePlatform(java.util.Vector classes)
                   throws java.lang.Exception
Description: Picks the specified platform and calls the class that creates that platform.

Parameters:
clases: - vector of CreateClassFiles, one per model object.

Throws:
java.lang.Exception

getName

public static java.lang.String getName()

getVersion

public static java.lang.String getVersion()

dispose

public void dispose()

getArgumentToken

public java.lang.String getArgumentToken(java.lang.String[] args,
                                         java.lang.String token)
                                  throws java.lang.Exception
Description: Common code to obtain the argument associated with the option from the command line. If it isn't on the command line, will check the xml configuration file, if it was provided.

Parameters:
args - the command line.
token - option whose argument is desired.
Returns:
The desired argument.

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
Description: The main entry point for the XMLLoaderTestServer.

Parameters:
String[] - args ( INPUT )