net.sourceforge.jdbcimporter.ant
Class DelimiterParserElement

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.ant.DelimiterParserElement

public class DelimiterParserElement
extends java.lang.Object

The DelimiterParserElement provides an Ant wrapper for setting a DelimiterParser object from Ant.

Version:
0.6
Author:
Chris Nagy

Field Summary
protected  BinaryDelimiterParser binaryParser
          The wrapped binary delimiter parser.
static java.lang.String FULL_PREFIX
          Alternative prefix used in the properties to identify that this property is a delimiter parser mapping.
protected  DelimiterParser parser
          The wrapped delimiter parser.
protected  java.util.Map plugins
          The mapping between delimtier parser types and implementations.
protected  java.lang.String prefix
          The current prefix used to lookup delimiter parsers.
static java.lang.String PREFIX
          The prefix used in the properties to identify that this property is a delimiter parser mapping.
protected  java.lang.String type
          The delimiter parser type.
 
Constructor Summary
DelimiterParserElement(java.util.Map plugins)
          Constructs an empty DelimiterParserElement with the given mapping between delimiter parser types and implementations.
DelimiterParserElement(java.lang.String prefix, java.util.Map plugins)
          Constructs an empty DelimiterParserElement with the given mapping between delimiter parser types and implementations.
 
Method Summary
 void addConfiguredProperty(PropertyElement element)
          Add a property to the delimiter parser.
 BinaryDelimiterParser getBinaryDelimiterParser()
          Returns the wrapped binary delimiter parser.
 DelimiterParser getDelimiterParser()
          Returns the wrapped delimiter parser.
 boolean isBinaryDelimiterParser()
          Returns true if the wrapped delimiter parser is a binary delimiter parser.
 void setType(java.lang.String type)
          Sets the delimiter parser type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static java.lang.String PREFIX
The prefix used in the properties to identify that this property is a delimiter parser mapping.


FULL_PREFIX

public static java.lang.String FULL_PREFIX
Alternative prefix used in the properties to identify that this property is a delimiter parser mapping. This prefix is used by the DataGeneratorTask.

Since:
0.69

prefix

protected java.lang.String prefix
The current prefix used to lookup delimiter parsers.


plugins

protected java.util.Map plugins
The mapping between delimtier parser types and implementations.


type

protected java.lang.String type
The delimiter parser type.


parser

protected DelimiterParser parser
The wrapped delimiter parser.


binaryParser

protected BinaryDelimiterParser binaryParser
The wrapped binary delimiter parser.

Since:
0.74
Constructor Detail

DelimiterParserElement

public DelimiterParserElement(java.util.Map plugins)
Constructs an empty DelimiterParserElement with the given mapping between delimiter parser types and implementations.

Parameters:
plugins - the plugin mapping

DelimiterParserElement

public DelimiterParserElement(java.lang.String prefix,
                              java.util.Map plugins)
Constructs an empty DelimiterParserElement with the given mapping between delimiter parser types and implementations. The DelimiterParserElement will use the given prefix too lookup delimiter parser implementations.

Parameters:
prefix - the prefix
plugins - the plugin mapping
Since:
0.69
Method Detail

setType

public void setType(java.lang.String type)
Sets the delimiter parser type. The type should map to an implementation class.

Parameters:
type - the delimiter parser type

addConfiguredProperty

public void addConfiguredProperty(PropertyElement element)
Add a property to the delimiter parser.

Parameters:
element - the property element

getDelimiterParser

public DelimiterParser getDelimiterParser()
                                   throws org.apache.tools.ant.BuildException
Returns the wrapped delimiter parser.

Returns:
the delimiter parser
Throws:
org.apache.tools.ant.BuildException

getBinaryDelimiterParser

public BinaryDelimiterParser getBinaryDelimiterParser()
Returns the wrapped binary delimiter parser.

Returns:
the binary delimiter parser
Since:
0.74

isBinaryDelimiterParser

public boolean isBinaryDelimiterParser()
Returns true if the wrapped delimiter parser is a binary delimiter parser.

Returns:
Flag indicating that the wrapped delimiter parser is a binary delimiter parser
Since:
0.74