Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Class TemplateDE

java.lang.Object
  |
  +--com.americancoders.edi.TemplateDE
All Implemented Interfaces:
java.io.Externalizable, IContainedObject, IIdentifier, java.io.Serializable

public class TemplateDE
extends java.lang.Object
implements java.io.Externalizable, IContainedObject

class for Template Data Elements
template de's are dynamic definitions for de's

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.
See Also:
Serialized Form

Field Summary
protected  java.lang.String description
          description
protected  java.lang.String id
          element id
protected  int maxLength
          minimum and maximum lengths allowed
protected  int minLength
          minimum and maximum lengths allowed
protected  java.lang.String name
          element name
protected  int occurs
          occurs some many times
protected  com.americancoders.edi.IContainedObject parent
           
protected  java.lang.String referenceId
          referenceid as defined by standard
protected  char required
          required indictor
protected  int sequence
          sequence within segment or composite
protected  java.lang.String type
          templatede are not sub classed so store their type here
protected  boolean used
           
protected  java.lang.String xmlTag
          xml tag
 
Constructor Summary
TemplateDE()
          constructs the Data Element type used for serialization
TemplateDE(java.lang.String inID, java.lang.String inName, int inSequence, java.lang.String inType, char inRequired, java.lang.String inDesc, int inMinLength, int inMaxLength, java.lang.String inXMLTag, com.americancoders.edi.IDListProcessor inIDList, com.americancoders.edi.IContainedObject inParent, int inOccurs, boolean inUsed)
          constructs the Data Element type
 
Method Summary
 java.lang.String getDefault()
          gets the default value for a data element
not part of Basic edition
 java.lang.String getDescription()
          returns the Description for the Data Element
 java.lang.String getEmptyData()
           
 java.lang.String getID()
          gets the Data Element id
 com.americancoders.edi.IDListProcessor getIDList()
          gets the idListProcessor Object
 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()
          gets the occurs value
 com.americancoders.edi.IContainedObject getParent()
          gets parent attribute
 char getRequired()
          gets the Data Element required
 int getSequence()
          gets the Data Element sequence
 java.lang.String getType()
          gets the Data Element type
 java.lang.String getXMLTag()
          returns the xml tag field
 boolean isUsed()
          returns used attribute
 void readExternal(java.io.ObjectInput in)
          used by externalize methods
 void setDescription(java.lang.String inDesc)
          sets Description for the Data Element
 void setID(java.lang.String inID)
          sets the Data Element id
 void setIDList(com.americancoders.edi.IDListProcessor inIdList)
          sets the idList Object
 void setMaxLength(int inMaxLength)
          sets the maximum length for the Data Element
 void setMinLength(int inMinLength)
          sets the minimum length for the Data Element
 void setName(java.lang.String inname)
          sets the Data Element name
 void setOccurs(int inOccurs)
          sets the occurs value
 void setParent(com.americancoders.edi.IContainedObject inParent)
          sets parent attribute
 void setRequired(char inRequired)
          sets the Data Element required
 void setSequence(int inSequence)
          sets the Data Element sequence
 void setType(java.lang.String inType)
          sets the Data Element type
 void setUsed(boolean used)
          sets used attribute
 void setXMLTag(java.lang.String inXMLTag)
          sets the xml tag field
 java.lang.String validate(java.lang.String inText)
          returns error responses of contents
 void writeExternal(java.io.ObjectOutput out)
          used by externalize methods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected java.lang.String type
templatede are not sub classed so store their type here


sequence

protected int sequence
sequence within segment or composite


id

protected java.lang.String id
element id


name

protected java.lang.String name
element name


required

protected char required
required indictor


referenceId

protected java.lang.String referenceId
referenceid as defined by standard


minLength

protected int minLength
minimum and maximum lengths allowed


maxLength

protected int maxLength
minimum and maximum lengths allowed


description

protected java.lang.String description
description


xmlTag

protected java.lang.String xmlTag
xml tag


occurs

protected int occurs
occurs some many times


used

protected boolean used

parent

protected com.americancoders.edi.IContainedObject parent
Constructor Detail

TemplateDE

public TemplateDE()
constructs the Data Element type used for serialization


TemplateDE

public TemplateDE(java.lang.String inID,
                  java.lang.String inName,
                  int inSequence,
                  java.lang.String inType,
                  char inRequired,
                  java.lang.String inDesc,
                  int inMinLength,
                  int inMaxLength,
                  java.lang.String inXMLTag,
                  com.americancoders.edi.IDListProcessor inIDList,
                  com.americancoders.edi.IContainedObject inParent,
                  int inOccurs,
                  boolean inUsed)
constructs the Data Element type

Parameters:
inID - String id
inName - String name
inSequence - int sequence within seg or comp
inType - String de type
inRequired - char required indicator
inDesc - String description
inMinLength - int mimimum length
inMaxLength - int maximum length
inXMLTag - String XML tag
inIDList - IDListProcessor if available
inParent - owning Object
inOccurs - int
inUsed - boolean
Method Detail

isUsed

public boolean isUsed()
returns used attribute

Returns:
boolean

setUsed

public void setUsed(boolean used)
sets used attribute

Parameters:
used - boolean used indicator

setType

public void setType(java.lang.String inType)
sets the Data Element type

Parameters:
inType - String

getType

public java.lang.String getType()
gets the Data Element type

Returns:
String

setRequired

public void setRequired(char inRequired)
sets the Data Element required

Parameters:
inRequired - char required indicator

getRequired

public char getRequired()
gets the Data Element required

Returns:
char

setID

public void setID(java.lang.String inID)
sets the Data Element id

Parameters:
inID - String id

getID

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

Specified by:
getID in interface IIdentifier
Returns:
String

setName

public void setName(java.lang.String inname)
sets the Data Element name

Parameters:
inname - String name

getName

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

Returns:
String

setSequence

public void setSequence(int inSequence)
                 throws OBOEException
sets the Data Element sequence

Parameters:
inSequence - int sequence within seg or comp
Throws:
- - invalid sequence - # < 1
OBOEException

getSequence

public int getSequence()
gets the Data Element sequence

Returns:
int

setMinLength

public void setMinLength(int inMinLength)
sets the minimum length for the Data Element

Parameters:
inMinLength - int min length

setMaxLength

public void setMaxLength(int inMaxLength)
sets the maximum length for the Data Element

Parameters:
inMaxLength - int max length

getMinLength

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

Returns:
int

getMaxLength

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

Returns:
int

setDescription

public void setDescription(java.lang.String inDesc)
sets Description for the Data Element

Parameters:
inDesc - String description

getDescription

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

Returns:
String

setXMLTag

public void setXMLTag(java.lang.String inXMLTag)
sets the xml tag field

Parameters:
inXMLTag - String XML Tag

getXMLTag

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

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

setIDList

public void setIDList(com.americancoders.edi.IDListProcessor inIdList)
sets the idList Object

Parameters:
inIdList - IDListProcessor object

getIDList

public com.americancoders.edi.IDListProcessor getIDList()
gets the idListProcessor Object

Returns:
IDListProcessor

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

setOccurs

public void setOccurs(int inOccurs)
sets the occurs value

Parameters:
inOccurs -

getOccurs

public int getOccurs()
gets the occurs value

Returns:
int

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
used by externalize methods

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - ObjectInput stream
Throws:
java.io.IOException - - most likely class changed since written
java.lang.ClassNotFoundException - - only when dummy constructro not found

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
used by externalize methods

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - ObjectOutput Stream
Throws:
java.io.IOException - java.io error

validate

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

Parameters:
inText - String text
Returns:
String

getDefault

public java.lang.String getDefault()
gets the default value for a data element
not part of Basic edition

Returns:
String value as ste

getEmptyData

public java.lang.String getEmptyData()

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.