|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.americancoders.edi.SegmentContainer
Segment Container
OBOE - Open Business Objects for EDI
An EDI and XML Translator Written In Java
Copyright 1998-2000 - 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 | |
protected java.lang.Object[] |
segmentArray
|
protected java.util.Vector |
templateSegmentVector
|
Constructor Summary | |
SegmentContainer()
|
Method Summary | |
void |
addSegment(Segment inSegment)
|
void |
addSegment(Segment inSegment,
int inPosition)
adds a Segment to the segmentArray by its predefined sequence |
void |
addSegmentToVector(Segment inSegment,
int inPosition)
adds a Segment to a vectorized segment in the segmentArray at a predefined sequence |
void |
addTemplateSegment(TemplateSegment inTemplateSegment)
adds a templatesegment to the vector |
Segment |
createSegment(java.lang.String id)
creates a static segment |
void |
defineSegmentArray()
simple routine to build the array based on the number of entries in the template segment vector |
abstract java.lang.String |
getID()
|
Segment |
getSegment(int inPosition)
returns a Segment by its position |
Segment |
getSegment(int inPosition,
int inVectorPosition)
returns the Segment inside the subsegment Vector by its position |
Segment |
getSegment(java.lang.String ID)
returns a Segment by its ID |
int |
getSubsegmentCount(int inPosition)
returns the number of subsegments in a vector position |
TemplateSegment |
getTemplateSegment(int inPosition)
gets a templatesegment from the vector |
TemplateSegment |
getTemplateSegment(java.lang.String inID)
gets a templatesegment from the vector |
int |
getTemplateSegmentSize()
returns the number of template segments |
boolean |
isSegment(int inPosition)
returns true if subsegment type is a segment if false the subsegment is a vector or position specified is outside range of array |
boolean |
isVector(int inPosition)
returns true if subsegment type is a vector if true the subsegment is a segment or position specified is outside range of array |
void |
removeSegment(int inPosition)
removes a Segment from the segmentArray at a particular position can be used to remove all segments with same id at a vectorized position |
void |
removeSegment(int inPosition,
int inVectorPosition)
removes a Segment from the segmentArray at a particular position in the subsegment Vector |
void |
removeSegment(java.lang.String inID)
removes a Segment from the segmentArray by id, does this by setting array entry to null can be used to remove all segments with same id at a vectorized position |
void |
removeSegment(java.lang.String inID,
int inPosition)
removes a Segment from the segmentArray by its ID from the subsegment Vector |
void |
setSegmentAt(Segment inSegment,
int inPosition)
sets a Segment to the segmentArray at position in the array, if the Segment is part of the vectorized segment throw exception |
void |
setSegmentAt(Segment inSegment,
int inPosition,
int inVectorPosition)
sets a Segment to the vector at a position segmentArray |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.Vector templateSegmentVector
protected java.lang.Object[] segmentArray
Constructor Detail |
public SegmentContainer()
Method Detail |
public abstract java.lang.String getID()
public void defineSegmentArray()
public void addSegment(Segment inSegment) throws OBOEException
public void addSegment(Segment inSegment, int inPosition) throws OBOEException
Segment
- segment to addint
- sequence numberpublic void addSegmentToVector(Segment inSegment, int inPosition) throws OBOEException
Segment
- segment to addint
- sequence numberpublic void setSegmentAt(Segment inSegment, int inPosition) throws OBOEException
Segment
- segment to addint
- sequence numberpublic void setSegmentAt(Segment inSegment, int inPosition, int inVectorPosition) throws OBOEException
Segment
- segment to addint
- sequence numberint
- position in Vectorpublic void removeSegment(java.lang.String inID) throws OBOEException
int
- positionpublic void removeSegment(java.lang.String inID, int inPosition) throws OBOEException
int
- sequence numberint
- pospublic void removeSegment(int inPosition) throws OBOEException
int
- sequence numberpublic void removeSegment(int inPosition, int inVectorPosition) throws OBOEException
int
- sequence in arrayint
- pos in vectorpublic Segment getSegment(int inPosition)
int
- position of the segmentpublic Segment getSegment(int inPosition, int inVectorPosition) throws OBOEException
int
- position of the segmentint
- position in the vectorpublic Segment getSegment(java.lang.String ID) throws java.lang.Exception
String
- id of the segmentpublic int getSubsegmentCount(int inPosition)
public boolean isSegment(int inPosition)
int
- positionpublic boolean isVector(int inPosition)
int
- positionpublic void addTemplateSegment(TemplateSegment inTemplateSegment)
TemplateSegment
- input templatepublic int getTemplateSegmentSize()
public Segment createSegment(java.lang.String id) throws java.lang.Exception
String
- idpublic TemplateSegment getTemplateSegment(int inPosition)
int
- pos of the templateSegmentpublic TemplateSegment getTemplateSegment(java.lang.String inID)
String
- id of the templateSegment
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |