|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EDIConverterListener
This is an extension of the ConverterListener
interface which can
handle events specific to EDI converters. Some of the added methods handle EDI specific errors,
while others are used to report status information such as the start of a message or a segment.
(It is modeled somewhat on the SAX ErrorHandler
interface.)
If an XML Converter application needs to implement customized error handling
then it may implement this interface and register it with the Converter
object. This may be done either by assigning an EDIConverterListener to the
ConverterFactory
in which case they all share the same instance, or afterwards to
an individual Converter
, ConvertToXML
or ConvertFromXML
object.
ConverterException
,
ConverterListener
,
EDIConverterException
Method Summary | |
---|---|
void |
endGroup(EDISegmentDetails details)
endGroup is called at the end of each message group or batch. |
void |
endInterchange(EDISegmentDetails details)
endInterchange is called at the end of each interchange marker segment. |
void |
endMessage(EDISegmentDetails details)
endMessage is called at the end of each message. |
int |
invalidCharacter(char chr,
String coding)
If a character does not match the specified encoding in the EDI stream, this is called to figure out how to handle the situation. |
void |
processSegment(EDISegmentDetails details)
Each segment processed, including those that trigger other events such as startMessage or endMessage, also triggers this event. |
void |
startGroup(EDISegmentDetails details)
startGroup is called at the beginning of each message group or batch. |
void |
startInterchange(EDISegmentDetails details)
startInterchange is called at the beginning of each interchange marker segment. |
void |
startMessage(EDISegmentDetails details)
startMessage is called at the beginning of each message. |
String |
unknownCodelistValue(String segment,
int pos,
int sub,
int tri,
int rep,
String element,
String item)
This entry point is called if normal code list validation fails for an item. |
Methods inherited from interface com.ddtek.xmlconverter.ConverterListener |
---|
error, fatalError, warning |
Method Detail |
---|
String unknownCodelistValue(String segment, int pos, int sub, int tri, int rep, String element, String item)
segment
- This is the name of the segment.pos
- This is the position within the segment.sub
- If the element is a component element, this is the position within the parent element otherwise 0.tri
- If the element is a component within a component element, this is the tertiary position otherwise 0.rep
- If the element is a repeating element within the segment, this is the position within the repeat group. It will always be at least 1.element
- This is the name of the element.item
- The code list value as included in the EDI or XML file. This will never be null.
int invalidCharacter(char chr, String coding)
chr
- is the character in the EDI stream that does not seem to make sensecoding
- is the name of the EDI-specific encoding, such as UNOB
or IATA
.
coding
.void startInterchange(EDISegmentDetails details) throws Exception
Exception
void endInterchange(EDISegmentDetails details) throws Exception
Exception
void startMessage(EDISegmentDetails details) throws Exception
Exception
void endMessage(EDISegmentDetails details) throws Exception
Exception
void startGroup(EDISegmentDetails details) throws Exception
Exception
void endGroup(EDISegmentDetails details) throws Exception
Exception
void processSegment(EDISegmentDetails details) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |