|
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.LoopAndSegmentContainer
Segment Container
OBOE - Open Business Objects for EDI
Part of the OBOE Basic Extended Package
An EDI and XML Translator Written In Java
Copyright 1998-2007 - American Coders, LTD - Raleigh NC USA
All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com
| Field Summary |
| Fields inherited from class com.americancoders.edi.SegmentContainer |
container, dupSegment, myTemplateContainer |
| Constructor Summary | |
LoopAndSegmentContainer()
|
|
| Method Summary | |
void |
addLoop(Loop inLoop)
add a Loop to the array |
void |
addLoopToVector(Loop inLoop,
int inPosition)
adds a Loop to a vectorized Loop in the container at a predefined sequence |
boolean |
continueParse(SegmentContainer inContainer,
ITokenizer TransactionSetTokenizer)
continues to parse an EDI Document after an error. |
Loop |
createLoop(java.lang.String id)
creates a Loop by ID |
void |
defineContainer()
simple routine to build the array based on the number of entries in the template segment vector |
boolean |
doYouWantThisNode(org.w3c.dom.Node node)
tests if the node is part of this container |
boolean |
doYouWantThisSegment(java.lang.String inID)
tests if the seg id is part of this container |
int |
getContainerSize()
returns the size of the segment array -1 if array is undefined |
int |
getCount(int inPosition)
returns the number of elements in a vector position |
int |
getCount(java.lang.String ID)
returns the number of elements by id |
Loop |
getLoop(int inPosition)
returns a Loop by its position |
Loop |
getLoop(int inPosition,
int inVectorPosition)
returns the Loop inside the subLoop Vector by its position |
Loop |
getLoop(java.lang.String ID)
returns a Loop by its ID |
Loop |
getLoop(java.lang.String ID,
int inVectorPosition)
returns a Loop by its ID and its position in the vector You must use this method call to get to floating Loops |
int |
getLoopAndSegmentCount()
returns the number of sub componenets (loops and segments) |
Loop |
getLoopByDataElementValue(java.lang.String ID,
int inSequence,
java.lang.String inValue)
returns a Loop by its id and the contents of a data field Used for Loops that repeat, useful with IDDE type fields. |
int |
getLoopCount()
returns the number of subloops |
int |
getLoopCount(java.lang.String ID)
returns the number of subLoops by Loop id |
int |
getSegmentCount()
returns the number of subsegments |
int |
getSegmentCount(int inPosition)
returns the number of subLoops in a vector position |
TemplateLoopContainer |
getTemplateLoopContainer()
returns the template loop container |
java.util.Vector |
getVector(int inPosition)
returns the vector in the container |
boolean |
isLoop(int inPosition)
returns true if object in container is a Loop at reqqeusted position if false the subLoop is a vector or position specified is outside range of array |
boolean |
isLoop(int inPosition,
int inVectorPosition)
returns true if object in container is a Loop at reqqeusted position if false the subLoop is a vector or position specified is outside range of array |
boolean |
isNull(int inPosition)
returns true if there is no object in container at reqqeusted position |
boolean |
isVector(int inPosition)
returns true if object in container is a vector at reqqeusted position if true the subLoop is a Loop or position specified is outside range of array |
boolean |
parse(ITokenizer TransactionTokenizedString)
parses the segment portion of an EDI Document, adds to segment vector |
void |
parse(org.w3c.dom.Node node)
parses a XML EDI Document adds to datalement vector or compositeDE and adds to secondary Segment vector |
void |
parse(java.io.PushbackInputStream pis)
parses a Fixed Length EDI Document |
void |
removeLoop(int inPosition)
removes a Loop from the container at a particular position can be used to remove all Loops with same id at a vectorized position |
void |
removeLoop(int inPosition,
int inVectorPosition)
removes a Loop from the container at a particular position in the subLoop Vector |
void |
removeLoop(java.lang.String inID)
removes a Loop from the container by id, does this by setting array entry to null can be used to remove all Loops with same id at a vectorized position |
void |
removeLoop(java.lang.String inID,
int inPosition)
removes a Loop from the container by its ID from the subLoop Vector |
void |
setLoopAt(Loop inLoop,
int inPosition)
sets a Loop to the container at position in the array, if the Loop is part of the vectorized Loop throw exception |
void |
setLoopAt(Loop inLoop,
int inPosition,
int inVectorPosition)
sets a Loop to the vector at a position container |
void |
setTemplateLoopContainer(TemplateLoopContainer inTLC)
sets the template loop container |
int |
trim()
removes unused Loops and return the number of subLoops in container |
boolean |
validate()
validates if the contianer is defined correctly |
boolean |
validate(DocumentErrors inDErr)
validates if the container is defined correctly doesn't throw exception, places error messages in DocumentErrors object |
void |
whyNotUsed(Tokenizer et)
asks the container why it didn't use the current token |
| Methods inherited from class com.americancoders.edi.SegmentContainer |
addSegment, addSegment, addSegment, addSegmentToVector, createSegment, createSegment, equivalentSegments, getID, getSegment, getSegment, getSegment, getSegment, getSegment, getSegment, getSegmentByDataElementValue, getSegmentCount, isSegment, isSegment, removeSegment, removeSegment, removeSegment, removeSegment, resetToFirstEquivalentSegment, setSegmentAt, setSegmentAt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.americancoders.edi.IContainedObject |
getDelimiter, getParent, setParent |
| Methods inherited from interface com.americancoders.edi.IIdentifier |
getXMLTag |
| Methods inherited from interface com.americancoders.edi.ISegmentContainer |
getTemplateSegmentContainer |
| Methods inherited from interface com.americancoders.edi.IDelimiterFetcher |
getDelimiter |
| Constructor Detail |
public LoopAndSegmentContainer()
| Method Detail |
public boolean doYouWantThisSegment(java.lang.String inID)
throws OBOEException
inID - String seg id
OBOEException - thrown when an unknown segment id string is found
public boolean parse(ITokenizer TransactionTokenizedString)
throws OBOEException
parse in class SegmentContainerTransactionTokenizedString - incoming tokenized string
OBOEException - as thrown, can't process subsegment maybe
public void parse(org.w3c.dom.Node node)
throws OBOEException
node - Incoming DOM node
OBOEException - as thrown
public void parse(java.io.PushbackInputStream pis)
throws OBOEException,
java.io.IOException
pis - PushbackInputStream
OBOEException - thrown when the transaction id string is incorrect
OBOEException - thrown when an unknown segment id string is foundi
java.io.IOExceptionpublic void whyNotUsed(Tokenizer et)
whyNotUsed in class SegmentContaineret - Tokenizer object to get TransactionTokenizedString incoming tokenized stringpublic int getContainerSize()
getContainerSize in class SegmentContainerpublic void defineContainer()
defineContainer in class SegmentContainer
public void addLoop(Loop inLoop)
throws OBOEException
inLoop - Segmemt to add to vector
OBOEException - Loop doesn't belong
public void addLoopToVector(Loop inLoop,
int inPosition)
throws OBOEException
inLoop - LoopinPosition - int position
OBOEException - Loop postion not vectorized
public void setLoopAt(Loop inLoop,
int inPosition)
throws OBOEException
inLoop - LoopinPosition - int position
OBOEException - out of range
SubLoop vectorized
SubLoop not defined at sequence
public void setLoopAt(Loop inLoop,
int inPosition,
int inVectorPosition)
throws OBOEException
inLoop - LoopinPosition - int position in arrayinVectorPosition - int position with vector at inPosition
OBOEException - out of range
SubLoop not vectorized
SubLoop not defined at sequence
public void removeLoop(java.lang.String inID)
throws OBOEException
inID - String id
OBOEException - unknown Loop id
public void removeLoop(java.lang.String inID,
int inPosition)
throws OBOEException
inID - String IDinPosition - int position in array
OBOEException - SubLoop not vectorized
unknown Loop id
public void removeLoop(int inPosition)
throws OBOEException
inPosition - int position in array
OBOEException - position number out of range
public void removeLoop(int inPosition,
int inVectorPosition)
throws OBOEException
inPosition - int position in arrayinVectorPosition - int position in Vector at inPosition in array
OBOEException - position number out of range
SubLoop not vectorized
SubLoop sequence not defined
public Loop getLoop(int inPosition)
throws OBOEException
inPosition - int position in array
OBOException - "No Loop at this position" - it is a Vector of Loops
OBOEException
public Loop getLoop(int inPosition,
int inVectorPosition)
throws OBOEException
inPosition - int position in arrayinVectorPosition - int position in Vector at inPosition in array
OBOEException - bad position specified, position is negative, larger than Vector or
object at position specified by first parameter is a Loop.
public Loop getLoop(java.lang.String ID)
throws OBOEException
ID - String id of Loop to get
OBOEException - "ID is unknown to Loop "
public Loop getLoop(java.lang.String ID,
int inVectorPosition)
throws OBOEException
ID - String id of Loop to getinVectorPosition - int position in Vector at position in array identified by id
OBOEException - Loop with ID not within a Vector.
public Loop getLoopByDataElementValue(java.lang.String ID,
int inSequence,
java.lang.String inValue)
throws OBOEException
ID - String id of loopinSequence - int DataElement sequence number relative to 1inValue - String value to test
OBOEException - Loop with ID not within a Vector.public java.util.Vector getVector(int inPosition)
inPosition -
public int getLoopAndSegmentCount()
java.lang.ArrayOutOfBounds - is possible.public int getSegmentCount()
java.lang.ArrayOutOfBounds - is possiblpublic int getLoopCount()
java.lang.ArrayOutOfBounds - is possiblpublic int getSegmentCount(int inPosition)
getSegmentCount in class SegmentContainerinPosition - int position in array
java.lang.ArrayOutOfBounds - is possible.public int getLoopCount(java.lang.String ID)
ID - String id of Loop to count
OBOEException - Loop with ID unknown.public int getCount(int inPosition)
inPosition - int position in array
java.lang.ArrayOutOfBounds - is possible.public int getCount(java.lang.String ID)
ID - String id to count
OBOEException - ID unknown.public boolean isLoop(int inPosition)
inPosition - int position inarray
public boolean isLoop(int inPosition,
int inVectorPosition)
inPosition - int position inarray
public boolean isVector(int inPosition)
isVector in class SegmentContainerinPosition - int position in array
public boolean isNull(int inPosition)
isNull in class SegmentContainerinPosition - int position in array
public Loop createLoop(java.lang.String id)
throws OBOEException
id - String id of subLoop to create
OBOEException - unknown id
public boolean doYouWantThisNode(org.w3c.dom.Node node)
throws OBOEException
node - DOM node of transaction data
OBOEException - thrown when the transaction id string is incorrect
OBOEException - thrown when an unknown segment id string is foundipublic int trim()
trim in class SegmentContainer
public boolean continueParse(SegmentContainer inContainer,
ITokenizer TransactionSetTokenizer)
throws OBOEException
inContainer - last container used.TransactionSetTokenizer - tokenizer hold transaction strings
OBOEException - thrown when the transaction id string is incorrect
OBOEException - thrown when an unknown Segment id string is foundipublic boolean validate()
public boolean validate(DocumentErrors inDErr)
public void setTemplateLoopContainer(TemplateLoopContainer inTLC)
inTLC - public TemplateLoopContainer getTemplateLoopContainer()
|
Open Business Objects for EDI v3.5.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||