Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Interface ISegmentContainer

All Known Implementing Classes:
Envelope, FunctionalGroup, SegmentContainer

public interface ISegmentContainer

Segment Container Interface

defines basic segment container methods

OBOE - Open Business Objects for EDI

Part of the OBOE Basic Extended Package
An EDI and XML Translator Written In Java
Copyright 1998-2009 - 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

Version:
3.6.0
Author:
Joe McVerry - American Coders, Ltd.

Method Summary
 void addSegment(com.americancoders.edi.Segment inSegment)
          add a segment to the array
 com.americancoders.edi.Segment createSegment(java.lang.String id)
          creates a static segment
 java.lang.String getID()
          returns the ID of the container, Segment ID, "Envelope",...
 com.americancoders.edi.Segment getSegment(java.lang.String inID)
          returns a Segment by its ID
 com.americancoders.edi.Segment getSegment(java.lang.String inID, int pos)
          returns a Segment by its ID and position in container
 int getSegmentCount(java.lang.String id)
          returns the # of segments within container with the id
 com.americancoders.edi.TemplateSegmentContainer getTemplateSegmentContainer()
          return segment container template
 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
 

Method Detail

getTemplateSegmentContainer

public com.americancoders.edi.TemplateSegmentContainer getTemplateSegmentContainer()
return segment container template

Returns:
TemplateSegmentContainer

addSegment

public void addSegment(com.americancoders.edi.Segment inSegment)
                throws OBOEException
add a segment to the array

Parameters:
inSegment - Segmemt to add to vector
Throws:
OBOEException - segment doesn't belong

removeSegment

public void removeSegment(java.lang.String inID)
                   throws OBOEException
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

Parameters:
inID - String id
Throws:
OBOEException - unknown segment id

getSegment

public com.americancoders.edi.Segment getSegment(java.lang.String inID)
                                          throws OBOEException
returns a Segment by its ID

Parameters:
inID - String id of segment to get
Returns:
Segment objects - null indicates segment not set
Throws:
OBOEException - id not found

getSegment

public com.americancoders.edi.Segment getSegment(java.lang.String inID,
                                                 int pos)
                                          throws OBOEException
returns a Segment by its ID and position in container

Parameters:
inID - String id of segment to get
pos - int
Returns:
Segment objects - null indicates segment not set
Throws:
OBOEException - id not found

createSegment

public com.americancoders.edi.Segment createSegment(java.lang.String id)
                                             throws OBOEException
creates a static segment

Parameters:
id - String id of subsegment to create
Returns:
Segment based on this Template, will return null if segment not found
Throws:
OBOEException - if a Vector is defined at this position.

getID

public java.lang.String getID()
returns the ID of the container, Segment ID, "Envelope",...


getSegmentCount

public int getSegmentCount(java.lang.String id)
returns the # of segments within container with the id


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.