org.biomage.tools.generate_classes
Class CreateMageClassFileList

java.lang.Object
  extended by org.biomage.tools.generate_classes.CreateMageClassFileList

public class CreateMageClassFileList
extends java.lang.Object


Nested Class Summary
 class CreateMageClassFileList.AssociationInformation
          Description: Inner class to hold the association and which association end is the "owner".
protected  class CreateMageClassFileList.ExtendedAssociation
          Description: Allows a chain of associations to be built.
 class CreateMageClassFileList.ExtensionMechanisms
          Description: Inner class to hold the extension information from the xml.
 class CreateMageClassFileList.PackageInformation
          Description: Inner class to hold the package information from the xml.
 
Constructor Summary
CreateMageClassFileList()
          Description: Constructor for the CreateMageJavaClasses object.
 
Method Summary
protected  void addToAssociationMap(java.util.Map map, org.w3c.dom.Element associationNode, org.w3c.dom.Element thisEndNode, org.w3c.dom.Element otherEndNode)
          Description: Obtains the association and the current end and places the information on a map keyed by the model element id.
protected  java.util.Map associationInformation(org.w3c.dom.Element xmiElement)
          Description: Obtains the association and the current end and places the information on a map keyed by the model element id.
protected  java.util.Map constraintInformation(org.w3c.dom.Element xmiElement)
          Description: Obtains constraint information and puts it on a map keyed by the association end element id.
protected  java.util.Vector create(org.w3c.dom.Element xmiElement, org.w3c.dom.Element packageList)
           
protected  java.util.Vector createClassFiles(org.w3c.dom.Element xmiElement, java.util.Map id2extInfo, java.util.Map id2packages, java.util.Map id2dataType, java.util.Map id2constraint)
          Description: For each class in the XMI, will create a CreateClassFile object and place it on the return Vector.
protected  java.util.Vector createInterfaceFiles(java.util.Map interfaceName2associationEndElement, java.util.Map id2classElement, java.util.Map id2packageInformation)
          Description: For each interface name, create a CreateInterfaceFile object.
protected  java.util.Vector createPackageClassFiles(org.w3c.dom.Element packageList, java.util.Map id2packages, java.util.Map id2extInfo, java.util.Vector classFiles, java.util.Map id2classFiles)
          Description: For each class in the XMI, will create a CreateClassFile object and place it on the return Vector.
protected  java.util.Map dataTypeInformation(org.w3c.dom.Element xmiElement)
          Description: Obtains the data type and puts it on a map keyed by the model element id.
protected  java.util.Map docInformation(org.w3c.dom.Element xmiElement)
          Description: Obtains all the extension mechanism information and puts it on a map keyed by the model element id.
protected  void enumerateIdentifiable(java.util.Vector theList, java.util.Map id2classes)
          Description: This is a recursive function to determine abolutely whether or not an Object is identifiable.
protected  java.util.Map packageInformation(org.w3c.dom.Element xmiElement, java.util.Map id2extInfo)
          Description: Obtains the PackageInformation (name and documentation) and puts it on a map keyed by the model element id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateMageClassFileList

public CreateMageClassFileList()
                        throws java.lang.Exception
Description: Constructor for the CreateMageJavaClasses object.

Parameters:
Throws:
java.lang.Exception -

Method Detail

create

protected java.util.Vector create(org.w3c.dom.Element xmiElement,
                                  org.w3c.dom.Element packageList)
                           throws java.lang.Exception
Throws:
java.lang.Exception

docInformation

protected java.util.Map docInformation(org.w3c.dom.Element xmiElement)
Description: Obtains all the extension mechanism information and puts it on a map keyed by the model element id.

Parameters:
xmiElement: - top node beneath which information for the class can be found

Returns:
Map with the ExtensionMechanisms information keyed by id.


packageInformation

protected java.util.Map packageInformation(org.w3c.dom.Element xmiElement,
                                           java.util.Map id2extInfo)
Description: Obtains the PackageInformation (name and documentation) and puts it on a map keyed by the model element id.

