fi.hut.tml.xsmiles.mlfc.xforms.instance.XercesPSVI
Class DDate

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.xforms.data.DData
      extended byfi.hut.tml.xsmiles.mlfc.xforms.instance.XercesPSVI.DDate
All Implemented Interfaces:
Data
Direct Known Subclasses:
DDateTime

public class DDate
extends DData
implements Data


Field Summary
protected  java.util.Calendar calValue
           
 
Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.data.DData
datatype
 
Constructor Summary
DDate(short dtype)
           
 
Method Summary
protected  void clearValue()
          instructs subclass to set value to null, this is used for invalid values
 boolean setValueFromDisplayInternal(java.lang.String displayValue)
          set the value from a display string
 void setValueFromObjectInternal(java.lang.Object obj)
          set the value as a Java Object
protected  void setValueFromSchemaInternal(java.lang.String schemaValue)
          set the value from a Schema string
 void setValueFromXerces(int[] xercesdate)
          this method reads in Xerces internal format and converts it to a java calendar format.
 java.util.Calendar toCalendar()
          get the java object corresponding to the value
protected  java.lang.String toDisplayValueInternal()
          get the display value (e.g.
 java.lang.Object toObjectInternal()
          get the java object corresponding to the value
protected  java.lang.String toSchemaStringInternal()
          get a schema compatible string from this data.
 
Methods inherited from class fi.hut.tml.xsmiles.mlfc.xforms.data.DData
getDataType, getInvalidValue, isValid, setInvalidString, setValid, setValueFromDisplay, setValueFromObject, setValueFromSchema, toDisplayValue, toObject, toSchemaString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.mlfc.xforms.data.Data
getDataType, getInvalidValue, isValid, setInvalidString, setValid, setValueFromDisplay, setValueFromObject, setValueFromSchema, toDisplayValue, toObject, toSchemaString
 

Field Detail

calValue

protected java.util.Calendar calValue
Constructor Detail

DDate

public DDate(short dtype)
Method Detail

setValueFromObjectInternal

public void setValueFromObjectInternal(java.lang.Object obj)
set the value as a Java Object

Specified by:
setValueFromObjectInternal in class DData

setValueFromDisplayInternal

public boolean setValueFromDisplayInternal(java.lang.String displayValue)
set the value from a display string

Specified by:
setValueFromDisplayInternal in class DData

setValueFromSchemaInternal

protected void setValueFromSchemaInternal(java.lang.String schemaValue)
set the value from a Schema string

Specified by:
setValueFromSchemaInternal in class DData

toDisplayValueInternal

protected java.lang.String toDisplayValueInternal()
get the display value (e.g. 3,12 / 3.12 depending on the locale)

Specified by:
toDisplayValueInternal in class DData

toSchemaStringInternal

protected java.lang.String toSchemaStringInternal()
get a schema compatible string from this data. E.g. From a date you would get a String in xsd:date format

Specified by:
toSchemaStringInternal in class DData

setValueFromXerces

public void setValueFromXerces(int[] xercesdate)
this method reads in Xerces internal format and converts it to a java calendar format. Timezone not supported yet


toObjectInternal

public java.lang.Object toObjectInternal()
get the java object corresponding to the value

Specified by:
toObjectInternal in class DData

toCalendar

public java.util.Calendar toCalendar()
get the java object corresponding to the value


clearValue

protected void clearValue()
instructs subclass to set value to null, this is used for invalid values

Specified by:
clearValue in class DData


X-Smiles 1.2