com.ibm.dse.tools.workbench.gui
Class DTDGenerator

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.gui.DTDGenerator

public class DTDGenerator
extends java.lang.Object
implements Externalizer, TableNames

This class implements the DTD generator. It's used to generate de DTD of the selected entities


Fields inherited from interface com.ibm.dse.tools.workbench.base.TableNames
ALLOWED_VALUES, ATTRIBUTES, DOMAINS, ENTITIES, ENTITIES_ENTITIES, GROUPS, GROUPS_ENTITIES, GROUPS_GROUPS, GROUPS_INSTANCES, INSTANCE_ERRORS, INSTANCES, PROPERTIES, USERS
 
Constructor Summary
DTDGenerator()
          This method creates a DTD generator object.
 
Method Summary
 java.lang.String externalize(TableRow row)
          This method generate the DTD of an entity
 void externalize(TableRow[] rows)
          This method generates the DTD of a row vector of entities to several files, one for each entity, one for each different basegroup, and another one for all the basegroups.
 java.lang.String getFormat()
          This method returns the output format acronym.
 java.lang.String getName()
          This method returns the name of the externalizer.
 java.io.Reader getTemplateReader(java.lang.String location)
          This method returns the template reader if the template location exists and can be read.
 void invokeSetup()
          This method shows, if available, the setup or options view to configure the externalizer.
 void invokeWizard(Repository repository)
          This method invokes the externalizer wizard, if available, to guide the user in the externalization process.
 void setProperties(java.util.Properties properties)
          This method sets the properties for the externalizer, instead of using invokeSetup method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTDGenerator

public DTDGenerator()
This method creates a DTD generator object.
Method Detail

externalize

public void externalize(TableRow[] rows)
This method generates the DTD of a row vector of entities to several files, one for each entity, one for each different basegroup, and another one for all the basegroups.
Specified by:
externalize in interface Externalizer
Parameters:
rows - com.ibm.dse.tools.workbench.base.TableRow[] The entities

externalize

public java.lang.String externalize(TableRow row)
                             throws WorkbenchException
This method generate the DTD of an entity
Specified by:
externalize in interface Externalizer
Parameters:
row - com.ibm.dse.tools.workbench.base.TableRow The entity to be externalized
Returns:
java.lang.String The DTD
Throws:
WorkbenchException - An error occurs during externalization

getFormat

public java.lang.String getFormat()
This method returns the output format acronym.
Specified by:
getFormat in interface Externalizer
Returns:
java.lang.String

getName

public java.lang.String getName()
This method returns the name of the externalizer.
Specified by:
getName in interface Externalizer
Returns:
java.lang.String

getTemplateReader

public java.io.Reader getTemplateReader(java.lang.String location)
                                 throws WBInputOutputException
This method returns the template reader if the template location exists and can be read.
Parameters:
location - java.lang.String
Returns:
Reader
Throws:
WBInputOutputException - An I/O error occurs reading the template

invokeSetup

public void invokeSetup()
This method shows, if available, the setup or options view to configure the externalizer.
Specified by:
invokeSetup in interface Externalizer

invokeWizard

public void invokeWizard(Repository repository)
This method invokes the externalizer wizard, if available, to guide the user in the externalization process.
Specified by:
invokeWizard in interface Externalizer
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository

setProperties

public void setProperties(java.util.Properties properties)
This method sets the properties for the externalizer, instead of using invokeSetup method.
Specified by:
setProperties in interface Externalizer
Parameters:
properties - java.util.Properties