|
|||||||||||
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.xml.XMLRecordSpec
XMLRecordSpec represents record-spec element in the file spec belongs to the xml file type. Along with the record-type attribute it looks for the record-xpath attribute in the record-spec element to identify the record. Record type and record-xpath attribute values should be unique across the file-spec. XML Record spec doesnt require any field specs to be defined. treats all the elements underneath the given xpath as a fields. Here is a sample spec snippet...
<file-spec file-type="xml" root-element="consumer-request"> <record-spec record-type="detail" record-xpath="/consumer-request/consumer-add"/> </file-spec>
Field Summary | |
static java.lang.String |
RECORD_XPATH_ATTRIB_NAME
Constant defines the record xpath attribute name. |
protected java.lang.String |
recordXPath
Holds the record spec xpath. |
Fields inherited from class org.jmonks.batch.io.RecordSpec |
fieldSpecList, RECORD_SPEC_TAG_NAME, RECORD_TYPE_ATTRIB_NAME, recordType |
Constructor Summary | |
XMLRecordSpec(RecordType recordType)
Constructs the XMLRecordSpec by using record type. |
Method Summary | |
static RecordSpec |
createXMLRecordSpec(org.w3c.dom.Element recordSpecElement)
Factory method to create the xml record spec from the given DOM Element representing the record-spec element in the file spec. |
java.lang.String |
getRecordXPath()
Gets the xpath to identify the record. |
boolean |
isMatch(java.lang.String xpath)
Tells whether given xpath matches the xpath of this record spec. |
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 |
protected java.lang.String recordXPath
public static final java.lang.String RECORD_XPATH_ATTRIB_NAME
Constructor Detail |
public XMLRecordSpec(RecordType recordType)
recordType
- Type of the record.Method Detail |
public java.lang.String getRecordXPath()
public boolean isMatch(java.lang.String xpath)
xpath
- Value to be compared with the record specs.
java.lang.IllegalArgumentException
- If xpath is null.public static RecordSpec createXMLRecordSpec(org.w3c.dom.Element recordSpecElement)
recordSpecElement
- DOM Element representing the record spec.
FileSpecException
- If record-spec
doesnt have the record-xpath or record-type attribute.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |