org.biomage.tools.generate_java
Class CreateJavaFile.WriteAssociationAttrInformation

java.lang.Object
  extended by org.biomage.tools.generate_java.CreateJavaFile.WriteAttrInformation
      extended by org.biomage.tools.generate_java.CreateJavaFile.WriteAssociationAttrInformation
Enclosing class:
CreateJavaFile

protected class CreateJavaFile.WriteAssociationAttrInformation
extends CreateJavaFile.WriteAttrInformation

Description: Inner class to hold association attribute information. Checks to see if the association is a multivalued and adjusts the information accordingly.


Constructor Summary
protected CreateJavaFile.WriteAssociationAttrInformation()
          Description: C'tor for class.
 
Method Summary
protected  void writeAttr(java.io.FileWriter writer, CreateFile.AttrInformation attr)
          Description: Writes the attribute declaration to the file.
protected  void writeGetAndSet(java.io.FileWriter writer, CreateFile.AttrInformation attr)
          Description: Writes the attribute set and get methods.
protected  void writeListClass(java.io.FileWriter writer, CreateFile.AssociationAttrInformation attr)
          Description: Writes out an inner class based on the attribute name.
protected  void writeListPassThroughs(java.io.FileWriter writer, CreateFile.AssociationAttrInformation attr)
          Description: Writes methods for adding, getting and removing individual elements from the named vector.
protected  void writeMethod(java.io.FileWriter writer, CreateFile.AssociationAttrInformation attr, java.lang.String comment, boolean isVoidMethod, boolean isIndexed, boolean isLookedUp, java.lang.String methodName, java.lang.String preposition)
          Description: Writes out a method.
 
Methods inherited from class org.biomage.tools.generate_java.CreateJavaFile.WriteAttrInformation
getDatatype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateJavaFile.WriteAssociationAttrInformation

protected CreateJavaFile.WriteAssociationAttrInformation()
                                                  throws java.lang.Exception
Description: C'tor for class.

Parameters:
attrInfo: - class to obtain information to write the attr sections.

Throws:
java.lang.Exception
Method Detail

writeAttr

protected void writeAttr(java.io.FileWriter writer,
                         CreateFile.AttrInformation attr)
                  throws java.lang.Exception
Description: Writes the attribute declaration to the file.

Overrides:
writeAttr in class CreateJavaFile.WriteAttrInformation
Parameters:
writer: - FileWriter to used to write to the file.
attr: - information on the attribute.

Throws:
java.lang.Exception

writeListClass

protected void writeListClass(java.io.FileWriter writer,
                              CreateFile.AssociationAttrInformation attr)
                       throws java.lang.Exception
Description: Writes out an inner class based on the attribute name.

Parameters:
writer: - where to write the information.
attr: - information on the attribute.

Throws:
java.lang.Exception

writeListPassThroughs

protected void writeListPassThroughs(java.io.FileWriter writer,
                                     CreateFile.AssociationAttrInformation attr)
                              throws java.lang.Exception
Description: Writes methods for adding, getting and removing individual elements from the named vector. Very simple minded.

Parameters:
writer: - FileWriter to used to write to the file.
attr: - information on the attribute.

Throws:
java.lang.Exception

writeMethod

protected void writeMethod(java.io.FileWriter writer,
                           CreateFile.AssociationAttrInformation attr,
                           java.lang.String comment,
                           boolean isVoidMethod,
                           boolean isIndexed,
                           boolean isLookedUp,
                           java.lang.String methodName,
                           java.lang.String preposition)
                    throws java.lang.Exception
Description: Writes out a method.

Parameters:
writer: - FileWriter to used to write to the file.
attr: - information on the attribute.

Throws:
java.lang.Exception

writeGetAndSet

protected void writeGetAndSet(java.io.FileWriter writer,
                              CreateFile.AttrInformation attr)
                       throws java.lang.Exception
Description: Writes the attribute set and get methods.

Overrides:
writeGetAndSet in class CreateJavaFile.WriteAttrInformation
Parameters:
writer: - FileWriter to used to write to the file.
attr: - information on the attribute.

Throws:
java.lang.Exception