Package org.exolab.castor.xml.schema
Class SimpleTypesFactory
java.lang.Object
org.exolab.castor.xml.schema.SimpleTypesFactory
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$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Arnaud Berry
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
This code is for errors or uninitialized types.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Simple type defined by the user. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance ofSimpleTypesFactory
, loading type definition information from the relevant files. -
Method Summary
Modifier and TypeMethodDescriptiongetBuiltInType
(String typeName) Gets an instance of a class derived fromSimpleType
representing the built in type which name is given as a parameter.getBuiltInTypeName
(int builtInTypeCode) Gets a built in type's name given its code.static boolean
isBuiltInType
(int codeType) Indicates if a type code corresponds to an xml schema built in type.static boolean
isDateTimeType
(int codeType) Tells if a type code corresponds to an xml schema (built-in) date/time type.static boolean
isNumericType
(int codeType) Tells if a type code corresponds to an xml schema (built-in) numeric type.static boolean
isPrimitiveType
(int codeType) Tells if a type code corresponds to an xml schema (built-in) primitive type.
-
Field Details
-
INVALID_TYPE
public static final int INVALID_TYPEThis code is for errors or uninitialized types.- See Also:
-
USER_TYPE
public static final int USER_TYPESimple type defined by the user.- See Also:
-
STRING_TYPE
public static final int STRING_TYPE- See Also:
-
DURATION_TYPE
public static final int DURATION_TYPE- See Also:
-
DATETIME_TYPE
public static final int DATETIME_TYPE- See Also:
-
TIME_TYPE
public static final int TIME_TYPE- See Also:
-
DATE_TYPE
public static final int DATE_TYPE- See Also:
-
GYEARMONTH_TYPE
public static final int GYEARMONTH_TYPE- See Also:
-
GYEAR_TYPE
public static final int GYEAR_TYPE- See Also:
-
GMONTHDAY_TYPE
public static final int GMONTHDAY_TYPE- See Also:
-
GDAY_TYPE
public static final int GDAY_TYPE- See Also:
-
GMONTH_TYPE
public static final int GMONTH_TYPE- See Also:
-
BOOLEAN_TYPE
public static final int BOOLEAN_TYPE- See Also:
-
BASE64BINARY_TYPE
public static final int BASE64BINARY_TYPE- See Also:
-
HEXBINARY_TYPE
public static final int HEXBINARY_TYPE- See Also:
-
FLOAT_TYPE
public static final int FLOAT_TYPE- See Also:
-
DOUBLE_TYPE
public static final int DOUBLE_TYPE- See Also:
-
DECIMAL_TYPE
public static final int DECIMAL_TYPE- See Also:
-
ANYURI_TYPE
public static final int ANYURI_TYPE- See Also:
-
QNAME_TYPE
public static final int QNAME_TYPE- See Also:
-
NOTATION_TYPE
public static final int NOTATION_TYPE- See Also:
-
NORMALIZEDSTRING_TYPE
public static final int NORMALIZEDSTRING_TYPE- See Also:
-
TOKEN_TYPE
public static final int TOKEN_TYPE- See Also:
-
LANGUAGE_TYPE
public static final int LANGUAGE_TYPE- See Also:
-
NAME_TYPE
public static final int NAME_TYPE- See Also:
-
NCNAME_TYPE
public static final int NCNAME_TYPE- See Also:
-
ID_TYPE
public static final int ID_TYPE- See Also:
-
IDREF_TYPE
public static final int IDREF_TYPE- See Also:
-
IDREFS_TYPE
public static final int IDREFS_TYPE- See Also:
-
ENTITY_TYPE
public static final int ENTITY_TYPE- See Also:
-
ENTITIES_TYPE
public static final int ENTITIES_TYPE- See Also:
-
NMTOKEN_TYPE
public static final int NMTOKEN_TYPE- See Also:
-
NMTOKENS_TYPE
public static final int NMTOKENS_TYPE- See Also:
-
INTEGER_TYPE
public static final int INTEGER_TYPE- See Also:
-
NON_POSITIVE_INTEGER_TYPE
public static final int NON_POSITIVE_INTEGER_TYPE- See Also:
-
NEGATIVE_INTEGER_TYPE
public static final int NEGATIVE_INTEGER_TYPE- See Also:
-
LONG_TYPE
public static final int LONG_TYPE- See Also:
-
INT_TYPE
public static final int INT_TYPE- See Also:
-
SHORT_TYPE
public static final int SHORT_TYPE- See Also:
-
BYTE_TYPE
public static final int BYTE_TYPE- See Also:
-
NON_NEGATIVE_INTEGER_TYPE
public static final int NON_NEGATIVE_INTEGER_TYPE- See Also:
-
UNSIGNED_LONG_TYPE
public static final int UNSIGNED_LONG_TYPE- See Also:
-
UNSIGNED_INT_TYPE
public static final int UNSIGNED_INT_TYPE- See Also:
-
UNSIGNED_SHORT_TYPE
public static final int UNSIGNED_SHORT_TYPE- See Also:
-
UNSIGNED_BYTE_TYPE
public static final int UNSIGNED_BYTE_TYPE- See Also:
-
POSITIVE_INTEGER_TYPE
public static final int POSITIVE_INTEGER_TYPE- See Also:
-
ANYSIMPLETYPE_TYPE
public static final int ANYSIMPLETYPE_TYPE- See Also:
-
-
Constructor Details
-
SimpleTypesFactory
public SimpleTypesFactory()Creates an instance ofSimpleTypesFactory
, 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
Gets an instance of a class derived fromSimpleType
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
Gets a built in type's name given its code.
-