|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.edisax.EDIParser
public class EDIParser
EDI Parser.
Generates a stream of SAX events from an EDI message stream based on the suppliedmapping model.
InputStream ediInputStream = ....
InputStream edi2SaxMappingConfig = ....
ContentHandler contentHandler = ....
EDIParser parser = new EDIParser();
parser.setContentHandler(contentHandler);
parser.setMappingModel(EDIParser.parseMappingModel(edi2SaxMappingConfig));
parser.parse(new InputSource(ediInputStream));
etc...
So the above illustration attempts to highlight the following:
| Constructor Summary | |
|---|---|
EDIParser()
|
|
| Method Summary | |
|---|---|
protected static void |
assertMappingConfigValid(Reader mappingConfigStream)
Assert that the supplied mapping configuration is valid. |
ContentHandler |
getContentHandler()
|
DTDHandler |
getDTDHandler()
|
EntityResolver |
getEntityResolver()
|
ErrorHandler |
getErrorHandler()
|
boolean |
getFeature(String name)
|
Object |
getProperty(String name)
|
void |
parse(InputSource ediInputSource)
Parse an EDI InputSource. |
void |
parse(String systemId)
The following methods are currently unimplemnted... |
static org.milyn.schema.ediMessageMapping10.EdimapDocument.Edimap |
parseMappingModel(InputStream mappingConfigStream)
Parse the supplied mapping model config stream and return the generated EdiMap. |
static org.milyn.schema.ediMessageMapping10.EdimapDocument.Edimap |
parseMappingModel(Reader mappingConfigStream)
Parse the supplied mapping model config stream and return the generated EdiMap. |
void |
setContentHandler(ContentHandler contentHandler)
|
void |
setDTDHandler(DTDHandler arg0)
|
void |
setEntityResolver(EntityResolver arg0)
|
void |
setErrorHandler(ErrorHandler arg0)
|
void |
setFeature(String name,
boolean value)
|
void |
setMappingModel(org.milyn.schema.ediMessageMapping10.EdimapDocument.Edimap mappingModel)
Set the EDI mapping model to be used in all subsequent parse operations. |
void |
setProperty(String name,
Object value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EDIParser()
| Method Detail |
|---|
public static org.milyn.schema.ediMessageMapping10.EdimapDocument.Edimap parseMappingModel(InputStream mappingConfigStream)
throws IOException,
SAXException
#setMappingModel(Edimap).
mappingConfigStream - Config stream. Must conform with the
edi-message-mapping-1.0.xsd
schema.
IOException - Error reading the model stream.
SAXException - Invalid model.
public static org.milyn.schema.ediMessageMapping10.EdimapDocument.Edimap parseMappingModel(Reader mappingConfigStream)
throws IOException,
SAXException
#setMappingModel(Edimap).
mappingConfigStream - Config stream. Must conform with the
edi-message-mapping-1.0.xsd
schema.
IOException - Error reading the model stream.
SAXException - Invalid model.
protected static void assertMappingConfigValid(Reader mappingConfigStream)
throws IOException,
SAXException
mappingConfigStream -
IOException - Failed to read the schema.
SAXException - Invalid configuration.public void setMappingModel(org.milyn.schema.ediMessageMapping10.EdimapDocument.Edimap mappingModel)
parseMappingModel(InputStream).
mappingModel - The mapping model.
public void parse(InputSource ediInputSource)
throws IOException,
SAXException
parse in interface XMLReaderIOException
SAXExceptionpublic void setContentHandler(ContentHandler contentHandler)
setContentHandler in interface XMLReaderpublic ContentHandler getContentHandler()
getContentHandler in interface XMLReader
public void parse(String systemId)
throws IOException,
SAXException
parse in interface XMLReaderIOException
SAXException
public boolean getFeature(String name)
throws SAXNotRecognizedException,
SAXNotSupportedException
getFeature in interface XMLReaderSAXNotRecognizedException
SAXNotSupportedException
public void setFeature(String name,
boolean value)
throws SAXNotRecognizedException,
SAXNotSupportedException
setFeature in interface XMLReaderSAXNotRecognizedException
SAXNotSupportedExceptionpublic DTDHandler getDTDHandler()
getDTDHandler in interface XMLReaderpublic void setDTDHandler(DTDHandler arg0)
setDTDHandler in interface XMLReaderpublic EntityResolver getEntityResolver()
getEntityResolver in interface XMLReaderpublic void setEntityResolver(EntityResolver arg0)
setEntityResolver in interface XMLReaderpublic ErrorHandler getErrorHandler()
getErrorHandler in interface XMLReaderpublic void setErrorHandler(ErrorHandler arg0)
setErrorHandler in interface XMLReader
public Object getProperty(String name)
throws SAXNotRecognizedException,
SAXNotSupportedException
getProperty in interface XMLReaderSAXNotRecognizedException
SAXNotSupportedException
public void setProperty(String name,
Object value)
throws SAXNotRecognizedException,
SAXNotSupportedException
setProperty in interface XMLReaderSAXNotRecognizedException
SAXNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||