com.americancoders.edi
Class IDDE

java.lang.Object
  |
  +--com.americancoders.edi.DataElement
        |
        +--com.americancoders.edi.IDDE

public class IDDE
extends DataElement

class for all Data Elements defined as character

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

Version:
1.4.1
Author:
Joe McVerry, American Coders Ltd.

Field Summary
protected  IDList idList
           
 
Fields inherited from class com.americancoders.edi.DataElement
description, id, maxLength, minLength, referenceId, required, sequence, value, xmlTag
 
Constructor Summary
IDDE(java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength)
          constructs the IDDE type
IDDE(java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength, IDList inIDList)
          constructs the IDDE type
IDDE(java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength, java.lang.String inXMLTag)
          constructs the IDDE type
IDDE(java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength, java.lang.String inXMLTag, IDList inIDList)
          constructs the IDDE type
IDDE(java.lang.String inValue, java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength, java.lang.String inXMLTag)
          constructs the ID DE type and sets its value
IDDE(java.lang.String inValue, java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength, java.lang.String inXMLTag, IDList inIDList)
          constructs the ID DE type and sets its value
 
Method Summary
 void addCode(java.lang.String inValidCode, java.lang.String inCodeMeaning)
          sets the validating list with valid codes and description array
used by Segment class, because codes are dependent on the Segment
 java.lang.String describe()
          returns a description for the current value
 java.lang.String describe(java.lang.String testCode)
          returns a description for a code
 java.lang.String getCode(java.lang.String testDescription)
          returns a code for a desciption
 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
 boolean isCodeValid(java.lang.String testCode)
          tests input string for validity
 
Methods inherited from class com.americancoders.edi.DataElement
get, getDescription, getID, getLength, getMaxLength, getMinLength, getRequired, getSequence, getType, getXMLTag, set, setDescription, setID, setMaxLength, setMinLength, setRequired, setSequence, setValue, setXMLTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idList

protected IDList idList
Constructor Detail

IDDE

public IDDE(java.lang.String inID,
            int inSequence,
            java.lang.String inDesc,
            char inRequired,
            int inMinLength,
            int inMaxLength,
            java.lang.String inXMLTag)
constructs the IDDE type
Parameters:
String - id
int - sequence
String - description
char - required
int - minimum allowed length
int - maximum allowed length
String - xml tag

IDDE

public IDDE(java.lang.String inID,
            int inSequence,
            java.lang.String inDesc,
            char inRequired,
            int inMinLength,
            int inMaxLength)
constructs the IDDE type
Parameters:
String - id
int - sequence
char - required
String - description
int - minimum allowed length
int - maximum allowed length

IDDE

public IDDE(java.lang.String inValue,
            java.lang.String inID,
            int inSequence,
            java.lang.String inDesc,
            char inRequired,
            int inMinLength,
            int inMaxLength,
            java.lang.String inXMLTag)
constructs the ID DE type and sets its value
Parameters:
String - id
int - sequence
String - description
char - required
int - minimum allowed length
int - maximum allowed length
String - xml tag

IDDE

public IDDE(java.lang.String inID,
            int inSequence,
            java.lang.String inDesc,
            char inRequired,
            int inMinLength,
            int inMaxLength,
            java.lang.String inXMLTag,
            IDList inIDList)
constructs the IDDE type
Parameters:
String - id
int - sequence
String - description
char - required
int - minimum allowed length
int - maximum allowed length
String - xml tag
IDList - inIDList

IDDE

public IDDE(java.lang.String inID,
            int inSequence,
            java.lang.String inDesc,
            char inRequired,
            int inMinLength,
            int inMaxLength,
            IDList inIDList)
constructs the IDDE type
Parameters:
String - id
int - sequence
String - description
char - required
int - minimum allowed length
int - maximum allowed length
IDList - inIDList

IDDE

public IDDE(java.lang.String inValue,
            java.lang.String inID,
            int inSequence,
            java.lang.String inDesc,
            char inRequired,
            int inMinLength,
            int inMaxLength,
            java.lang.String inXMLTag,
            IDList inIDList)
constructs the ID DE type and sets its value
Parameters:
String - id
int - sequence
String - description
char - required
int - minimum allowed length
int - maximum allowed length
String - xml tag
IDList - inIDList
Method Detail

addCode

public void addCode(java.lang.String inValidCode,
                    java.lang.String inCodeMeaning)
sets the validating list with valid codes and description array
used by Segment class, because codes are dependent on the Segment
Parameters:
String - valid code
String - valid code description or meaning

isCodeValid

public boolean isCodeValid(java.lang.String testCode)
tests input string for validity
Parameters:
String - code to test for
Returns:
boolean - true if valid, false otherwise

describe

public java.lang.String describe()
returns a description for the current value
Returns:
String -description of the code

describe

public java.lang.String describe(java.lang.String testCode)
returns a description for a code
Parameters:
String - code to search for
Returns:
String -description of the code

getCode

public java.lang.String getCode(java.lang.String testDescription)
returns a code for a desciption
Parameters:
String - description to search for
Returns:
String code of the description

getFormattedText

public 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
Overrides:
getFormattedText in class DataElement
Parameters:
int - formatType
  • formatType == 1 produces XML output
  • default produces "description: value"