|
Open Business Objects for EDI v3.5.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.americancoders.edi.SegmentContainer
com.americancoders.edi.Envelope
class for wrapping an EDI transaction set within an EDI Envelope
| Field Summary | |
static int |
ACH_FORMAT
indicates file format |
static int |
ACH_FORMAT_FOR_CBR_PBR
indicates file format |
static int |
CSV_FORMAT
indicates file format |
static java.lang.String |
EDIFact_ESCAPE_CHARACTER
|
static java.lang.String |
EDIFact_FIELD_DELIMITER
|
static int |
EDIFACT_FORMAT
indicates file format |
static java.lang.String |
EDIFact_GROUP_DELIMITER
|
static java.lang.String |
EDIFact_REPEAT_DELIMITER
|
static java.lang.String |
EDIFact_SEGMENT_DELIMITER
|
java.lang.String |
escapeCharacter
|
java.lang.String |
fieldDelimiter
|
static int |
FIXED_LENGTH_FORMAT
indicates file format |
protected int |
format
Envelope |
protected java.util.Vector |
functionalGroups
store functional groups in an vector |
java.lang.String |
groupDelimiter
|
protected TemplateEnvelope |
myTemplate
store template object |
static int |
PIXES_FORMAT
indicates file format |
java.lang.String |
repeatDelimiter
|
protected Envelope |
response
response envelope if this is outgoing then it's the receiver response if it's not outgoing then it is response to this incoming envelope |
protected java.lang.String |
revision
revision (3040, D99A... |
java.lang.String |
segmentDelimiter
|
static java.lang.String |
TRADACOMS_ESCAPE_CHARACTER
|
static java.lang.String |
TRADACOMS_FIELD_DELIMITER
|
static int |
TRADACOMS_FORMAT
indicates file format |
static java.lang.String |
TRADACOMS_GROUP_DELIMITER
|
static java.lang.String |
TRADACOMS_REPEAT_DELIMITER
|
static java.lang.String |
TRADACOMS_SEGID_DELIMITER
TRADACOMS has one more |
static java.lang.String |
TRADACOMS_SEGMENT_DELIMITER
|
static int |
VALID_XML_FORMAT
indicates file format |
static int |
VALID_XML_FORMAT_WITH_POSITION
indicates file format |
static java.lang.String |
X12_ESCAPE_CHARACTER
constant for element escape character |
static java.lang.String |
X12_FIELD_DELIMITER
constant for field delimiter |
static int |
X12_FORMAT
indicates file format |
static java.lang.String |
X12_GROUP_DELIMITER
constant for group delimiter |
static java.lang.String |
X12_REPEAT_DELIMITER
constant for element repeat character |
static java.lang.String |
X12_SEGMENT_DELIMITER
constant for segment delimiter |
static int |
XML_FORMAT
indicates file format, use this for getFormattedText calls and other methods that need to know or use the transaction set type |
| Fields inherited from class com.americancoders.edi.SegmentContainer |
container, dupSegment, myTemplateContainer |
| Constructor Summary | |
Envelope()
instantiates the class from all related OBOE classes |
|
| Method Summary | |
void |
addFunctionalGroup(FunctionalGroup inFunctionalGroup)
adds a Functional Group object to the vector (container); |
abstract FunctionalGroup |
createFunctionalGroup()
creates a basic functionalgroup object |
int |
getFormat()
gets the format attribute |
static int |
getFormat(org.w3c.dom.Node node)
gets the format of an well formed xml envelope by peeking into the envelope |
abstract java.lang.String |
getFormattedText(int format)
|
abstract FunctionalGroup |
getFunctionalGroup(int pos)
gets a Functional Group object from the vector (container); check for runtime array out of bounds exception |
abstract int |
getFunctionalGroupCount()
gets the count of Functional Group object in the vector (container); |
abstract java.util.Vector |
getFunctionalGroups()
gets the Vector of Functional Group objects |
java.lang.String |
getID()
returns the ID which is "envelope". |
abstract Segment |
getInterchange_Header()
gets the Interchange Header |
abstract Segment |
getInterchange_Trailer()
gets the Interchange Trailer |
IContainedObject |
getParent()
gets parent attribute |
Envelope |
getResponse()
gets the response attribute |
java.lang.String |
getRevision()
gets the revision attribute |
TemplateSegment |
getTemplateSegment(java.lang.String inID)
method of SegmentContainer interface Envelope's segments built from instance methods so we return a null and hope the call can figure it out |
TemplateSegmentContainer |
getTemplateSegmentContainer()
return segment container template |
java.lang.String |
getXMLTag()
gets the xml tag |
abstract void |
parse(org.w3c.dom.Node node)
|
abstract boolean |
parse(java.io.PushbackInputStream pis)
|
static Envelope |
processEDIEnvelope(java.io.InputStream inStream)
|
void |
setDelimiters(java.lang.String inDelimiters)
sets the segment, field, group (compositeDE) delimiters if you need to use different delimiters, call this method prior to the first getFormattedText call. |
void |
setDelimitersFromProperties()
sets the segment, field, group (compositeDE) delimiters from the properties file. |
abstract void |
setDelimitersInHeader()
sets the Delimter fields in the header |
abstract void |
setFGCountInTrailer()
sets the functional group count in the trailer |
void |
setFormat(int inFormat)
sets the format attribute |
void |
setParent(IContainedObject inParent)
sets parent attribute |
void |
setResponse(Envelope inResponse)
sets the respons attribute |
void |
setRevision(java.lang.String inRevision)
sets the revision attribute |
java.lang.String |
toString()
the toString method |
int |
trim()
removes unused Segments and return the number of subsegments in container |
abstract void |
validate()
validate contents of envelope |
abstract void |
validate(DocumentErrors inDErr)
validate contents of envelope doesn't throw exceptions but places errors in DocumentErrors object |
abstract 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.SegmentContainer |
addSegment, addSegment, addSegment, addSegmentToVector, createSegment, createSegment, 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.IContainedObject |
getDelimiter |
| Methods inherited from interface com.americancoders.edi.ISegmentContainer |
addSegment, createSegment, getSegment, getSegment, getSegmentCount, removeSegment |
| Methods inherited from interface com.americancoders.edi.IDelimiterFetcher |
getDelimiter |
| Field Detail |
protected java.util.Vector functionalGroups
protected TemplateEnvelope myTemplate
protected int format
public static final int XML_FORMAT
public static final int X12_FORMAT
public static final int EDIFACT_FORMAT
public static final int VALID_XML_FORMAT
public static final int CSV_FORMAT
public static final int FIXED_LENGTH_FORMAT
public static final int TRADACOMS_FORMAT
public static final int VALID_XML_FORMAT_WITH_POSITION
public static final int ACH_FORMAT
public static final int ACH_FORMAT_FOR_CBR_PBR
public static final int PIXES_FORMAT
protected java.lang.String revision
protected Envelope response
public static final java.lang.String X12_SEGMENT_DELIMITER
public static final java.lang.String EDIFact_SEGMENT_DELIMITER
public static final java.lang.String TRADACOMS_SEGMENT_DELIMITER
public java.lang.String segmentDelimiter
public static final java.lang.String X12_FIELD_DELIMITER
public static final java.lang.String EDIFact_FIELD_DELIMITER
public static final java.lang.String TRADACOMS_FIELD_DELIMITER
public java.lang.String fieldDelimiter
public static final java.lang.String X12_GROUP_DELIMITER
public static final java.lang.String EDIFact_GROUP_DELIMITER
public static final java.lang.String TRADACOMS_GROUP_DELIMITER
public java.lang.String groupDelimiter
public static final java.lang.String X12_REPEAT_DELIMITER
public static final java.lang.String EDIFact_REPEAT_DELIMITER
public static final java.lang.String TRADACOMS_REPEAT_DELIMITER
public java.lang.String repeatDelimiter
public static final java.lang.String X12_ESCAPE_CHARACTER
public static final java.lang.String EDIFact_ESCAPE_CHARACTER
public static final java.lang.String TRADACOMS_ESCAPE_CHARACTER
public java.lang.String escapeCharacter
public static final java.lang.String TRADACOMS_SEGID_DELIMITER
| Constructor Detail |
public Envelope()
| Method Detail |
public TemplateSegmentContainer getTemplateSegmentContainer()
ISegmentContainer
getTemplateSegmentContainer in interface ISegmentContainerpublic void setDelimitersFromProperties()
in OBOE.properties files add the following
&nbps; x12Delimiters="!@#"
&nbps; EDIFactDelimiters="..."
at this time no exceptions are thrown, all exceptions are caught and written to the System.err file.
public void setDelimiters(java.lang.String inDelimiters)
inDelimiters - String format is 3 or 4 or 5 characters
public abstract void parse(org.w3c.dom.Node node)
throws OBOEException,
java.io.FileNotFoundException,
java.io.IOException
OBOEException
java.io.FileNotFoundException
java.io.IOException
public abstract boolean parse(java.io.PushbackInputStream pis)
throws OBOEException,
java.io.FileNotFoundException,
java.io.IOException
OBOEException
java.io.FileNotFoundException
java.io.IOException
public abstract java.lang.String getFormattedText(int format)
throws OBOEException
format - int - format type see TransactionSet
OBOEException
public abstract void writeFormattedText(java.io.Writer inWriter,
int format)
throws OBOEException,
java.io.IOException
inWriter - writer - object written toformat - int - format type see TransactionSet
OBOEException
java.io.IOException
public abstract void validate()
throws OBOEException
OBOEExceptionpublic abstract void validate(DocumentErrors inDErr)
public abstract Segment getInterchange_Header()
public abstract Segment getInterchange_Trailer()
public abstract FunctionalGroup createFunctionalGroup()
public void addFunctionalGroup(FunctionalGroup inFunctionalGroup)
inFunctionalGroup - a functional Group objectpublic abstract int getFunctionalGroupCount()
public abstract FunctionalGroup getFunctionalGroup(int pos)
pos - int position within container.
public abstract java.util.Vector getFunctionalGroups()
public void setFormat(int inFormat)
inFormat - - intpublic int getFormat()
public static int getFormat(org.w3c.dom.Node node)
throws OBOEException
node - DOM Node
OBOEException - an envelope node not passed
OBOEException - incorrect interchange header node.public void setRevision(java.lang.String inRevision)
inRevision - - Stringpublic java.lang.String getRevision()
public void setResponse(Envelope inResponse)
inResponse - - Envelopepublic Envelope getResponse()
public abstract void setDelimitersInHeader()
throws OBOEException
OBOEException
public abstract void setFGCountInTrailer()
throws OBOEException
OBOEExceptionpublic TemplateSegment getTemplateSegment(java.lang.String inID)
inID - - template segment to get
public java.lang.String getID()
getID in interface IIdentifiergetID in class SegmentContainerpublic void setParent(IContainedObject inParent)
IContainedObject
setParent in interface IContainedObjectinParent - IContainedObjectpublic IContainedObject getParent()
IContainedObject
getParent in interface IContainedObjectpublic java.lang.String getXMLTag()
IIdentifier
getXMLTag in interface IIdentifier
public static Envelope processEDIEnvelope(java.io.InputStream inStream)
throws OBOEException,
java.io.IOException
OBOEException
java.io.IOExceptionpublic java.lang.String toString()
public int trim()
SegmentContainer
trim in class SegmentContainer
|
Open Business Objects for EDI v3.5.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||