Class DatatypeHandler

java.lang.Object
org.exolab.castor.xml.schema.util.DatatypeHandler

public class DatatypeHandler extends Object
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 Details

  • Method Details

    • guessType

      public static String guessType(String value)
      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

      protected static String whichType(String type1, String type2)
      Guesses which datatype should be used.