Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Interface IDataElementContainer

All Known Implementing Classes:
CompositeDE, Segment

public interface IDataElementContainer

interface for DataElement Container

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
 java.lang.Object buildDE(int pos)
          defines a dataelement by the predefined templateDE array
 java.lang.Object buildDE(java.lang.String ID)
          defines a dataelement by the predefined templateDE array
 com.americancoders.edi.DataElement getDataElement(int inSequence)
          returns a DataElement in the Container
 com.americancoders.edi.DataElement getDataElement(java.lang.String ID)
          returns a DataElement in the Container
since more than one dataelement with the same id can be in the container this is not a very effective method for fetching unique datalements.
 int getDataElementSize()
          returns the number of defined data element
 java.lang.String getDataElementValue(int pos)
          returns the value set in the data element if the data element is not built it will return a zero-length string.
 java.lang.String getDataElementValue(java.lang.String ID)
          returns the value set in the data element if the data element is not built it will return a zero-length string.
 com.americancoders.edi.DataElement setDataElementValue(int pos, java.lang.String inValue)
          sets the value set in the data element without needing to build the data element object if the data element is not built it will be built.
 com.americancoders.edi.DataElement setDataElementValue(java.lang.String ID, java.lang.String inValue)
          returns the value set in the data element if the data element is not built it will return a zero-length string.
 

Method Detail

getDataElement

public com.americancoders.edi.DataElement getDataElement(java.lang.String ID)
                                                  throws OBOEException
returns a DataElement in the Container
since more than one dataelement with the same id can be in the container this is not a very effective method for fetching unique datalements.

Parameters:
ID - String ID of datalement to look for
Returns:
DataElement DataElement object
Throws:
OBOEException - ID is unknown

getDataElement

public com.americancoders.edi.DataElement getDataElement(int inSequence)
                                                  throws OBOEException
returns a DataElement in the Container

Parameters:
inSequence - int sequence position of dataelement
Returns:
DataElement DataElement object
Throws:
OBOEException - ID is unknown

getDataElementSize

public int getDataElementSize()
returns the number of defined data element

Returns:
int DataElement count

buildDE

public java.lang.Object buildDE(int pos)
defines a dataelement by the predefined templateDE array

Parameters:
pos - field to build is identified by its templates position
position is relative to 1.
Returns:
Object always a DataElement, I used Object to keep it consistent with what Segments buildDE returns.

buildDE

public java.lang.Object buildDE(java.lang.String ID)
defines a dataelement by the predefined templateDE array

Parameters:
ID - field to build is identified by its templates id value
Returns:
Object always a DataElement, I used Object to keep it consistent with what Segments buildDE returns.

getDataElementValue

public java.lang.String getDataElementValue(java.lang.String ID)
                                     throws OBOEException
returns the value set in the data element if the data element is not built it will return a zero-length string. if the position is out of range the OBOEException will be thrown.

Parameters:
ID - String ID of datalement to look for
Returns:
String contents of data lement
Throws:
OBOEException - ID is unknown, or position is for a composite de

getDataElementValue

public java.lang.String getDataElementValue(int pos)
                                     throws OBOEException
returns the value set in the data element if the data element is not built it will return a zero-length string. if the position is out of range the OBOEException will be thrown.

Parameters:
pos - int position within the segement
Returns:
String contents of data lement
Throws:
OBOEException - ID is unknown

setDataElementValue

public com.americancoders.edi.DataElement setDataElementValue(java.lang.String ID,
                                                              java.lang.String inValue)
                                                       throws OBOEException
returns the value set in the data element if the data element is not built it will return a zero-length string. if the position is out of range the OBOEException will be thrown.

Parameters:
ID - String ID of datalement to look for
Returns:
DataElement DataElement object
Throws:
OBOEException - ID is unknown, or position is for a composite de

setDataElementValue

public com.americancoders.edi.DataElement setDataElementValue(int pos,
                                                              java.lang.String inValue)
                                                       throws OBOEException
sets the value set in the data element without needing to build the data element object if the data element is not built it will be built. if the position is out of range the OBOEException will be thrown.

Parameters:
pos - int position within the segement
Returns:
DataElement DataElement object
Throws:
OBOEException - ID is unknown

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.