Open Business Objects for EDI
v3.6.0

com.americancoders.edi.TRADACOMS
Class TradacomsEnvelope

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

public class TradacomsEnvelope
extends Envelope

class for wrapping a EDI transaction set within an EDI Envelope


Nested Class Summary
 
Nested classes inherited from class com.americancoders.edi.Envelope
Envelope.PreDelimiter
 
Field Summary
static java.lang.String idInterchangeHeader
          segment constants
static java.lang.String idInterchangeTrailer
           
 
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
TradacomsEnvelope()
          instantiates the class from all related OBOE classes
TradacomsEnvelope(com.americancoders.edi.TemplateEnvelope inTempEnv)
          instantiates the class from a TemplateEnvelope, creates mandatory segments STX and END and creates one emtpy functional group
 
Method Summary
 com.americancoders.edi.FunctionalGroup createFunctionalGroup()
          creates a basic functionalgroup object
 com.americancoders.edi.Segment createInterchange_Header()
          creates, sets and returns the Interchange Control Header built for the envelope
 com.americancoders.edi.Segment createInterchange_Trailer()
          creates, sets and returns the Interchange Control Trailer built for the envelope
 java.lang.String getFormattedText(int format)
          returns the EDI (Tradacoms) formatted document in a String
 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()
          returns the Interchange Control Trailer built for the envelope
 void parse(org.w3c.dom.Node node)
           
 boolean parse(java.io.PushbackInputStream pis)
           
 void setDelimitersInHeader()
          sets the Delimter fields in the header
 void setFGCountInTrailer()
          sets the functional group count in the trailer
 void validate()
          validates
 void validate(com.americancoders.edi.DocumentErrors inDErr)
          validates and places errors in DocumentErrors object
 void writeFormattedText(java.io.Writer inWriter, int format)
          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

idInterchangeHeader

public static final java.lang.String idInterchangeHeader
segment constants

See Also:
Constant Field Values

idInterchangeTrailer

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

TradacomsEnvelope

public TradacomsEnvelope()
instantiates the class from all related OBOE classes


TradacomsEnvelope

public TradacomsEnvelope(com.americancoders.edi.TemplateEnvelope inTempEnv)
                  throws OBOEException
instantiates the class from a TemplateEnvelope, creates mandatory segments STX and END and creates one emtpy functional group

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
Specified by:
parse in class Envelope
OBOEException
java.io.FileNotFoundException
java.io.IOException

parse

public boolean parse(java.io.PushbackInputStream pis)
              throws OBOEException,
                     java.io.FileNotFoundException,
                     java.io.IOException
Specified by:
parse in class Envelope
OBOEException
java.io.FileNotFoundException
java.io.IOException

createFunctionalGroup

public com.americancoders.edi.FunctionalGroup createFunctionalGroup()
creates a basic functionalgroup object

Specified by:
createFunctionalGroup in class Envelope
Returns:
TradacomsFunctionalGroup

getInterchange_Header

public com.americancoders.edi.Segment getInterchange_Header()
gets the Interchange_Header

Specified by:
getInterchange_Header in class Envelope
Returns:
Interchange_Header segment

getFunctionalGroupCount

public int getFunctionalGroupCount()
gets the count of Functional Group object in the vector (container);

Specified by:
getFunctionalGroupCount in class Envelope
Returns:
int count

getFunctionalGroup

public com.americancoders.edi.FunctionalGroup getFunctionalGroup(int pos)
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

getFunctionalGroups

public java.util.Vector getFunctionalGroups()
gets the Vector of Functional Group objects

Specified by:
getFunctionalGroups in class Envelope
Returns:
a Vector of FunctionalGroup objects

getInterchange_Trailer

public com.americancoders.edi.Segment getInterchange_Trailer()
returns the Interchange Control Trailer built for the envelope

Specified by:
getInterchange_Trailer in class Envelope
Returns:
Segment

setDelimitersInHeader

public void setDelimitersInHeader()
                           throws OBOEException
sets the Delimter fields in the header

Specified by:
setDelimitersInHeader in class Envelope
OBOEException

setFGCountInTrailer

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

Specified by:
setFGCountInTrailer in class Envelope

getFormattedText

public java.lang.String getFormattedText(int format)
returns the EDI (Tradacoms) formatted document in a String

Specified by:
getFormattedText in class Envelope
Parameters:
format - int - format type see TransactionSet
Returns:
String the formatted document

writeFormattedText

public void writeFormattedText(java.io.Writer inWriter,
                               int format)
                        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
format - int - format type see TransactionSet
Throws:
OBOEException
java.io.IOException
See Also:
Envelope.writeFormattedText(Writer, int)

validate

public void validate()
              throws OBOEException
validates

Specified by:
validate in class Envelope
Throws:
OBOEException - indicates why envelope is invalid

validate

public void validate(com.americancoders.edi.DocumentErrors inDErr)
              throws OBOEException
validates and places errors in DocumentErrors object

Specified by:
validate in class Envelope
Parameters:
inDErr - DocumentErrors
OBOEException

createInterchange_Header

public com.americancoders.edi.Segment createInterchange_Header()
creates, sets and returns the Interchange Control Header built for the envelope

Returns:
Segment - can return null if templateenvelope is null or segment not defined in envelope xml rules file

createInterchange_Trailer

public com.americancoders.edi.Segment createInterchange_Trailer()
creates, sets and returns the Interchange Control Trailer built for the envelope

Returns:
Segment - can return null if templateenvelope is null or segment not defined in envelope xml rules file

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.