Public Member Functions | |
SimpleType | getBuiltInType (String typeName) |
String | getBuiltInTypeName (int builtInTypeCode) |
Static Public Member Functions | |
static boolean | isBuiltInType (int codeType) |
static boolean | isPrimitiveType (int codeType) |
Static Public Attributes | |
static final int | INVALID_TYPE = -1 |
static final int | USER_TYPE = 0 |
static final int | STRING_TYPE = 1 |
static final int | DURATION_TYPE = 2 |
static final int | DATETIME_TYPE = 3 |
static final int | TIME_TYPE = 4 |
static final int | DATE_TYPE = 5 |
static final int | GYEARMONTH_TYPE = 6 |
static final int | GYEAR_TYPE = 7 |
static final int | GMONTHDAY_TYPE = 8 |
static final int | GDAY_TYPE = 9 |
static final int | GMONTH_TYPE = 10 |
static final int | BOOLEAN_TYPE = 11 |
static final int | BASE64BINARY_TYPE = 12 |
static final int | HEXBINARY_TYPE = 13 |
static final int | FLOAT_TYPE = 14 |
static final int | DOUBLE_TYPE = 15 |
static final int | DECIMAL_TYPE = 16 |
static final int | ANYURI_TYPE = 17 |
static final int | QNAME_TYPE = 18 |
static final int | NOTATION_TYPE = 19 |
static final int | NORMALIZEDSTRING_TYPE = 20 |
static final int | TOKEN_TYPE = 21 |
static final int | LANGUAGE_TYPE = 22 |
static final int | NAME_TYPE = 23 |
static final int | NCNAME_TYPE = 24 |
static final int | ID_TYPE = 25 |
static final int | IDREF_TYPE = 26 |
static final int | IDREFS_TYPE = 27 |
static final int | ENTITY_TYPE = 28 |
static final int | ENTITIES_TYPE = 29 |
static final int | NMTOKEN_TYPE = 30 |
static final int | NMTOKENS_TYPE = 31 |
static final int | INTEGER_TYPE = 32 |
static final int | NON_POSITIVE_INTEGER_TYPE = 33 |
static final int | NEGATIVE_INTEGER_TYPE = 34 |
static final int | LONG_TYPE = 35 |
static final int | INT_TYPE = 36 |
static final int | SHORT_TYPE = 37 |
static final int | BYTE_TYPE = 38 |
static final int | NON_NEGATIVE_INTEGER_TYPE = 39 |
static final int | UNSIGNED_LONG_TYPE = 40 |
static final int | UNSIGNED_INT_TYPE = 41 |
static final int | UNSIGNED_SHORT_TYPE = 42 |
static final int | UNSIGNED_BYTE_TYPE = 43 |
static final int | POSITIVE_INTEGER_TYPE = 44 |
static final int | ANYSIMPLETYPE_TYPE = 100 |
Package Functions | |
SimpleType | createUserSimpleType (Schema schema, String name, String baseName, String derivation, boolean createDeferredSimpleType) |
SimpleType | createUserSimpleType (Schema schema, String name, SimpleType baseType, String derivation) |
Static Package Attributes | |
static final String | RESOURCE_LOCATION = "/org/exolab/castor/util/resources/" |
static final String | TYPE_MAPPINGS = "SimpleTypesMapping.properties" |
static final String | TYPE_DEFINITIONS = "SimpleTypes.properties" |
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.
SimpleType org.exolab.castor.xml.schema.SimpleTypesFactory.createUserSimpleType | ( | Schema | schema, | |
String | name, | |||
String | baseName, | |||
String | derivation, | |||
boolean | createDeferredSimpleType | |||
) | [package] |
Creates an instance of a class derived from SimpleType, representing the user type defined by the given name, baseName and derivation method.
Package private (used by Schema and DeferredSimpleType).
The given schema is used as the owning Schema document, yet a call to schema.addSimpleType must till be made to add the SimpleType to the Schema.
If the base type is not found in the schema, a DeferredSimpleType will be returned if createDeferredSimpleType is true, null otherwise.
schema | the owning schema | |
name | the name of the SimpleType | |
baseName | the name of the SimpleType's base type | |
derivation | the name of the derivation method (null/""/"list"/"restriction") | |
createDeferredSimpleType | should the type be deferred if it can't be created. |
References org.exolab.castor.xml.schema.Schema.getSimpleType(), org.exolab.castor.xml.schema.DeferredSimpleType.setBaseTypeName(), org.exolab.castor.xml.schema.XMLType.setDerivationMethod(), org.exolab.castor.xml.schema.XMLType.setName(), org.exolab.castor.xml.schema.XMLType.setSchema(), org.exolab.castor.xml.schema.SimpleType.setTypeCode(), and org.exolab.castor.xml.schema.SimpleTypesFactory.USER_TYPE.
Referenced by org.exolab.castor.xml.schema.Schema.createSimpleType().
SimpleType org.exolab.castor.xml.schema.SimpleTypesFactory.createUserSimpleType | ( | Schema | schema, | |
String | name, | |||
SimpleType | baseType, | |||
String | derivation | |||
) | [package] |
Creates an instance of a class derived from SimpleType, representing the user type defined by the given name, baseName and derivation method.
Package private (used by Schema and DeferredSimpleType).
The given schema is used as the owning Schema document, yet a call to schema.addSimpleType must still be made to add the SimpleType to the Schema if the SimpleType is not anonymous.
If the base type is not found in the schema, a DeferredSimpleType will be returned if createDeferredSimpleType is true, null otherwise.
schema | the owning schema | |
name | the name of the SimpleType | |
baseType | the base type | |
derivation | the name of the derivation method (null/""/"list"/"restriction") |
References org.exolab.castor.xml.schema.SimpleType.getBuiltInBaseType(), org.exolab.castor.xml.schema.XMLType.getName(), org.exolab.castor.xml.schema.XMLType.setBaseType(), org.exolab.castor.xml.schema.XMLType.setDerivationMethod(), org.exolab.castor.xml.schema.XMLType.setName(), org.exolab.castor.xml.schema.XMLType.setSchema(), org.exolab.castor.xml.schema.SimpleType.setTypeCode(), and org.exolab.castor.xml.schema.SimpleTypesFactory.USER_TYPE.
SimpleType org.exolab.castor.xml.schema.SimpleTypesFactory.getBuiltInType | ( | String | typeName | ) |
Gets an instance of a class derived from SimpleType representing the built in type which name is given as a parameter.
References org.exolab.castor.xml.schema.simpletypes.factory.Type.getSimpleType().
Referenced by org.exolab.castor.xml.schema.Schema.getSimpleType().
String org.exolab.castor.xml.schema.SimpleTypesFactory.getBuiltInTypeName | ( | int | builtInTypeCode | ) |
Gets a built in type's name given its code.
References org.exolab.castor.xml.schema.simpletypes.factory.Type.getName().
Referenced by org.exolab.castor.xml.schema.Schema.getBuiltInTypeName().
static boolean org.exolab.castor.xml.schema.SimpleTypesFactory.isBuiltInType | ( | int | codeType | ) | [static] |
Tells if a type code corresponds to an xml schema built in type
References org.exolab.castor.xml.schema.SimpleTypesFactory.USER_TYPE.
static boolean org.exolab.castor.xml.schema.SimpleTypesFactory.isPrimitiveType | ( | int | codeType | ) | [static] |
Tells if a type code corresponds to an xml schema (built in) primitive type
References org.exolab.castor.xml.schema.SimpleTypesFactory.NOTATION_TYPE, and org.exolab.castor.xml.schema.SimpleTypesFactory.STRING_TYPE.
final int org.exolab.castor.xml.schema.SimpleTypesFactory.ANYSIMPLETYPE_TYPE = 100 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.ANYURI_TYPE = 17 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.BASE64BINARY_TYPE = 12 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.BOOLEAN_TYPE = 11 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.BYTE_TYPE = 38 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.DATE_TYPE = 5 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.DATETIME_TYPE = 3 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.DECIMAL_TYPE = 16 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.DOUBLE_TYPE = 15 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.DURATION_TYPE = 2 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.ENTITIES_TYPE = 29 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.ENTITY_TYPE = 28 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.FLOAT_TYPE = 14 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.GDAY_TYPE = 9 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.GMONTH_TYPE = 10 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.GMONTHDAY_TYPE = 8 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.GYEAR_TYPE = 7 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.GYEARMONTH_TYPE = 6 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.HEXBINARY_TYPE = 13 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.ID_TYPE = 25 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.IDREF_TYPE = 26 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.IDREFS_TYPE = 27 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.INT_TYPE = 36 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.INTEGER_TYPE = 32 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.INVALID_TYPE = -1 [static] |
This code is for errors or uninitialized types.
final int org.exolab.castor.xml.schema.SimpleTypesFactory.LANGUAGE_TYPE = 22 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.LONG_TYPE = 35 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NAME_TYPE = 23 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NCNAME_TYPE = 24 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NEGATIVE_INTEGER_TYPE = 34 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NMTOKEN_TYPE = 30 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NMTOKENS_TYPE = 31 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NON_NEGATIVE_INTEGER_TYPE = 39 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NON_POSITIVE_INTEGER_TYPE = 33 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NORMALIZEDSTRING_TYPE = 20 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.NOTATION_TYPE = 19 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.POSITIVE_INTEGER_TYPE = 44 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.QNAME_TYPE = 18 [static] |
final String org.exolab.castor.xml.schema.SimpleTypesFactory.RESOURCE_LOCATION = "/org/exolab/castor/util/resources/" [static, package] |
The resource location for the built-in types property files
final int org.exolab.castor.xml.schema.SimpleTypesFactory.SHORT_TYPE = 37 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.STRING_TYPE = 1 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.TIME_TYPE = 4 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.TOKEN_TYPE = 21 [static] |
final String org.exolab.castor.xml.schema.SimpleTypesFactory.TYPE_DEFINITIONS = "SimpleTypes.properties" [static, package] |
The resource for the Simple types
final String org.exolab.castor.xml.schema.SimpleTypesFactory.TYPE_MAPPINGS = "SimpleTypesMapping.properties" [static, package] |
The resource for the mapping properties
final int org.exolab.castor.xml.schema.SimpleTypesFactory.UNSIGNED_BYTE_TYPE = 43 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.UNSIGNED_INT_TYPE = 41 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.UNSIGNED_LONG_TYPE = 40 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.UNSIGNED_SHORT_TYPE = 42 [static] |
final int org.exolab.castor.xml.schema.SimpleTypesFactory.USER_TYPE = 0 [static] |
Simple type defined by the user
Referenced by org.exolab.castor.xml.schema.SimpleTypesFactory.createUserSimpleType(), and org.exolab.castor.xml.schema.SimpleTypesFactory.isBuiltInType().