Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Class DataElement

java.lang.Object
  |
  +--com.americancoders.edi.DataElement
All Implemented Interfaces:
IContainedObject, IIdentifier
Direct Known Subclasses:
BinaryDE, CharDE, DateDE, IDDE, NumericDE, RealDE, TimeDE

public abstract class DataElement
extends java.lang.Object
implements IContainedObject

class for all Data Elements

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.

Field Summary
protected  com.americancoders.edi.IContainedObject parent
          owning object
 
Constructor Summary
DataElement(com.americancoders.edi.TemplateDE inTDE, com.americancoders.edi.IContainedObject inParent)
          constructs from its template
 
Method Summary
abstract  java.lang.String get()
          returns the value for the Data Element
 java.lang.String getDescription()
          returns the Description for the Data Element
 java.lang.String getFixedLengthFormattedText()
           
abstract  java.lang.String getFormattedText(int formatType)
          formats text of data element
Description of DataElement is defined in the class
value is the current value set in the object
 java.lang.String getID()
          gets the Data Element id
abstract  int getLength()
          gets the current length for the Data Element
 int getMaxLength()
          gets the maximum length for the Data Element
 int getMinLength()
          gets the minimum length for the Data Element
 java.lang.String getName()
          gets the Data Element Name
 int getOccurs()
          returns the occurs value for the Data Element
 com.americancoders.edi.IContainedObject getParent()
          gets parent attribute
 int getRequired()
          gets the required indicator
 int getSequence()
          gets the Data Element sequence
 com.americancoders.edi.TemplateDE getTemplate()
          gets the template that built this object
 java.lang.String getType()
          returns the dataElement Type
 java.lang.String getXMLTag()
          returns the xml tag field
 boolean isUsed()
          returns the used indicator
abstract  void set(byte[] inValue)
          sets the fields contents
abstract  void set(java.lang.String inValue)
          sets the fields contents
abstract  void setNext(java.lang.String inValue)
          sets the fields contents for multiple occuring elements
 void setParent(com.americancoders.edi.IContainedObject inParent)
          sets parent attribute
 java.lang.String toString()
          the toString method
abstract  boolean validate(com.americancoders.edi.DocumentErrors inDErr)
          sets error in DocumentErrors
abstract  java.lang.String validate(java.lang.String inText)
          returns error responses of contents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected com.americancoders.edi.IContainedObject parent
owning object

Constructor Detail

DataElement

public DataElement(com.americancoders.edi.TemplateDE inTDE,
                   com.americancoders.edi.IContainedObject inParent)
constructs from its template

Parameters:
inTDE - TemplateDE
inParent - owning Object
Method Detail

getType

public java.lang.String getType()
returns the dataElement Type

Returns:
String type

getID

public java.lang.String getID()
gets the Data Element id

Specified by:
getID in interface IIdentifier
Returns:
String edi id

getName

public java.lang.String getName()
gets the Data Element Name

Returns:
String edi Name

getSequence

public int getSequence()
gets the Data Element sequence

Returns:
int sequence with in the segment

getRequired

public int getRequired()
gets the required indicator

Returns:
char the required indicator

getMinLength

public int getMinLength()
gets the minimum length for the Data Element

Returns:
int the defined minimum length

getMaxLength

public int getMaxLength()
gets the maximum length for the Data Element

Returns:
int the defined maximum length

getXMLTag

public java.lang.String getXMLTag()
returns the xml tag field

Specified by:
getXMLTag in interface IIdentifier
Returns:
String tag value

getDescription

public java.lang.String getDescription()
returns the Description for the Data Element

Returns:
String description

getOccurs

public int getOccurs()
returns the occurs value for the Data Element

Returns:
int

isUsed

public boolean isUsed()
returns the used indicator

Returns:
boolean indicator

set

public abstract void set(java.lang.String inValue)
sets the fields contents

Parameters:
inValue - String contents

setNext

public abstract void setNext(java.lang.String inValue)
sets the fields contents for multiple occuring elements

Parameters:
inValue - String contents

set

public abstract void set(byte[] inValue)
sets the fields contents

Parameters:
inValue - byte array

get

public abstract java.lang.String get()
returns the value for the Data Element

Returns:
String

getLength

public abstract int getLength()
gets the current length for the Data Element

Returns:
int retuns length of set value, can have a null exception if value is not set.

getFormattedText

public abstract java.lang.String getFormattedText(int formatType)
formats text of data element
Description of DataElement is defined in the class
value is the current value set in the object

Parameters:
formatType - int format type x12, edifact...
Returns:
String of formatted text

validate

public abstract java.lang.String validate(java.lang.String inText)
returns error responses of contents

Parameters:
inText - String text
Returns:
String, null if no error

validate

public abstract boolean validate(com.americancoders.edi.DocumentErrors inDErr)
sets error in DocumentErrors

Parameters:
inDErr - DocumentErrors object

getTemplate

public com.americancoders.edi.TemplateDE getTemplate()
gets the template that built this object


setParent

public void setParent(com.americancoders.edi.IContainedObject inParent)
sets parent attribute

Specified by:
setParent in interface IContainedObject
Parameters:
inParent - TemplateSegmentContainer

getParent

public com.americancoders.edi.IContainedObject getParent()
gets parent attribute

Specified by:
getParent in interface IContainedObject
Returns:
TemplateSegmentContainer

getFixedLengthFormattedText

public java.lang.String getFixedLengthFormattedText()

toString

public java.lang.String toString()
the toString method

Overrides:
toString in class java.lang.Object

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.