|
|||||||||||
| 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.FixedWidthFlatFileFieldSpec
FixedWidthFlatFileFieldSpec represents field-spec element in the record spec
belongs to the fixed width flat file type. Along with the field-name attribute
it looks for the start-pos and end-pos attributes in the field-spec element to retrieve
the field from the record. Field name on field-spec should be unique across the record-spec.
Position value starts with "1" in the record and the start-pos and end-pos values are inclusive.
Here is a sample spec snippet...
<file-spec file-type="fixed-width-flat">
<record-spec record-type="detail" starts-with="5">
<field-spec field-name="consumer-id" start-pos="2" end-pos="11"/>
<field-spec field-name="consumer-name" start-pos="12" end-pos="31"/>
</record-spec>
</file-spec>
| Field Summary | |
static java.lang.String |
END_POSITION_ATTRIB_NAME
Constant defines the end position attribute name. |
static java.lang.String |
START_POSITION_ATTRIB_NAME
Constant defines the start position attribute name. |
| Fields inherited from class org.jmonks.batch.io.FieldSpec |
FIELD_NAME_ATTRIB_NAME, FIELD_SPEC_TAG_NAME, fieldName |
| Constructor Summary | |
protected |
FixedWidthFlatFileFieldSpec(java.lang.String fieldName)
Creates a new instance of FixedWidthFlatFileFieldSpec by using field name. |
| Method Summary | |
static FixedWidthFlatFileFieldSpec |
createFixedWidthFlatFileFieldSpec(org.w3c.dom.Element fieldSpecElement)
Factory method to create the FixedWidthFlatFileFieldSpec instance from the given DOM Element representing the filed-spec element in record spec. |
int |
getEndPosition()
Gets the ending position of the field. |
int |
getFieldWidth()
Gets the field width. |
int |
getStartPosition()
Gets the starting position of the field. |
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 START_POSITION_ATTRIB_NAME
public static final java.lang.String END_POSITION_ATTRIB_NAME
| Constructor Detail |
protected FixedWidthFlatFileFieldSpec(java.lang.String fieldName)
| Method Detail |
public int getStartPosition()
public int getEndPosition()
public int getFieldWidth()
public static FixedWidthFlatFileFieldSpec createFixedWidthFlatFileFieldSpec(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.public java.lang.String toString()
Object.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||