Parameters:
xmiElement: - top node beneath which information for the class can be found
id2extInfo: - map where documentation for the package can be found

Returns:
Map with the package information keyed by id.


dataTypeInformation

protected java.util.Map dataTypeInformation(org.w3c.dom.Element xmiElement)
Description: Obtains the data type and puts it on a map keyed by the model element id.

Parameters:
xmiElement: - top node beneath which information for the class can be found

Returns:
Map with the data type keyed by id.


constraintInformation

protected java.util.Map constraintInformation(org.w3c.dom.Element xmiElement)
                                       throws java.lang.Exception
Description: Obtains constraint information and puts it on a map keyed by the association end element id.

Parameters:
xmiElement: - top node beneath which information for the classes can be found

Returns:
Map with the strings from the constraint nodes keyed by id.

Throws:
java.lang.Exception

associationInformation

protected java.util.Map associationInformation(org.w3c.dom.Element xmiElement)
                                        throws java.lang.Exception
Description: Obtains the association and the current end and places the information on a map keyed by the model element id.

Parameters:
xmiElement: - top node beneath which information for the class can be found

Returns:
Map with the associations keyed by id.

Throws:
java.lang.Exception

addToAssociationMap

protected void addToAssociationMap(java.util.Map map,
                                   org.w3c.dom.Element associationNode,
                                   org.w3c.dom.Element thisEndNode,
                                   org.w3c.dom.Element otherEndNode)
                            throws java.lang.Exception
Description: Obtains the association and the current end and places the information on a map keyed by the model element id.

Parameters:
xmiElement: - top node beneath which information for the class can be found

Throws:
java.lang.Exception

createClassFiles

protected java.util.Vector createClassFiles(org.w3c.dom.Element xmiElement,
                                            java.util.Map id2extInfo,
                                            java.util.Map id2packages,
                                            java.util.Map id2dataType,
                                            java.util.Map id2constraint)
                                     throws java.lang.Exception
Description: For each class in the XMI, will create a CreateClassFile object and place it on the return Vector.

Parameters:
xmiElement: - top node beneath which information for the class can be found.
id2extInfo: - map where documentation for the class can be found.
id2packages: - map where the package for the class can be found.
id2datatype: - map where the datatype information can be found by the datatype ID.
id2constraint: - map where the constrait information can be found by association end ID.

Returns:
Vector with the ClassFile information.

Throws:
java.lang.Exception

enumerateIdentifiable

protected void enumerateIdentifiable(java.util.Vector theList,
                                     java.util.Map id2classes)
                              throws java.lang.Exception
Description: This is a recursive function to determine abolutely whether or not an Object is identifiable.

Parameters:
theList - -- list of classes still to be classified

id2classes - - the list of classes needed to identify the parent class.
Throws:
java.lang.Exception

createInterfaceFiles

protected java.util.Vector createInterfaceFiles(java.util.Map interfaceName2associationEndElement,
                                                java.util.Map id2classElement,
                                                java.util.Map id2packageInformation)
                                         throws java.lang.Exception
Description: For each interface name, create a CreateInterfaceFile object.

Parameters:
interfaceName2associationEndElement: - map from interface name to association end element.
id2classElement: - map from ID to class element.
id2packageInformation: - the map from ID to package information.

Returns:
Vector with the CreateInterfaceFile objects.

Throws:
java.lang.Exception

createPackageClassFiles

protected java.util.Vector createPackageClassFiles(org.w3c.dom.Element packageList,
                                                   java.util.Map id2packages,
                                                   java.util.Map id2extInfo,
                                                   java.util.Vector classFiles,
                                                   java.util.Map id2classFiles)
                                            throws java.lang.Exception
Description: For each class in the XMI, will create a CreateClassFile object and place it on the return Vector.

Parameters:
packageList: - information on how to order the independent classes in the packages.
id2packages: - map where the package for the class can be found.
id2extInfo: - map where documentation for the class can be found.
classFiles: - list of the class file objects
id2classFiles: - map of classFiles to provide information needed by the package

Returns:
Vector with the ClassFile information.

Throws:
java.lang.Exception