Class DatatypeHandler
java.lang.Object
org.exolab.castor.xml.schema.util.DatatypeHandler
A class used for "guessing" the proper datatype of
an XML attribute or an XML element with simpleContent.
- Version:
- $Revision: 6944 $ $Date: 2005-03-07 01:33:49 -0700 (Mon, 07 Mar 2005) $
- Author:
- Keith Visco
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The name of the XML Schema boolean typestatic final String
The name of the XML Schema date typestatic final String
The name of the XML Schema dateTime typestatic final String
The name of the XML Schema double typestatic final String
The name of the XML Schema float typestatic final String
The name of the XML Schema integer typestatic final String
The name of the XML Schema long typestatic final String
The name of the XML Schema string typestatic final String
The name of the XML Schema time type -
Method Summary
-
Field Details
-
BOOLEAN_TYPE
The name of the XML Schema boolean type- See Also:
-
DATE_TYPE
The name of the XML Schema date type- See Also:
-
DATETIME_TYPE
The name of the XML Schema dateTime type- See Also:
-
DOUBLE_TYPE
The name of the XML Schema double type- See Also:
-
FLOAT_TYPE
The name of the XML Schema float type- See Also:
-
INTEGER_TYPE
The name of the XML Schema integer type- See Also:
-
LONG_TYPE
The name of the XML Schema long type- See Also:
-
STRING_TYPE
The name of the XML Schema string type- See Also:
-
TIME_TYPE
The name of the XML Schema time type- See Also:
-
-
Method Details
-
guessType
Guesses the datatype for the given value. When the type cannot be determined, it simply defaults to DatatypeHandler.STRING_TYPE.
Note: This may be a slow process.- Parameters:
value
- the value to determine the type for- Returns:
- the type that the value may be
-
whichType
Guesses which datatype should be used.
-