|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.berryworks.edireader.EDIAbstractReader
com.berryworks.edireader.EDIReader
public class EDIReader
Reads and parses an EDI interchange in any of the supported EDI standards. Once a specific EDI standard is identified, EDIReader delegates the actual parsing to a subclass of EDIReader that it creates. This delegation technique allows an application to use EDIReader just as it would an XMLReader and without having to configure or otherwise signal for a particular standard to be used. Another advantage of this approach is that it provides a framework for additional EDIReader subclasses to be developed and integrated with little impact.
Field Summary | |
---|---|
static boolean |
debug
If debug is set to true, then a parser may emit diagnostic information to System.err |
Fields inherited from interface com.berryworks.edireader.error.ErrorMessages |
---|
CONTROL_NUMBER_GE, CONTROL_NUMBER_IEA, CONTROL_NUMBER_SE, CONTROL_NUMBER_UNT, CONTROL_NUMBER_UNZ, COUNT_GE, COUNT_IEA, COUNT_SE, COUNT_UNT, COUNT_UNZ, DIGITS_ONLY, ELEMENT_TOO_LONG, EXPECTED_SIMPLE_TOKEN, FIRST_SEGMENT_MUST_BE_UNA_OR_UNB, INCOMPLETE_ACH_MESSAGE, INCOMPLETE_HL7_MESSAGE, INCOMPLETE_X12, INTERNAL_ERROR_MULTIPLE_EOFS, INTERNAL_ERROR_MULTIPLE_PREVIEWS, INVALID_BEGINNING_OF_SEGMENT, INVALID_COMPOSITE, INVALID_SEGMENT_TERMINATOR, INVALID_UNA, ISA_FIELD_WIDTH, ISA_SEGMENT_HAS_TOO_FEW_FIELDS, MALFORMED_EDI_SEGMENT, MANDATORY_ELEMENT_MISSING, MISMATCHED_PACKAGE_REF, MISMATCHED_UNP_LENGTH, MISSING_UNO_LENGTH, MISSING_UNP, NO_HL7_PARSER, NO_STANDARD_BEGINS_WITH, TOO_MANY_ISA_FIELDS, UNEXPECTED_EOF, UNEXPECTED_SEGMENT_IN_CONTEXT, X12_MISSING_ISA |
Constructor Summary | |
---|---|
EDIReader()
|
Method Summary | |
---|---|
XMLTags |
getXMLTags()
|
void |
parse(org.xml.sax.InputSource source)
Parse an EDI interchange from the input source. |
void |
preview()
Read enough of the EDI interchange to establish which characters are used for segment terminators, element delimiters, etc. |
static void |
setDebug(boolean d)
Sets debug on or off. |
void |
setXMLTags(XMLTags tags)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean debug
Constructor Detail |
---|
public EDIReader()
Method Detail |
---|
public void preview() throws EDISyntaxException, java.io.IOException
parse()
.
preview
in class EDIAbstractReader
EDISyntaxException
- if invalid EDI is detected
java.io.IOException
- for problem reading EDI datapublic void parse(org.xml.sax.InputSource source) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface org.xml.sax.XMLReader
org.xml.sax.SAXException
java.io.IOException
public void setXMLTags(XMLTags tags)
public XMLTags getXMLTags()
public static void setDebug(boolean d)
d
- true to turn debug on, false to turn it off
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |