org.tockit.datatype
Interface Datatype

All Superinterfaces:
XMLizable
All Known Implementing Classes:
AbstractDatatype

public interface Datatype
extends XMLizable


Method Summary
 boolean canConvertFrom(Value value)
           
 boolean canParse(java.lang.String text)
           
 Value convertType(Value value)
           
 java.lang.String getName()
           
 void insertValue(org.jdom.Element element, Value value)
          Adds the given value into the element.
 boolean isValidValue(Value valueToTest)
           
 Value parse(java.lang.String text)
           
 Value toValue(org.jdom.Element element)
           
 
Methods inherited from interface net.sourceforge.toscanaj.util.xmlize.XMLizable
readXML, toXML
 

Method Detail

getName

public java.lang.String getName()

isValidValue

public boolean isValidValue(Value valueToTest)

canConvertFrom

public boolean canConvertFrom(Value value)

convertType

public Value convertType(Value value)
                  throws ConversionException
Throws:
ConversionException

canParse

public boolean canParse(java.lang.String text)

parse

public Value parse(java.lang.String text)
            throws ConversionException
Throws:
ConversionException

toValue

public Value toValue(org.jdom.Element element)

insertValue

public void insertValue(org.jdom.Element element,
                        Value value)
Adds the given value into the element. This can be done either by adding a "value" attribute or by adding content. Both are in the default namespace, but which way is used depends on the actual type implementation.

Throws:
java.lang.ClassCastException - if the value is not of matching type


The ToscanaJ project