org.biomage.tools.generate_java
Class CreateJavaMAGEFile

java.lang.Object
  extended by org.biomage.tools.generate_java.CreateJavaFile
      extended by org.biomage.tools.generate_java.CreateJavaMAGEFile

public class CreateJavaMAGEFile
extends CreateJavaFile

Description:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.biomage.tools.generate_java.CreateJavaFile
CreateJavaFile.rankComparator, CreateJavaFile.WriteAssociationAttrInformation, CreateJavaFile.WriteAttrInformation, CreateJavaFile.WriteRoleInformation
 
Constructor Summary
protected CreateJavaMAGEFile(CreateFile createFile, java.util.Vector classes)
           
 
Method Summary
 void printJavaClassFile(java.lang.String fullOutputDir, java.lang.String packagePath, java.io.File header)
          Description: From the parsed information creates the file itself.
 void writeModelToClassMap(java.io.FileWriter writer, java.lang.String packagePath)
          Description: It is not clear from the XML where to find the class when instantiating objects.
protected  void writeXMLWriterMethods(java.io.FileWriter writer)
          Description: Writes the methods for generating XML from the object data.
 
Methods inherited from class org.biomage.tools.generate_java.CreateJavaFile
getAttrVarName, writeAssnAttrDecl, writeAssnAttrMethods, writeAttrDecl, writeAttributeConstructor, writeAttrMethods, writeClassDecl, writeDataAttrDecl, writeDataAttrMethods, writeDefaultConstructor, writeExceptionClass, writeImports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateJavaMAGEFile

protected CreateJavaMAGEFile(CreateFile createFile,
                             java.util.Vector classes)
Method Detail

printJavaClassFile

public void printJavaClassFile(java.lang.String fullOutputDir,
                               java.lang.String packagePath,
                               java.io.File header)
                        throws java.lang.Exception
Description: From the parsed information creates the file itself.

Overrides:
printJavaClassFile in class CreateJavaFile
Parameters:
fullOutputDir: - the full path for the project.
packagePath: - the directory from which to start from.
header: - the preamble copyright and creation information.

Throws:
java.lang.Exception

writeXMLWriterMethods

protected void writeXMLWriterMethods(java.io.FileWriter writer)
                              throws java.lang.Exception
Description: Writes the methods for generating XML from the object data.

Overrides:
writeXMLWriterMethods in class CreateJavaFile
Parameters:
writer: - FileWriter to used to write to the file.

Throws:
java.lang.Exception

writeModelToClassMap

public void writeModelToClassMap(java.io.FileWriter writer,
                                 java.lang.String packagePath)
                          throws java.lang.Exception
Description: It is not clear from the XML where to find the class when instantiating objects. Since the model currently does not allow name clashes we can create a simple name to package map for all the classes. This method writes this information to the top-level object (currently MAGEJava). It is used by the XMLReader utility.

Throws:
java.lang.Exception