Open Business Objects for EDI
v3.6.0

com.americancoders.edi.ach
Class ACHEnvelope

java.lang.Object
  |
  +--com.americancoders.edi.SegmentContainer
        |
        +--com.americancoders.edi.Envelope
              |
              +--com.americancoders.edi.ach.ACHEnvelope
All Implemented Interfaces:
IContainedObject, IIdentifier, ISegmentContainer

public class ACHEnvelope
extends Envelope

Author:
Joe McVerry - American Coders, Ltd. mcverry - american coders, ltd. class for wrapping a ACH messages within an EDI Envelope

Nested Class Summary
 
Nested classes inherited from class com.americancoders.edi.Envelope
Envelope.PreDelimiter
 
Field Summary
static java.lang.String idHeader
           
static java.lang.String idTrailer
           
 
Fields inherited from class com.americancoders.edi.Envelope
ACH_FORMAT, ACH_FORMAT_FOR_CBR_PBR, CSV_FORMAT, EDIFact_ESCAPE_CHARACTER, EDIFact_FIELD_DELIMITER, EDIFACT_FORMAT, EDIFact_GROUP_DELIMITER, EDIFact_REPEAT_DELIMITER, EDIFact_SEGMENT_DELIMITER, escapeCharacter, fieldDelimiter, FIXED_LENGTH_FORMAT, format, functionalGroups, groupDelimiter, myTemplate, PIXES_FORMAT, PREBUILD_ESCAPE_DELIMITER, PREBUILD_FIELD_DELIMITER, PREBUILD_FORMAT, PREBUILD_GROUP_DELIMITER, PREBUILD_REPEAT_DELIMITER, PREBUILD_SEGID_DELIMITER, PREBUILD_SEGMENT_DELIMITER, repeatDelimiter, response, revision, segmentDelimiter, TRADACOMS_ESCAPE_CHARACTER, TRADACOMS_FIELD_DELIMITER, TRADACOMS_FORMAT, TRADACOMS_GROUP_DELIMITER, TRADACOMS_REPEAT_DELIMITER, TRADACOMS_SEGID_DELIMITER, TRADACOMS_SEGMENT_DELIMITER, VALID_XML_FORMAT, VALID_XML_FORMAT_WITH_POSITION, X12_ESCAPE_CHARACTER, X12_FIELD_DELIMITER, X12_FORMAT, X12_GROUP_DELIMITER, X12_REPEAT_DELIMITER, X12_SEGMENT_DELIMITER, XML_FORMAT
 
Fields inherited from class com.americancoders.edi.SegmentContainer
container, dupSegment, myTemplateContainer
 
Constructor Summary
ACHEnvelope()
          simple constructor
ACHEnvelope(com.americancoders.edi.TemplateEnvelope inTempEnv)
          instantiates the class from a TemplateEnvelope,
 
Method Summary
 com.americancoders.edi.FunctionalGroup createFunctionalGroup()
          creates a basic functionalgroup object
 java.lang.String getFormattedText(int inFormat)
           
 com.americancoders.edi.FunctionalGroup getFunctionalGroup(int pos)
          gets a Functional Group object from the vector (container);
check for runtime array out of bounds exception
 int getFunctionalGroupCount()
          gets the count of Functional Group object in the vector (container);
 java.util.Vector getFunctionalGroups()
          gets the Vector of Functional Group objects
 com.americancoders.edi.Segment getInterchange_Header()
          gets the Interchange Header
 com.americancoders.edi.Segment getInterchange_Trailer()
          gets the Interchange Trailer
 void parse(org.w3c.dom.Node node)
          parses an xml formated file
 boolean parse(java.io.PushbackInputStream inpis)
          method for parsing fixed format edi files
 void rebuildBatchHeader()
           
 void resetBatchHeader()
           
 void setDelimitersInHeader()
          sets the Delimter fields in the header
 void setFGCountInTrailer()
          sets the functional group count in the trailer
 void validate()
          validate contents of envelope
 void validate(com.americancoders.edi.DocumentErrors inDErr)
          validate contents of envelope
doesn't throw exceptions but places errors in DocumentErrors object
 void writeFormattedText(java.io.Writer inWriter, int inFormat)
          like getFormattedText; writes to a Writer object instead of building a string.
 
Methods inherited from class com.americancoders.edi.Envelope
addFunctionalGroup, getFormat, getFormat, getID, getParent, getResponse, getRevision, getTemplateSegment, getTemplateSegmentContainer, getXMLTag, processEDIEnvelope, setDelimiters, setDelimitersFromProperties, setFormat, setParent, setResponse, setRevision, toString, trim
 
Methods inherited from class com.americancoders.edi.SegmentContainer
addSegment, addSegment, addSegment, addSegmentToVector, createSegment, createSegment, createSegmentByIDAndName, defineContainer, equivalentSegments, getContainerSize, getSegment, getSegment, getSegment, getSegment, getSegment, getSegment, getSegmentByDataElementValue, getSegmentCount, getSegmentCount, isNull, isSegment, isSegment, isVector, parse, removeSegment, removeSegment, removeSegment, removeSegment, resetToFirstEquivalentSegment, setSegmentAt, setSegmentAt, whyNotUsed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.americancoders.edi.ISegmentContainer
addSegment, createSegment, getSegment, getSegment, getSegmentCount, removeSegment
 

Field Detail

idHeader

public static final java.lang.String idHeader
See Also:
Constant Field Values

idTrailer

public static final java.lang.String idTrailer
See Also:
Constant Field Values
Constructor Detail

ACHEnvelope

public ACHEnvelope()
simple constructor


ACHEnvelope

public ACHEnvelope(com.americancoders.edi.TemplateEnvelope inTempEnv)
            throws OBOEException
instantiates the class from a TemplateEnvelope,

Parameters:
inTempEnv - TemplateEnvelope to build this class with
Throws:
OBOEException - missing segment definition in envelope xml.
Method Detail

parse

public void parse(org.w3c.dom.Node node)
           throws OBOEException,
                  java.io.FileNotFoundException,
                  java.io.IOException
parses an xml formated file

Specified by:
parse in class Envelope
OBOEException
java.io.FileNotFoundException
java.io.IOException
See Also:
Envelope.parse(org.w3c.dom.Node)

parse

public boolean parse(java.io.PushbackInputStream inpis)
              throws OBOEException,
                     java.io.FileNotFoundException,
                     java.io.IOException
method for parsing fixed format edi files

Specified by:
parse in class Envelope
Parameters:
inpis - PushbackInputStream
Returns:
boolean success
Throws:
OBOException...
FileNotFoundException...
IOException...
OBOEException
java.io.FileNotFoundException
java.io.IOException

resetBatchHeader

public void resetBatchHeader()

rebuildBatchHeader

public void rebuildBatchHeader()

getFormattedText

public java.lang.String getFormattedText(int inFormat)
                                  throws OBOEException
Specified by:
getFormattedText in class Envelope
Parameters:
inFormat - int - format type see TransactionSet
Returns:
a formatted document in a String
Throws:
OBOEException
See Also:
Envelope.getFormattedText(int)

writeFormattedText

public void writeFormattedText(java.io.Writer inWriter,
                               int inFormat)
                        throws OBOEException,
                               java.io.IOException
Description copied from class: Envelope
like getFormattedText; writes to a Writer object instead of building a string.

Specified by:
writeFormattedText in class Envelope
Parameters:
inWriter - writer - object written to
inFormat - int - format type see TransactionSet
Throws:
OBOEException
java.io.IOException
See Also:
Envelope.writeFormattedText(Writer, int)

validate

public void validate()
              throws OBOEException
Description copied from class: Envelope
validate contents of envelope

Specified by:
validate in class Envelope
Throws:
OBOEException
See Also:
Envelope.validate()

validate

public void validate(com.americancoders.edi.DocumentErrors inDErr)
Description copied from class: Envelope
validate contents of envelope
doesn't throw exceptions but places errors in DocumentErrors object

Specified by:
validate in class Envelope
See Also:
Envelope.validate(com.americancoders.edi.DocumentErrors)

createFunctionalGroup

public com.americancoders.edi.FunctionalGroup createFunctionalGroup()
Description copied from class: Envelope
creates a basic functionalgroup object

Specified by:
createFunctionalGroup in class Envelope
Returns:
FunctionalGroup
See Also:
Envelope.createFunctionalGroup()

getFunctionalGroupCount

public int getFunctionalGroupCount()
Description copied from class: Envelope
gets the count of Functional Group object in the vector (container);

Specified by:
getFunctionalGroupCount in class Envelope
Returns:
int count
See Also:
Envelope.getFunctionalGroupCount()

getFunctionalGroup

public com.americancoders.edi.FunctionalGroup getFunctionalGroup(int pos)
Description copied from class: Envelope
gets a Functional Group object from the vector (container);
check for runtime array out of bounds exception

Specified by:
getFunctionalGroup in class Envelope
Parameters:
pos - int position within container.
Returns:
a FunctionalGroup object
See Also:
Envelope.getFunctionalGroup(int)

getFunctionalGroups

public java.util.Vector getFunctionalGroups()
Description copied from class: Envelope
gets the Vector of Functional Group objects

Specified by:
getFunctionalGroups in class Envelope
Returns:
a Vector of FunctionalGroup objects
See Also:
Envelope.getFunctionalGroups()

setDelimitersInHeader

public void setDelimitersInHeader()
                           throws OBOEException
Description copied from class: Envelope
sets the Delimter fields in the header

Specified by:
setDelimitersInHeader in class Envelope
OBOEException
See Also:
Envelope.setDelimitersInHeader()

setFGCountInTrailer

public void setFGCountInTrailer()
                         throws OBOEException
Description copied from class: Envelope
sets the functional group count in the trailer

Specified by:
setFGCountInTrailer in class Envelope
OBOEException
See Also:
Envelope.setFGCountInTrailer()

getInterchange_Header

public com.americancoders.edi.Segment getInterchange_Header()
Description copied from class: Envelope
gets the Interchange Header

Specified by:
getInterchange_Header in class Envelope
Returns:
Segment

getInterchange_Trailer

public com.americancoders.edi.Segment getInterchange_Trailer()
Description copied from class: Envelope
gets the Interchange Trailer

Specified by:
getInterchange_Trailer in class Envelope
Returns:
Segment

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.