|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.datagenerator.DataGenerator
The DataGenerator class is the main class that controls the generation of data.
| Field Summary | |
protected CustomObjectFactory |
binaryDelimiterParserFactory
The factory for producing binary delimiter parsers. |
static java.lang.String |
COLUMNTRANSLATOR_PREFIX
Prefix for the column translator classes to use. |
protected CustomObjectFactory |
columnTranslatorFactory
The factory for producing column translators. |
protected CustomObjectFactory |
columnValueGeneratorFactory
The factory for producing column value generators. |
static java.lang.String |
CONNECTION_PREFIX
Prefix for the connection definition classes to use. |
protected CustomObjectFactory |
connectionDefFactory
The factory for producing connection definitions. |
protected java.util.List |
dataGeneratorListeners
The event listeners. |
static java.lang.String |
DELIMITER_PARSER_PREFIX
Prefix for the delimiter parser classes to use. |
static java.lang.String |
DELIMITER_PREFIX
Prefix for the delimiter formatter classes to use. |
protected CustomObjectFactory |
delimiterFormatterFactory
The factory for producing delimiter formatters. |
protected CustomObjectFactory |
delimiterParserFactory
The factory for producing delimiter parsers. |
protected GenerateDef |
generateDef
The data generation definition. |
static java.lang.String |
GENERATOR_PREFIX
Prefix for the column value generator classes to use. |
protected static org.apache.commons.logging.Log |
LOG
The log for debug information. |
| Constructor Summary | |
DataGenerator()
Constructs a new data generator with the default mappings. |
|
| Method Summary | |
void |
addDataGeneratorListener(DataGeneratorListener listener)
Adds a data generator listener. |
void |
beginGenerate()
Generate data by processing entity definitions via the entity generator. |
protected void |
fireDataGeneratorEvent(DataGeneratorEvent e,
boolean start)
Fire a data generator event to the event listeners. |
void |
initGenerateDef(org.xml.sax.InputSource source)
Read and parses the generate config file into a GenerateDef class. |
protected void |
initPlugins(java.util.Properties pluginProperties)
Adds the external connection definition classes, delimiter formatter, delimiter parsers, column value generator, and column translator classes to the appropriate factories. |
void |
initPlugins(java.lang.String pluginFile)
Parse the plugin property file and adds the external connection definition classes, delimiter formatter and column value generator classes to the appropriate factories. |
static void |
main(java.lang.String[] args)
|
void |
removeDataGeneratorListener(DataGeneratorListener listener)
Removes a data generator listener. |
void |
setGenerateDef(GenerateDef def)
Sets the generate def. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.commons.logging.Log LOG
public static final java.lang.String CONNECTION_PREFIX
public static final java.lang.String DELIMITER_PREFIX
public static final java.lang.String DELIMITER_PARSER_PREFIX
public static final java.lang.String GENERATOR_PREFIX
public static final java.lang.String COLUMNTRANSLATOR_PREFIX
protected CustomObjectFactory connectionDefFactory
protected CustomObjectFactory delimiterFormatterFactory
protected CustomObjectFactory delimiterParserFactory
protected CustomObjectFactory binaryDelimiterParserFactory
protected CustomObjectFactory columnValueGeneratorFactory
protected CustomObjectFactory columnTranslatorFactory
protected GenerateDef generateDef
protected java.util.List dataGeneratorListeners
| Constructor Detail |
public DataGenerator()
| Method Detail |
public void setGenerateDef(GenerateDef def)
def - generate def
public void initGenerateDef(org.xml.sax.InputSource source)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
org.w3c.dom.DOMException,
InvalidCustomObjectDefException
source - input source
java.io.IOException - if the file could not be read
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
org.w3c.dom.DOMException
InvalidCustomObjectDefException
public void initPlugins(java.lang.String pluginFile)
throws java.io.FileNotFoundException,
java.io.IOException
pluginFile - plugin property file
java.io.FileNotFoundException - if the plugin file cannot be found
java.io.IOException - if the plugin file cannot be opened and readprotected void initPlugins(java.util.Properties pluginProperties)
pluginProperties - the set of plugins
public void beginGenerate()
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException - if the log file is not valid
java.io.IOException - if the log file file cannot be opened and written to
protected void fireDataGeneratorEvent(DataGeneratorEvent e,
boolean start)
e - the eventstart - true if the data generation startedpublic void addDataGeneratorListener(DataGeneratorListener listener)
listener - the listenerpublic void removeDataGeneratorListener(DataGeneratorListener listener)
listener - the listenerpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||