Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Class EDIDocumentParser

java.lang.Object
  |
  +--com.americancoders.edi.EDIDocumentParser
Direct Known Subclasses:
EDIFactDocumentParser, TradacomsDocumentParser, X12DocumentParser

public abstract class EDIDocumentParser
extends java.lang.Object

abstract class defining methods for parsing EDI Documents
Document handlers will register with this class to be notified when specific edi objects are created or finished
Unlike the old parser these parsers will not contain the objects, the process of adding objects to owning parents (such as adding functional groups to an envelope) is left up to the document handler.


Field Summary
protected  com.americancoders.edi.DocumentErrors dErr
           
 
Constructor Summary
EDIDocumentParser()
           
 
Method Summary
 void deregisterHandler(com.americancoders.edi.EDIDocumentHandler edh)
          method for handlers to deregister from the parser
 com.americancoders.edi.DocumentErrors getDocumentErrors()
          gets the DocumentErrors object
 void notifyEndEnvelope(com.americancoders.edi.Envelope inEnv)
          method to notifiy handlers when processing of an envelope is complete
 void notifyEndFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
          method to notifiy handlers when processing of a functional group is complete
 void notifyEndSegment(com.americancoders.edi.Segment inSeg)
          method to notifiy handlers when processing of an Segment is complete
 void notifyEndTransactionSet(com.americancoders.edi.TransactionSet inTS)
          method to notifiy handlers when processing of an TransactionSet is complete
 void notifyStartEnvelope(com.americancoders.edi.Envelope inEnv)
          method to notifiy handlers when an envelope was just created
 void notifyStartFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
          method to notifiy handlers when an FunctionalGroup was just created
 void notifyStartSegment(com.americancoders.edi.Segment inSeg)
          method to notifiy handlers when an Segment was just created
 void notifyStartTransactionSet(com.americancoders.edi.TransactionSet inTS)
          method to notifiy handlers when an TransactionSet was just created
abstract  void parseDocument(java.io.Reader r, boolean b)
          abstract method all document parsers must implement
abstract  void parseDocument(java.lang.String s)
          abstract method all document parsers must implement
 void registerHandler(com.americancoders.edi.EDIDocumentHandler edh)
          method for handlers to register with the parser
 void setErrorLevel(int i)
          method to reset the error level processing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dErr

protected com.americancoders.edi.DocumentErrors dErr
Constructor Detail

EDIDocumentParser

public EDIDocumentParser()
Method Detail

setErrorLevel

public void setErrorLevel(int i)
method to reset the error level processing

Parameters:
i - int

registerHandler

public void registerHandler(com.americancoders.edi.EDIDocumentHandler edh)
method for handlers to register with the parser

Parameters:
edh - EDIDocumentHandler

parseDocument

public abstract void parseDocument(java.lang.String s)
                            throws OBOEException
abstract method all document parsers must implement

Parameters:
s - String edi document
Throws:
OBOEException

parseDocument

public abstract void parseDocument(java.io.Reader r,
                                   boolean b)
                            throws OBOEException
abstract method all document parsers must implement

Parameters:
r - java.io.Reader object containing edi document
b - boolean if true run validation routine after parsing.
Throws:
OBOEException

notifyStartEnvelope

public void notifyStartEnvelope(com.americancoders.edi.Envelope inEnv)
method to notifiy handlers when an envelope was just created

Parameters:
inEnv - Envelope

notifyStartFunctionalGroup

public void notifyStartFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
method to notifiy handlers when an FunctionalGroup was just created

Parameters:
inFG - FunctionalGroup

notifyStartTransactionSet

public void notifyStartTransactionSet(com.americancoders.edi.TransactionSet inTS)
method to notifiy handlers when an TransactionSet was just created

Parameters:
inTS - TransactionSet

notifyStartSegment

public void notifyStartSegment(com.americancoders.edi.Segment inSeg)
method to notifiy handlers when an Segment was just created

Parameters:
inSeg - Segment

notifyEndEnvelope

public void notifyEndEnvelope(com.americancoders.edi.Envelope inEnv)
method to notifiy handlers when processing of an envelope is complete

Parameters:
inEnv - Envelope

notifyEndFunctionalGroup

public void notifyEndFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
method to notifiy handlers when processing of a functional group is complete

Parameters:
inFG - FunctionalGroup

notifyEndTransactionSet

public void notifyEndTransactionSet(com.americancoders.edi.TransactionSet inTS)
method to notifiy handlers when processing of an TransactionSet is complete

Parameters:
inTS - TransactionSet

notifyEndSegment

public void notifyEndSegment(com.americancoders.edi.Segment inSeg)
method to notifiy handlers when processing of an Segment is complete

Parameters:
inSeg - Segment

deregisterHandler

public void deregisterHandler(com.americancoders.edi.EDIDocumentHandler edh)
method for handlers to deregister from the parser

Parameters:
edh - EDIDocumentHandler

getDocumentErrors

public com.americancoders.edi.DocumentErrors getDocumentErrors()
gets the DocumentErrors object

Returns:
DocumentErrors object

Open Business Objects for EDI
v3.6.0


OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries.
Copyright 1999-2004 American Coders, Ltd.
POB 97462
Raleigh NC 27624 USA
All Rights Reserved.