|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.datagenerator.config.GenerateConfig
The GenerateConfig class parses a Node to create an GenerateDef. The Node's name must be 'generate'.
Field Summary | |
static java.lang.String |
CONNECTION_TAG
The element name that contains the ConnectionDef. |
static java.lang.String |
CONNECTION_TYPE_ATTR
The attribute name in the CONNECTION_TAG element that contains the connection type. |
protected CustomObjectFactory |
connectionDefFactory
The connection definition object factory. |
static java.lang.String |
ENTITY_TAG
The element name that contains the EntityDef. |
protected EntityConfig |
entityConfig
The entity config that parses data generate entity definitons. |
protected GenerateEntityConfigDelegate |
entityConfigDelegate
The delegate that helps the entity config parse data generate entity definitions. |
protected EntityConfig |
exportEntityConfig
The entity config that parses export entity definitons. |
protected ExportEntityConfigDelegate |
exportEntityConfigDelegate
The delegate that helps the entity config parse export entity definitions. |
static java.lang.String |
GENERATE_TAG
The element name that contains the GenerateDef. |
protected EntityConfig |
importEntityConfig
The entity config that parses import entity definitons. |
protected ImportEntityConfigDelegate |
importEntityConfigDelegate
The delegate that helps the entity config parse import entity definitions. |
static java.lang.String |
LOG_FILE_ATTR
The attribute name in the LOG_TAG element that contains the filename of the log file. |
static java.lang.String |
SOURCE_DB_VALUE
The source attribute's value that indicates that the entity should be an ExportEntityDef. |
Constructor Summary | |
GenerateConfig()
Constructs an GenerateConfig. |
Method Summary | |
protected EntityConfig |
getEntityConfig(org.w3c.dom.Node entity)
Returns the correct EntityConfig that can handle parsing the given node. |
GenerateDef |
getGenerate(org.w3c.dom.Node node)
Returns the GenerateDef defined in the given Node. |
protected void |
initConnection(GenerateDef generateDef,
org.w3c.dom.Node connection)
Load the connection definition defined in the given node into the GenerateDef. |
void |
setBinaryDelimiterParserFactory(CustomObjectFactory newFactory)
Sets the BinaryDelimiterParserFactory to use when creating EntityDef(s). |
void |
setColumnTranslatorFactory(CustomObjectFactory newFactory)
Sets the ColumnTranslatorFactory to use when creating EntityDef(s). |
void |
setColumnValueGeneratorFactory(CustomObjectFactory newFactory)
Sets the ColumnValueGeneratorFactory to use when creating EntityDef(s). |
void |
setConnectionDefFactory(CustomObjectFactory newFactory)
Sets the ConnectionDefFactory to use when creating an GenerateDef. |
void |
setDelimiterFormatterFactory(CustomObjectFactory newFactory)
Sets the DelimiterFormatterFactory to use when creating EntityDef(s). |
void |
setDelimiterParserFactory(CustomObjectFactory newFactory)
Sets the DelimiterParserFactory to use when creating EntityDef(s). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String GENERATE_TAG
public static final java.lang.String CONNECTION_TAG
public static final java.lang.String CONNECTION_TYPE_ATTR
public static final java.lang.String LOG_FILE_ATTR
public static final java.lang.String ENTITY_TAG
public static final java.lang.String SOURCE_DB_VALUE
protected CustomObjectFactory connectionDefFactory
protected EntityConfig entityConfig
protected EntityConfig importEntityConfig
protected EntityConfig exportEntityConfig
protected GenerateEntityConfigDelegate entityConfigDelegate
protected ImportEntityConfigDelegate importEntityConfigDelegate
protected ExportEntityConfigDelegate exportEntityConfigDelegate
Constructor Detail |
public GenerateConfig()
Method Detail |
public void setConnectionDefFactory(CustomObjectFactory newFactory)
newFactory
- the connection definition factorypublic void setDelimiterFormatterFactory(CustomObjectFactory newFactory)
newFactory
- the delimiter formatter factorypublic void setDelimiterParserFactory(CustomObjectFactory newFactory)
newFactory
- the delimiter parser factorypublic void setBinaryDelimiterParserFactory(CustomObjectFactory newFactory)
newFactory
- the binary delimiter parser factorypublic void setColumnValueGeneratorFactory(CustomObjectFactory newFactory)
newFactory
- the column value generator factorypublic void setColumnTranslatorFactory(CustomObjectFactory newFactory)
newFactory
- the column translator factorypublic GenerateDef getGenerate(org.w3c.dom.Node node) throws org.w3c.dom.DOMException, InvalidCustomObjectDefException
node
- the node
org.w3c.dom.DOMException
- if the node has missing or invalid attributes/elements
InvalidCustomObjectDefException
protected void initConnection(GenerateDef generateDef, org.w3c.dom.Node connection) throws org.w3c.dom.DOMException, InvalidCustomObjectDefException
generateDef
- the generate definitionconnection
- the node
org.w3c.dom.DOMException
- if the node is invalid
InvalidCustomObjectDefException
- if the connection definition could not be created
by the connection definition factoryprotected EntityConfig getEntityConfig(org.w3c.dom.Node entity)
entity
- the node representing the entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |