|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmonks.batch.io.RecordSpec
org.jmonks.batch.io.flat.DelimitedFlatFileRecordSpec
DelimitedFlatFileRecordSpec represents record-spec element in the file spec
belongs to the delimited flat file type. Along with the record-type
attribute
it looks for the two additional attributes delimiter
and field-count
.
Attribute delimiter
tells the value that divides or delimits the fields
and attribute field-count
tells the number of fields exists in the record.
There should be only one record spec is allowed in this file spec.
Here is a sample spec snippet...
<file-spec file-type="delimited-flat"> <record-spec record-type="detail" delimiter="|" field-count="4"> <!-- field specs will follow here --> </record-spec> </file-spec>
Field Summary | |
static java.lang.String |
DELIMITER_ATTRIB_NAME
Constant defines the delimiter attribute name which the value is "delimiter" |
static java.lang.String |
FIELD_COUNT_ATTRIB_NAME
Constant defines the field count attribute name which the value is "field-count" |
Fields inherited from class org.jmonks.batch.io.RecordSpec |
fieldSpecList, RECORD_SPEC_TAG_NAME, RECORD_TYPE_ATTRIB_NAME, recordType |
Constructor Summary | |
protected |
DelimitedFlatFileRecordSpec(RecordType recordType)
Constructs the record spec by accepting the record type. |
Method Summary | |
static DelimitedFlatFileRecordSpec |
createDelimitedFlatFileRecordSpec(org.w3c.dom.Element recordSpecElement)
Factory method to create the delimited flat record spec from the given DOM Element representing the record-spec element in the file spec. |
java.lang.String |
getDelimiter()
Returns the delimiter which divides the fields in the record. |
int |
getFieldCount()
Returns the number of fields exists in this record. |
java.lang.String |
toString()
|
Methods inherited from class org.jmonks.batch.io.RecordSpec |
addFieldSpec, getFieldSpecs, getRecordType |
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 DELIMITER_ATTRIB_NAME
public static final java.lang.String FIELD_COUNT_ATTRIB_NAME
Constructor Detail |
protected DelimitedFlatFileRecordSpec(RecordType recordType)
Method Detail |
public java.lang.String getDelimiter()
public int getFieldCount()
public static DelimitedFlatFileRecordSpec createDelimitedFlatFileRecordSpec(org.w3c.dom.Element recordSpecElement)
recordSpecElement
- DOM Element representing the record spec.
FileSpecException
- If record-spec
doesnt have the delimiter or record-type attribute or index value is repeated on more than one field spec.public java.lang.String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |