|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jdbcimporter.config.ImportEntityConfigDelegate
The ImportEntityConfigDelegate is an implementation of the EntityConfigDelegate that creates ImportEntityDef and ImportColumnDef. A custom object factory should be set before creating the EntityDef.
| Field Summary | |
protected CustomObjectFactory |
binaryDelimiterParserFactory
Custom object factory that creates binary delimiter parsers. |
static java.lang.String |
COLUMN_TRANSLATOR_ATTR
The element name that contains the ColumnTranslator classname to use on all column values to be imported. |
static java.lang.String |
COLUMN_TRANSLATOR_TAG
The element name that contains the ColumnTranslator definition to use on all column values to be imported. |
static java.lang.String |
COLUMN_TRANSLATOR_TYPE_ATTR
The attribute name that contains the ColumnTranslator type that maps to a classname. |
protected CustomObjectFactory |
columnTranslatorFactory
Custom object factory that creates column translators. |
static java.lang.String |
DELIMITER_TAG
The element name that contains the DelimiterParser definition. |
static java.lang.String |
DELIMITER_TYPE_ATTR
The attribute name in the DELIMITER_TAG element that contains contains the delimiter type. |
protected CustomObjectFactory |
delimiterParserFactory
Custom object factory that creates delimiter parsers. |
static java.lang.String |
GENERATE_ATTR
The attribute name in the COLUMN_TAG element that defines whether the column is imported from the source file (false) or generated (true). |
protected GenerateEntityConfigDelegate |
generateColumnConfigDelegate
Delegate used to create GenerateColumnDef. |
static java.lang.String |
IMPORT_ENGINE_ATTR
The attribute name that contains the class name of import engine used to import this entity. |
protected static org.apache.commons.logging.Log |
LOG
The log for debug information. |
static java.lang.String |
ROW_TRANSLATOR_TAG
The element name that contains the RowTranslator definition. |
static java.lang.String |
ROW_TRANSLATOR_TYPE_ATTR
The attribute name that contains the RowTranslator type that maps to a classname. |
protected CustomObjectFactory |
rowTranslatorFactory
Custom object factory that creates row translators. |
static java.lang.String |
SOURCE_ATTR
The attribute name that contains the name of data file to import with this entity. |
static java.lang.String |
SOURCE_ENCODING_ATTR
The attribute name that contains the encoding of the source file. |
| Constructor Summary | |
ImportEntityConfigDelegate()
Creates an ImportEntityConfigDelegate. |
|
| Method Summary | |
ColumnDef |
createColumnDef(org.w3c.dom.Node column)
Create a ColumnDef from the given node and apply any custom attributes. |
EntityDef |
createEntityDef(org.w3c.dom.Node node)
Create an EntityDef from the given node and apply any custom attributes. |
protected void |
initDelimiter(ImportEntityDef entityDef,
org.w3c.dom.Node delimiter)
Initialize the delimiter parser from the XML node. |
protected void |
initRowTranslator(ImportEntityDef entityDef,
org.w3c.dom.Node rowTranslator)
Initialize the row translator from the XML node. |
protected ColumnTranslator |
instantiateTranslator(java.lang.String className)
Instantiate the ColumnTranslator. |
void |
setBinaryDelimiterParserFactory(CustomObjectFactory newFactory)
Sets the BinaryDelimiterParser factory to use when creating the EntityDef. |
void |
setColumnTranslatorFactory(CustomObjectFactory newFactory)
Sets the ColumnTranslator factory to use when creating the ColumnDef(s). |
void |
setColumnValueGeneratorFactory(CustomObjectFactory factory)
Set the custom object factory for creating column value generators. |
void |
setDelimiterParserFactory(CustomObjectFactory newFactory)
Sets the DelimiterParser factory to use when creating the EntityDef. |
void |
setRowTranslatorFactory(CustomObjectFactory newFactory)
Set the custom object factory for create row translators. |
| 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 SOURCE_ATTR
public static final java.lang.String SOURCE_ENCODING_ATTR
public static final java.lang.String IMPORT_ENGINE_ATTR
public static final java.lang.String GENERATE_ATTR
public static final java.lang.String DELIMITER_TAG
public static final java.lang.String DELIMITER_TYPE_ATTR
public static final java.lang.String COLUMN_TRANSLATOR_ATTR
public static final java.lang.String COLUMN_TRANSLATOR_TAG
public static final java.lang.String COLUMN_TRANSLATOR_TYPE_ATTR
public static final java.lang.String ROW_TRANSLATOR_TAG
public static final java.lang.String ROW_TRANSLATOR_TYPE_ATTR
protected CustomObjectFactory delimiterParserFactory
protected CustomObjectFactory binaryDelimiterParserFactory
protected CustomObjectFactory columnTranslatorFactory
protected GenerateEntityConfigDelegate generateColumnConfigDelegate
protected CustomObjectFactory rowTranslatorFactory
| Constructor Detail |
public ImportEntityConfigDelegate()
| Method Detail |
public void setDelimiterParserFactory(CustomObjectFactory newFactory)
newFactory - the delimiter parser factorypublic void setBinaryDelimiterParserFactory(CustomObjectFactory newFactory)
newFactory - the binary delimiter parser factorypublic void setColumnTranslatorFactory(CustomObjectFactory newFactory)
newFactory - the column translator factorypublic void setColumnValueGeneratorFactory(CustomObjectFactory factory)
factory - the column value generator factorypublic void setRowTranslatorFactory(CustomObjectFactory newFactory)
newFactory - the row translator factory
public EntityDef createEntityDef(org.w3c.dom.Node node)
throws org.w3c.dom.DOMException,
InvalidCustomObjectDefException
EntityConfigDelegate
createEntityDef in interface EntityConfigDelegatenode - the element node with the name 'entity'
InvalidCustomObjectDefException - if the custom EntityDef could not be created
org.w3c.dom.DOMException - if any custom attributes are missing or invalidEntityConfigDelegate.createEntityDef(org.w3c.dom.Node)
protected void initDelimiter(ImportEntityDef entityDef,
org.w3c.dom.Node delimiter)
throws org.w3c.dom.DOMException,
InvalidCustomObjectDefException
entityDef - the entity definition to add the delimiter parserdelimiter - the node
org.w3c.dom.DOMException - if the node has missing attributes/elements
InvalidCustomObjectDefException - if the delimiter parser could not
be created from the delimiter parser factory
protected void initRowTranslator(ImportEntityDef entityDef,
org.w3c.dom.Node rowTranslator)
throws org.w3c.dom.DOMException,
InvalidCustomObjectDefException
entityDef - the entity definition to add the row translatorrowTranslator - the node
org.w3c.dom.DOMException - if the node has missing elements/attributes
InvalidCustomObjectDefException - if the row translator could not
be created from the row translator factory
public ColumnDef createColumnDef(org.w3c.dom.Node column)
throws org.w3c.dom.DOMException,
InvalidCustomObjectDefException
EntityConfigDelegate
createColumnDef in interface EntityConfigDelegatecolumn - the element node with the name 'column'
org.w3c.dom.DOMException - if any custom attributes are missing or invalid
InvalidCustomObjectDefException - if the custom ColumnDef could not be createdEntityConfigDelegate.createColumnDef(org.w3c.dom.Node)
protected ColumnTranslator instantiateTranslator(java.lang.String className)
throws org.w3c.dom.DOMException
className - the class name of the column translator
org.w3c.dom.DOMException - if the column translator could not be created
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||