org.milyn.smooks.edi
Class EDIReader

java.lang.Object
  extended by org.milyn.edisax.EDIParser
      extended by org.milyn.smooks.edi.EDIReader
All Implemented Interfaces:
org.milyn.delivery.ContentHandler, org.milyn.xml.SmooksXMLReader, XMLReader

public class EDIReader
extends org.milyn.edisax.EDIParser
implements org.milyn.xml.SmooksXMLReader

Smooks EDI Reader.

Hooks the Milyn EDIParser into the Smooks framework. This adds EDI processing support to Smooks.

Configuration

 <edi:reader mappingModel="edi-to-xml-order-mapping.xml" validate="false"/>
 

Author:
tfennelly

Field Summary
static String MODEL_CONFIG_KEY
          Model resource configuration key.
 
Fields inherited from class org.milyn.edisax.EDIParser
FEATURE_IGNORE_EMPTY_NODES, FEATURE_IGNORE_NEWLINES, FEATURE_VALIDATE
 
Constructor Summary
EDIReader()
           
 
Method Summary
protected static Hashtable getMappingTable(org.milyn.container.ApplicationContext context)
          Get the mapping model table from the context.
 void parse(InputSource ediSource)
          Parse the EDI message.
 void setExecutionContext(org.milyn.container.ExecutionContext executionContext)
           
 
Methods inherited from class org.milyn.edisax.EDIParser
endElement, endElement, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getFeatures, getIndentDepth, getProperty, mapFields, parse, parse, parseMappingModel, parseMappingModel, parseMappingModel, parseMappingModel, parseMappingModel, setBufferedSegmentReader, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setIndentDepth, setMappingModel, setNamespaceDeclarationStack, setProperty, startElement, startElement, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty
 

Field Detail

MODEL_CONFIG_KEY

public static final String MODEL_CONFIG_KEY
Model resource configuration key.

See Also:
Constant Field Values
Constructor Detail

EDIReader

public EDIReader()
Method Detail

setExecutionContext

public void setExecutionContext(org.milyn.container.ExecutionContext executionContext)
Specified by:
setExecutionContext in interface org.milyn.xml.SmooksXMLReader

parse

public void parse(InputSource ediSource)
           throws IOException,
                  SAXException
Parse the EDI message.

Overridden so as to set the EDI to XML mapping model on the parser.

Specified by:
parse in interface XMLReader
Overrides:
parse in class org.milyn.edisax.EDIParser
Throws:
IOException
SAXException

getMappingTable

protected static Hashtable getMappingTable(org.milyn.container.ApplicationContext context)
Get the mapping model table from the context.

Parameters:
context - The context from which to extract the mapping table.
Returns:
The mapping model talbe.


Copyright © 2018. All rights reserved.