org.milyn.edisax.interchange
Class InterchangeContext

java.lang.Object
  extended by org.milyn.edisax.interchange.InterchangeContext

public class InterchangeContext
extends Object

EDI message interchange context object.

Author:
tom.fennelly@gmail.com

Field Summary
 MutableInt indentDepth
           
static String INTERCHANGE_MESSAGE_BLOCK_ELEMENT_NAME
           
 
Constructor Summary
InterchangeContext(BufferedSegmentReader segmentReader, MappingsRegistry registry, ContentHandler contentHandler, Map<String,Boolean> parserFeatures, ControlBlockHandlerFactory controlBlockHandlerFactory, NamespaceDeclarationStack namespaceDeclarationStack, boolean validate)
          Public constructor.
 
Method Summary
 ContentHandler getContentHandler()
           
 ControlBlockHandler getControlBlockHandler(String segCode)
           
 EDIParser getControlSegmentParser()
           
 String getNamespace()
           
 NamespaceDeclarationStack getNamespaceDeclarationStack()
           
 MappingsRegistry getRegistry()
          Returns an instance of MappingsRegistry
 BufferedSegmentReader getSegmentReader()
           
 boolean isContainerManagedNamespaceStack()
           
 boolean isValidate()
           
 void mapControlSegment(Segment controlSegment, boolean clearSegmentBuffer)
           
 EDIParser newParser(EdifactModel mappingModel)
           
 void popDelimiters()
           
 void pushDelimiters(Delimiters delimiters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERCHANGE_MESSAGE_BLOCK_ELEMENT_NAME

public static final String INTERCHANGE_MESSAGE_BLOCK_ELEMENT_NAME
See Also:
Constant Field Values

indentDepth

public MutableInt indentDepth
Constructor Detail

InterchangeContext

public InterchangeContext(BufferedSegmentReader segmentReader,
                          MappingsRegistry registry,
                          ContentHandler contentHandler,
                          Map<String,Boolean> parserFeatures,
                          ControlBlockHandlerFactory controlBlockHandlerFactory,
                          NamespaceDeclarationStack namespaceDeclarationStack,
                          boolean validate)
Public constructor.

Parameters:
segmentReader - The interchange BufferedSegmentReader instance.
registry - The Mapping Models registry.
contentHandler - The content handler instance to receive the interchange events.
parserFeatures - Parser features.
controlBlockHandlerFactory - Control Block Handler Factory.
validate - Validate the data types of the EDI message data as defined in the mapping model.
Method Detail

getControlBlockHandler

public ControlBlockHandler getControlBlockHandler(String segCode)
                                           throws SAXException
Throws:
SAXException

getSegmentReader

public BufferedSegmentReader getSegmentReader()

getContentHandler

public ContentHandler getContentHandler()

isValidate

public boolean isValidate()

getNamespace

public String getNamespace()

getNamespaceDeclarationStack

public NamespaceDeclarationStack getNamespaceDeclarationStack()

newParser

public EDIParser newParser(EdifactModel mappingModel)

getControlSegmentParser

public EDIParser getControlSegmentParser()

mapControlSegment

public void mapControlSegment(Segment controlSegment,
                              boolean clearSegmentBuffer)
                       throws SAXException
Throws:
SAXException

pushDelimiters

public void pushDelimiters(Delimiters delimiters)

popDelimiters

public void popDelimiters()

getRegistry

public MappingsRegistry getRegistry()
Returns an instance of MappingsRegistry

Returns:

isContainerManagedNamespaceStack

public boolean isContainerManagedNamespaceStack()


Copyright © 2011. All Rights Reserved.