|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmonks.batch.io.FieldSpec
org.jmonks.batch.io.flat.DelimitedFlatFileFieldSpec
DelimitedFlatFileFieldSpec represents field-spec
element in the record spec
element belongs to the delimited flat file type. Along with the field-name
attribute
it looks for the index
attribute in the field-spec element to retrieve
the field from the record. It specifies the field position in the record.
Field index value starts with 1.
Filed name on field-spec should be unique across the record-spec.
Here is a sample spec snippet...
<file-spec file-type="delimited-flat"> <record-spec record-type="detail" delimiter="|"> <field-spec field-name="consumer-id" index="1"/> <field-spec field-name="consumer-name" index="2"/> </record-spec> </file-spec>
Field Summary | |
static java.lang.String |
INDEX_ATTRIB_NAME
Constant defines the index attribute name which is "index" |
Fields inherited from class org.jmonks.batch.io.FieldSpec |
FIELD_NAME_ATTRIB_NAME, FIELD_SPEC_TAG_NAME, fieldName |
Constructor Summary | |
protected |
DelimitedFlatFileFieldSpec(java.lang.String fieldName)
Creates a new instance of DelimitedFlatFileFieldSpec by using field name. |
Method Summary | |
static DelimitedFlatFileFieldSpec |
createDelimitedFlatFileFieldSpec(org.w3c.dom.Element fieldSpecElement)
Factory method to create the DelimitedFlatFileFieldSpec instance from the given DOM Element representing the filed-spec element in record spec. |
int |
getIndex()
Returns the index of field in the record. |
java.lang.String |
toString()
|
Methods inherited from class org.jmonks.batch.io.FieldSpec |
getFieldName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String INDEX_ATTRIB_NAME
Constructor Detail |
protected DelimitedFlatFileFieldSpec(java.lang.String fieldName)
Method Detail |
public int getIndex()
public static DelimitedFlatFileFieldSpec createDelimitedFlatFileFieldSpec(org.w3c.dom.Element fieldSpecElement)
fieldSpecElement
- DOM Element representing the field-spec element.
FileSpecException
- If field-spec
field-name values are not unique across record-spec and it is missing index attribute.public java.lang.String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |