Public Member Functions | Static Public Member Functions | Static Public Attributes | Package Functions | Static Package Attributes

org.exolab.castor.xml.schema.SimpleTypesFactory Class Reference

List of all members.

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"

Detailed Description

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.

Author:
Arnaud Berry
Version:
Revision:
1.1.1.1
Date:
2003/03/03 07:09:35

Member Function Documentation

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.

Parameters:
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.
Returns:
the new SimpleType, or null if its parent could not be found.

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.

Parameters:
schema the owning schema
name the name of the SimpleType
baseType the base type
derivation the name of the derivation method (null/""/"list"/"restriction")
Returns:
the new SimpleType, or null if its parent could not be found.

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  ) 
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.


Member Data Documentation

This code is for errors or uninitialized types.

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 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


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties