Class SimpleTypesFactory

java.lang.Object
org.exolab.castor.xml.schema.SimpleTypesFactory

public class SimpleTypesFactory extends Object
SimpleTypesFactory provides code constants for every built in type defined in www.w3.org/TR/xmlschma-2-20000407 USER_TYPE is used for user derived types. This factory can also create instances of classes derived from SimpleType that represent the simple types defined by xmlschema and those derived from them.
Version:
$Revision: 8873 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Arnaud Berry
  • Field Details

  • Constructor Details

    • SimpleTypesFactory

      public SimpleTypesFactory()
      Creates an instance of SimpleTypesFactory, loading type definition information from the relevant files.
  • Method Details

    • isBuiltInType

      public static boolean isBuiltInType(int codeType)
      Indicates if a type code corresponds to an xml schema built in type.
      Parameters:
      codeType - The type code to check.
      Returns:
      True if the given type code represents an XML schema built-in type.
    • isPrimitiveType

      public static boolean isPrimitiveType(int codeType)
      Tells if a type code corresponds to an xml schema (built-in) primitive type.
      Parameters:
      codeType - The type code to check.
      Returns:
      True if the given type code represents an XML schema built-in primitive type.
    • isNumericType

      public static boolean isNumericType(int codeType)
      Tells if a type code corresponds to an xml schema (built-in) numeric type.
      Parameters:
      codeType - The type code to check.
      Returns:
      True if the given type code represents an XML schema built-in numeric type.
    • isDateTimeType

      public static boolean isDateTimeType(int codeType)
      Tells if a type code corresponds to an xml schema (built-in) date/time type.
      Parameters:
      codeType - The type code to check.
      Returns:
      True if the given type code represents an XML schema built-in date/time type.
    • getBuiltInType

      public SimpleType getBuiltInType(String typeName)
      Gets an instance of a class derived from SimpleType representing the built in type which name is given as a parameter.
      Parameters:
      typeName - Name of the simple type.
      Returns:
      The SimpleType instance for the type name.
    • getBuiltInTypeName

      public String getBuiltInTypeName(int builtInTypeCode)
      Gets a built in type's name given its code.