|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.Element
com.edustructures.sifworks.SimpleField<T>
public class SimpleField<T>
A simple field value. Unlike complex elements, which are stored as child objects of their parent, simple fields (i.e. attributes or elements that have no children) are wrapped in a SimpleField instance and stored in the field table of their parent object.
| Field Summary |
|---|
| Fields inherited from class com.edustructures.sifworks.Element |
|---|
CURRENT_SERIALIZE_VERSION |
| Constructor Summary | |
|---|---|
SimpleField(SIFElement parent,
ElementDef def,
SIFSimpleType<T> value)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
SIFSimpleType<T> |
getSIFValue()
Returns the SIFSimpleType value of this field |
java.lang.String |
getTextValue()
Gets the text value of this element if applicable. |
java.lang.String |
getTextValue(SIFFormatter formatter)
|
T |
getValue()
Returns the native datatype value of this field |
boolean |
isDoNotEncode()
Checks the underlying data type and flags to determine if XML encoding should be turned off for this field |
void |
setSIFValue(SIFSimpleType value)
Sets the SIF strongly-typed value of this element |
void |
setTextValue(java.lang.String value)
Sets the datatype of this field as a string value. |
void |
setTextValue(java.lang.String value,
SIFFormatter formatter)
|
| Methods inherited from class com.edustructures.sifworks.Element |
|---|
compareTo, getElementDef, getParent, getRoot, isChanged, isEmpty, setChanged, setChanged, setDoNotEncode, setElementDef, setEmpty, setEmpty, setParent, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleField(SIFElement parent,
ElementDef def,
SIFSimpleType<T> value)
parent - The SIFElement that is the parent of this fielddef - The metadata definition of this fieldvalue - A typed subclass of SIFSimpleType| Method Detail |
|---|
public java.lang.String getTextValue(SIFFormatter formatter)
public void setTextValue(java.lang.String value,
SIFFormatter formatter)
throws ADKParsingException
value - formatter -
ADKParsingExceptionpublic java.lang.String getTextValue()
Element
To change the format used for Text values on elements, set the
ADK.setTextFormatter(SIFFormatter) property
getTextValue in class Elementpublic void setTextValue(java.lang.String value)
setTextValue in class Elementvalue - The text value of this element
java.lang.NumberFormatException - if the value being set cannot be parsed into
the datatype being stored for this fieldElement.setTextValue(java.lang.String)public void setSIFValue(SIFSimpleType value)
Element
setSIFValue in class Elementvalue - The SIF Value to setpublic SIFSimpleType<T> getSIFValue()
getSIFValue in class ElementElement.getSIFValue()public T getValue()
public boolean isDoNotEncode()
isDoNotEncode in class Elementtrue if automatic XML Encoding is disabled for this
element; false if enabled (the default)Element.isDoNotEncode()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||