|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cb2java.copybook.data.Data
The base type for all Data elements
Constructor Summary | |
Data(Element definition)
constructor |
Method Summary | |
abstract java.util.List |
getChildren()
returns all the children of this item, if there are any |
Element |
getDefinition()
the underlying type definition of the element |
java.lang.String |
getName()
returns the name of the type that defines this element |
abstract java.lang.Object |
getValue()
returns the Object as it's 'natural' Java type |
abstract boolean |
isLeaf()
Returns whether this element is a leaf element. |
void |
setValue(java.lang.Object data)
Sets the internal value of this item. |
void |
setValue(java.lang.String data)
sets the value from an input String. |
protected abstract void |
setValueImpl(java.lang.Object data)
called by setData after validate is called |
abstract java.lang.String |
toString(java.lang.String indent)
gives a string representation of this element with the given indention |
protected abstract java.lang.Object |
translate(java.lang.String data)
Converts the String to the underlying Data type's 'natural' type. |
void |
validate(java.lang.Object data)
Validates the data passed in using the underlying definition |
void |
write(java.io.OutputStream stream)
writes this Data instance to the stream as COBOL application data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Data(Element definition)
definition
- the underlying type definitionMethod Detail |
public java.lang.String getName()
public abstract boolean isLeaf()
public abstract java.util.List getChildren()
public abstract java.lang.String toString(java.lang.String indent)
indent
- the string used to indentpublic Element getDefinition()
public abstract java.lang.Object getValue()
public final void setValue(java.lang.Object data)
data
- the data to set. Must be compatible with the
the instance.public final void setValue(java.lang.String data)
data
- the string to use to set this data's valueprotected abstract java.lang.Object translate(java.lang.String data)
data
- the string to use to set this data's value
protected abstract void setValueImpl(java.lang.Object data)
data
- the data to setpublic void write(java.io.OutputStream stream) throws java.io.IOException
stream
- the stream to write to
java.io.IOException
public final void validate(java.lang.Object data)
data
- the data to validate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |