Open Business Objects for EDI
v3.6.0

com.americancoders.samples
Class SampleEDIFactDocumentHandler

java.lang.Object
  |
  +--com.americancoders.samples.SampleEDIFactDocumentHandler
All Implemented Interfaces:
EDIDocumentHandler

public class SampleEDIFactDocumentHandler
extends java.lang.Object
implements EDIDocumentHandler

class to parse input string for all defined OBOE Transaction Sets
program will create Valid XML formatted data for each transaction set
output sent to System.out (console)
EDIFact dependent


Constructor Summary
SampleEDIFactDocumentHandler()
          do nothing constructor
 
Method Summary
 void endEnvelope(com.americancoders.edi.Envelope inEnv)
          do nothing when an envelope is ended
 void endFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
          do nothing when an fg is ended
 void endSegment(com.americancoders.edi.Segment inSeg)
          do nothing when an seg is ended
Note that these segments are only envelope and fg segments NOT SEGMENTS inside of Transaction Sets
 void endTransactionSet(com.americancoders.edi.TransactionSet inTS)
          create a Valid XML document for each ts found
 com.americancoders.edi.DocumentErrors getDocumentErrors()
           
static void main(java.lang.String[] args)
          from command line
java com.americancoders.samples.SampleEDIFactDocumentHandler xxxx, where xxxx is a EDIFact document filename output sent to System.out error message also sent to System.out
 void parse(java.lang.String file)
           
 void startEnvelope(com.americancoders.edi.Envelope inEnv)
          do nothing when an envelope is started
 void startFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
          called when an FunctionalGroup object is created
 void startParsing(java.io.Reader inRDR)
          start parsing not used here
 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

SampleEDIFactDocumentHandler

public SampleEDIFactDocumentHandler()
do nothing constructor

Method Detail

startParsing

public void startParsing(java.io.Reader inRDR)
start parsing not used here

Specified by:
startParsing in interface EDIDocumentHandler
Parameters:
inRDR - the edi document in a java io Reader object

startEnvelope

public void startEnvelope(com.americancoders.edi.Envelope inEnv)
do nothing when an envelope is started

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)
do nothing when an envelope is ended

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

endFunctionalGroup

public void endFunctionalGroup(com.americancoders.edi.FunctionalGroup inFG)
do nothing when an fg is ended

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

endTransactionSet

public void endTransactionSet(com.americancoders.edi.TransactionSet inTS)
create a Valid XML document for each ts found

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

endSegment

public void endSegment(com.americancoders.edi.Segment inSeg)
do nothing when an seg is ended
Note that these segments are only envelope and fg segments NOT SEGMENTS inside of Transaction Sets

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

parse

public void parse(java.lang.String file)

getDocumentErrors

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

main

public static void main(java.lang.String[] args)
from command line
java com.americancoders.samples.SampleEDIFactDocumentHandler xxxx, where xxxx is a EDIFact document filename output sent to System.out error message also sent to System.out


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.