|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.berryworks.edireader.ParserRegistry
public class ParserRegistry
Data structure that associates leading character sequences with specific parser implementations. When an EDI or EDI-like stream of data is to be parsed without pre-knowledge of which particular EDI standard is to be used, this parser registry is used to select a parser based on the initial characters of data.
The parsers for ANSI X.12 and UN/EDIFACT are included in the registry be default. The classes that implement these parsers are provided by the core EDIReader framework. Parsers for other formats, including HL7, ACH, and NSF, are also listed in the registry. The classes that implement these formats are optional modules not included in the core EDIReader framework. If an optional parser module is present in the classpath, the registry is therefore able to select and load the appropriate parser in response to the leading character sequences in the data. It is also possible for a developer to implement a parser for an EDI-like data format and register that parser along with the leading data characters which signal the instance of an interchange of that format. In this way, the EDIReader framework can be extended to parse previously unsupported data formats in the same way that it supports X12 and EDIFACT.
Method Summary | |
---|---|
static EDIReader |
get(java.lang.String firstChars)
Returns an instance of some EDIReader subclass based on the first several chars of data to be parsed. |
static void |
register(java.lang.String firstChars,
java.lang.String className)
Registers a parser and associates it with the leading data characters that signal an instance of an interchange supported by the parser. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EDIReader get(java.lang.String firstChars)
firstChars
- of data to be parsed
public static void register(java.lang.String firstChars, java.lang.String className)
firstChars
- of data to be parsedclassName
- fully qualified classname of an EDIReader subclass
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |