Open Business Objects for EDI
v3.6.0

com.americancoders.edi.TRADACOMS
Class TradacomsDocumentHandler

java.lang.Object
  |
  +--com.americancoders.edi.TRADACOMS.TradacomsDocumentHandler
All Implemented Interfaces:
EDIDocumentHandler

public class TradacomsDocumentHandler
extends java.lang.Object
implements EDIDocumentHandler

class to parse input string for all defined OBOE Transaction Sets
Tradacoms dependent


Constructor Summary
TradacomsDocumentHandler()
          create a parser for transaction set and parser what is coming from Reader object
TradacomsDocumentHandler(java.io.Reader inReader)
          create a parser for transaction set and parser what is coming from Reader object
if you use this constructor and there are document errors the method will not make the envelope object available
 
Method Summary
 void endEnvelope(com.americancoders.edi.Envelope inEnv)
          called when an Evelope is finished
 void endFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
          called when an FunctionalGroup object is finished
 void endSegment(com.americancoders.edi.Segment inSeg)
          called when an Segment object is finished
only called for segments at the Envelope and functionalGroup level does not get called for segments within TransactionSet
 void endTransactionSet(com.americancoders.edi.TransactionSet inTS)
          called when an TransactionSet object is finished
 com.americancoders.edi.DocumentErrors getDocumentErrors()
           
 com.americancoders.edi.Envelope getEnvelope()
          returns the envelope that was parsed
static void main(java.lang.String[] args)
          main method used for testing purposes
format: java filetoparse
writes valid xml format of file to System.out
 void startEnvelope(com.americancoders.edi.Envelope inEnv)
          called when an Envelope object is created
 void startFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
          called when an FunctionalGroup object is created
 void startParsing(java.io.Reader inReader)
          starts the parser with the passed Reader object
 void startSegment(com.americancoders.edi.Segment inSeg)
          called when an Segment object is created
only called for segments at the Envelope and functionalGroup level does not get called for segments within TransactionSet
 void startTransactionSet(com.americancoders.edi.TransactionSet inTS)
          called when an TransactionSet object is created
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TradacomsDocumentHandler

public TradacomsDocumentHandler()
create a parser for transaction set and parser what is coming from Reader object


TradacomsDocumentHandler

public TradacomsDocumentHandler(java.io.Reader inReader)
                         throws OBOEException
create a parser for transaction set and parser what is coming from Reader object
if you use this constructor and there are document errors the method will not make the envelope object available

Parameters:
inReader - the edi document in a java io reader object
Throws:
OBOEException - - unknown transaction set, this transaction set is undefined to OBOE - parsing errors
Method Detail

startParsing

public void startParsing(java.io.Reader inReader)
                  throws OBOEException
starts the parser with the passed Reader object

Specified by:
startParsing in interface EDIDocumentHandler
Parameters:
inReader - the edi document in a java io reader object
Throws:
OBOEException - - unknown transaction set, this transaction set is undefined to OBOE - parsing erros

startEnvelope

public void startEnvelope(com.americancoders.edi.Envelope inEnv)
called when an Envelope object is created

Specified by:
startEnvelope in interface EDIDocumentHandler
Parameters:
inEnv - Envelope found

startFunctionalGroup

public void startFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
called when an FunctionalGroup object is created

Specified by:
startFunctionalGroup in interface EDIDocumentHandler
Parameters:
inFG - FunctionalGroup found

startTransactionSet

public void startTransactionSet(com.americancoders.edi.TransactionSet inTS)
called when an TransactionSet object is created

Specified by:
startTransactionSet in interface EDIDocumentHandler
Parameters:
inTS - TransactionSet found

startSegment

public void startSegment(com.americancoders.edi.Segment inSeg)
called when an Segment object is created
only called for segments at the Envelope and functionalGroup level does not get called for segments within TransactionSet

Specified by:
startSegment in interface EDIDocumentHandler
Parameters:
inSeg - Segment found

endEnvelope

public void endEnvelope(com.americancoders.edi.Envelope inEnv)
called when an Evelope is finished

Specified by:
endEnvelope in interface EDIDocumentHandler
Parameters:
inEnv - envelope found

endFunctionalGroup

public void endFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
called when an FunctionalGroup object is finished

Specified by:
endFunctionalGroup in interface EDIDocumentHandler
Parameters:
inFG - FunctionalGroup found

endTransactionSet

public void endTransactionSet(com.americancoders.edi.TransactionSet inTS)
called when an TransactionSet object is finished

Specified by:
endTransactionSet in interface EDIDocumentHandler
Parameters:
inTS - TransactionSet found

endSegment

public void endSegment(com.americancoders.edi.Segment inSeg)
called when an Segment object is finished
only called for segments at the Envelope and functionalGroup level does not get called for segments within TransactionSet

Specified by:
endSegment in interface EDIDocumentHandler
Parameters:
inSeg - Segment found

getEnvelope

public com.americancoders.edi.Envelope getEnvelope()
returns the envelope that was parsed

Returns:
Envelope - the envelope when object was built.

main

public static void main(java.lang.String[] args)
main method used for testing purposes
format: java filetoparse
writes valid xml format of file to System.out

Parameters:
args - String array - only one arg accepted - file to parse

getDocumentErrors

public com.americancoders.edi.DocumentErrors getDocumentErrors()
Specified by:
getDocumentErrors in interface EDIDocumentHandler

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.