org.biomage.tools.generate_classes
Class CreateInterfaceFile

java.lang.Object
  extended by org.biomage.tools.generate_classes.CreateFile
      extended by org.biomage.tools.generate_classes.CreateInterfaceFile

public class CreateInterfaceFile
extends CreateFile

Description: Class that is responsible for generating a java file for the interface represented by the association end node passed into the constructor.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.biomage.tools.generate_classes.CreateFile
CreateFile.AssociationAttrInformation, CreateFile.AttrInformation, CreateFile.IdentifierAttrInformation, CreateFile.RoleInformation
 
Field Summary
 
Fields inherited from class org.biomage.tools.generate_classes.CreateFile
associationInfo, baseClassCreateFile, baseClassID, baseClassName, classDoc, className, concreteSubClassNames, dataAttrInfo, importDate, importSerializable, importVector, interfaceInfo, isAbstract, isBaseClass, isIdentifiable, isIndependent, isInterface, isReferenced, JAVA_INTERFACE, methodInfo, NEWLINE, packageDoc, packageImports, packageName, roleNames, subClassNames, typeOwned, UML_CLASS, UML_MODEL, UML_PACKAGE, visibility
 
Constructor Summary
CreateInterfaceFile(java.lang.String sInterfaceName, org.w3c.dom.Element associationEndElement, java.util.Map id2classElement, java.util.Map id2packageInformation)
          Description: Constructor for the interface file generator.
 
Method Summary
protected  void associationInformation()
          Description: Puts together the information on the interface associations.
 int getFileType()
          Description: Returns what kind of model element this class is based on.
static java.lang.String getInterfaceName(java.lang.String sRoleName)
          Description: Converts a role name to an interface name.
protected  void headerInformation()
          Description: Obtains the information to generate the information for the package and the declaration of the class.
 
Methods inherited from class org.biomage.tools.generate_classes.CreateFile
addAssociation, addAssociation, addAssociation, addRoleName, getAssociationInfo, getAttrInfo, getBaseClassCreateFile, getBaseClassFileName, getBaseClassID, getClassDoc, getClassFileName, getConcreteSubClassNames, getDocumentation, getImports, getInterfaceInfo, getMethodInfo, getPackageID, getPackageName, getRoleNames, getVisibility, importDate, importSerializable, importVector, isAbstract, isBaseClass, isIdentifiableClass, isIndependentClass, isReferenced, isReferenced, registerSubClassName, registerWithBaseClass, setBaseClassCreateFile, setIsIndependentClass, setVisibility, typeOwned, typeOwned
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateInterfaceFile

public CreateInterfaceFile(java.lang.String sInterfaceName,
                           org.w3c.dom.Element associationEndElement,
                           java.util.Map id2classElement,
                           java.util.Map id2packageInformation)
                    throws java.lang.Exception
Description: Constructor for the interface file generator.

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

Throws:
java.lang.Exception
Method Detail

getInterfaceName

public static java.lang.String getInterfaceName(java.lang.String sRoleName)
                                         throws java.lang.Exception
Description: Converts a role name to an interface name.

Parameters:
sRoleName: - role name.

Returns:
a string which is the interface name.

Throws:
java.lang.Exception

associationInformation

protected void associationInformation()
                               throws java.lang.Exception
Description: Puts together the information on the interface associations. Overwrites base class to handle multi-valued associations

Throws:
java.lang.Exception

headerInformation

protected void headerInformation()
                          throws java.lang.Exception
Description: Obtains the information to generate the information for the package and the declaration of the class.

Throws:
java.lang.Exception

getFileType

public int getFileType()
Description: Returns what kind of model element this class is based on.

Specified by:
getFileType in class CreateFile
Returns:
returns that this represents the model itself