org.codehaus.xfire.aegis.type
Class DefaultTypeMappingRegistry

java.lang.Object
  extended by org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry
All Implemented Interfaces:
TypeMappingRegistry

public class DefaultTypeMappingRegistry
extends java.lang.Object
implements TypeMappingRegistry

The default implementation of TypeMappingRegistry.

Since:
Feb 22, 2004
Author:
Dan Diephouse

Field Summary
protected static javax.xml.namespace.QName ENCODED_BASE64
           
protected static javax.xml.namespace.QName ENCODED_BOOLEAN
           
protected static javax.xml.namespace.QName ENCODED_CHAR
           
protected static javax.xml.namespace.QName ENCODED_DATETIME
           
protected static javax.xml.namespace.QName ENCODED_DECIMAL
           
protected static javax.xml.namespace.QName ENCODED_DOUBLE
           
protected static javax.xml.namespace.QName ENCODED_FLOAT
           
protected static javax.xml.namespace.QName ENCODED_INT
           
protected static javax.xml.namespace.QName ENCODED_INTEGER
           
protected static javax.xml.namespace.QName ENCODED_LONG
           
protected static java.lang.String ENCODED_NS
           
protected static javax.xml.namespace.QName ENCODED_SHORT
           
protected static javax.xml.namespace.QName ENCODED_STRING
           
protected static javax.xml.namespace.QName XSD_ANY
           
protected static javax.xml.namespace.QName XSD_BASE64
           
protected static javax.xml.namespace.QName XSD_BOOLEAN
           
protected static javax.xml.namespace.QName XSD_DATE
           
protected static javax.xml.namespace.QName XSD_DATETIME
           
protected static javax.xml.namespace.QName XSD_DECIMAL
           
protected static javax.xml.namespace.QName XSD_DOUBLE
           
protected static javax.xml.namespace.QName XSD_DURATION
           
protected static javax.xml.namespace.QName XSD_FLOAT
           
protected static javax.xml.namespace.QName XSD_G_DAY
           
protected static javax.xml.namespace.QName XSD_G_MONTH
           
protected static javax.xml.namespace.QName XSD_G_MONTH_DAY
           
protected static javax.xml.namespace.QName XSD_G_YEAR
           
protected static javax.xml.namespace.QName XSD_G_YEAR_MONTH
           
protected static javax.xml.namespace.QName XSD_INT
           
protected static javax.xml.namespace.QName XSD_INTEGER
           
protected static javax.xml.namespace.QName XSD_LONG
           
protected static javax.xml.namespace.QName XSD_SHORT
           
protected static javax.xml.namespace.QName XSD_STRING
           
protected static javax.xml.namespace.QName XSD_TIME
           
protected static javax.xml.namespace.QName XSD_URI
           
 
Fields inherited from interface org.codehaus.xfire.aegis.type.TypeMappingRegistry
ROLE
 
Constructor Summary
DefaultTypeMappingRegistry()
           
DefaultTypeMappingRegistry(boolean createDefault)
           
DefaultTypeMappingRegistry(TypeCreator typeCreator, boolean createDefault)
           
DefaultTypeMappingRegistry(TypeCreator typeCreator, boolean createDefault, Configuration config)
           
 
Method Summary
 void clear()
          Removes all registered TypeMappings and encodingStyleURIs from this TypeMappingRegistry.
 TypeMapping createDefaultMappings()
           
protected  void createDefaultMappings(TypeMapping tm)
           
protected  AbstractTypeCreator createDefaultTypeCreator()
           
protected  AbstractTypeCreator createRootTypeCreator()
           
protected  TypeCreator createTypeCreator()
           
 TypeMapping createTypeMapping(boolean autoTypes)
          Creates a new empty TypeMapping object.
 TypeMapping createTypeMapping(java.lang.String parentNamespace, boolean autoTypes)
          Create a type mapping with the specified encodying style.
protected  TypeMapping createTypeMapping(TypeMapping parent, boolean autoTypes)
           
 Configuration getConfiguration()
           
 TypeMapping getDefaultTypeMapping()
          Gets the registered default TypeMapping instance.
 java.lang.String[] getRegisteredEncodingStyleURIs()
          Returns a list of registered encodingStyle URIs in this TypeMappingRegistry instance.
 TypeCreator getTypeCreator()
           
 TypeMapping getTypeMapping(java.lang.String encodingStyleURI)
          Returns the registered TypeMapping for the specified encodingStyle URI.
 TypeMapping register(java.lang.String encodingStyleURI, TypeMapping mapping)
           
protected  void register(TypeMapping tm, java.lang.Class class1, javax.xml.namespace.QName name, Type type)
           
 void registerDefault(TypeMapping mapping)
           
protected  void registerIfAvailable(TypeMapping tm, java.lang.String className, javax.xml.namespace.QName typeName, java.lang.String typeClassName)
           
 boolean removeTypeMapping(TypeMapping mapping)
          Removes a TypeMapping from the TypeMappingRegistry.
 void setConfiguration(Configuration typeConfiguration)
           
 void setTypeCreator(TypeCreator typeCreator)
           
 TypeMapping unregisterTypeMapping(java.lang.String encodingStyleURI)
          Unregisters a TypeMapping instance, if present, from the specified encodingStyleURI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_STRING

protected static final javax.xml.namespace.QName XSD_STRING

XSD_LONG

protected static final javax.xml.namespace.QName XSD_LONG

XSD_FLOAT

protected static final javax.xml.namespace.QName XSD_FLOAT

XSD_DOUBLE

protected static final javax.xml.namespace.QName XSD_DOUBLE

XSD_INT

protected static final javax.xml.namespace.QName XSD_INT

XSD_SHORT

protected static final javax.xml.namespace.QName XSD_SHORT

XSD_BOOLEAN

protected static final javax.xml.namespace.QName XSD_BOOLEAN

XSD_DATETIME

protected static final javax.xml.namespace.QName XSD_DATETIME

XSD_TIME

protected static final javax.xml.namespace.QName XSD_TIME

XSD_BASE64

protected static final javax.xml.namespace.QName XSD_BASE64

XSD_DECIMAL

protected static final javax.xml.namespace.QName XSD_DECIMAL

XSD_INTEGER

protected static final javax.xml.namespace.QName XSD_INTEGER

XSD_URI

protected static final javax.xml.namespace.QName XSD_URI

XSD_ANY

protected static final javax.xml.namespace.QName XSD_ANY

XSD_DATE

protected static final javax.xml.namespace.QName XSD_DATE

XSD_DURATION

protected static final javax.xml.namespace.QName XSD_DURATION

XSD_G_YEAR_MONTH

protected static final javax.xml.namespace.QName XSD_G_YEAR_MONTH

XSD_G_MONTH_DAY

protected static final javax.xml.namespace.QName XSD_G_MONTH_DAY

XSD_G_YEAR

protected static final javax.xml.namespace.QName XSD_G_YEAR

XSD_G_MONTH

protected static final javax.xml.namespace.QName XSD_G_MONTH

XSD_G_DAY

protected static final javax.xml.namespace.QName XSD_G_DAY

ENCODED_NS

protected static final java.lang.String ENCODED_NS

ENCODED_STRING

protected static final javax.xml.namespace.QName ENCODED_STRING

ENCODED_LONG

protected static final javax.xml.namespace.QName ENCODED_LONG

ENCODED_FLOAT

protected static final javax.xml.namespace.QName ENCODED_FLOAT

ENCODED_CHAR

protected static final javax.xml.namespace.QName ENCODED_CHAR

ENCODED_DOUBLE

protected static final javax.xml.namespace.QName ENCODED_DOUBLE

ENCODED_INT

protected static final javax.xml.namespace.QName ENCODED_INT

ENCODED_SHORT

protected static final javax.xml.namespace.QName ENCODED_SHORT

ENCODED_BOOLEAN

protected static final javax.xml.namespace.QName ENCODED_BOOLEAN

ENCODED_DATETIME

protected static final javax.xml.namespace.QName ENCODED_DATETIME

ENCODED_BASE64

protected static final javax.xml.namespace.QName ENCODED_BASE64

ENCODED_DECIMAL

protected static final javax.xml.namespace.QName ENCODED_DECIMAL

ENCODED_INTEGER

protected static final javax.xml.namespace.QName ENCODED_INTEGER
Constructor Detail

DefaultTypeMappingRegistry

public DefaultTypeMappingRegistry()

DefaultTypeMappingRegistry

public DefaultTypeMappingRegistry(boolean createDefault)

DefaultTypeMappingRegistry

public DefaultTypeMappingRegistry(TypeCreator typeCreator,
                                  boolean createDefault,
                                  Configuration config)

DefaultTypeMappingRegistry

public DefaultTypeMappingRegistry(TypeCreator typeCreator,
                                  boolean createDefault)
Method Detail

register

public TypeMapping register(java.lang.String encodingStyleURI,
                            TypeMapping mapping)
Specified by:
register in interface TypeMappingRegistry

registerDefault

public void registerDefault(TypeMapping mapping)
Specified by:
registerDefault in interface TypeMappingRegistry

getDefaultTypeMapping

public TypeMapping getDefaultTypeMapping()
Description copied from interface: TypeMappingRegistry
Gets the registered default TypeMapping instance. This method returns null if there is no registered default TypeMapping in the registry.

Specified by:
getDefaultTypeMapping in interface TypeMappingRegistry
Returns:
The registered default TypeMapping instance or null.
See Also:
TypeMappingRegistry.getDefaultTypeMapping()

getRegisteredEncodingStyleURIs

public java.lang.String[] getRegisteredEncodingStyleURIs()
Description copied from interface: TypeMappingRegistry
Returns a list of registered encodingStyle URIs in this TypeMappingRegistry instance.

Specified by:
getRegisteredEncodingStyleURIs in interface TypeMappingRegistry
Returns:
Array of the registered encodingStyle URIs
See Also:
TypeMappingRegistry.getRegisteredEncodingStyleURIs()

getTypeMapping

public TypeMapping getTypeMapping(java.lang.String encodingStyleURI)
Description copied from interface: TypeMappingRegistry
Returns the registered TypeMapping for the specified encodingStyle URI. If there is no registered TypeMapping for the specified encodingStyleURI, this method returns null.

Specified by:
getTypeMapping in interface TypeMappingRegistry
Parameters:
encodingStyleURI - Encoding style specified as an URI
Returns:
TypeMapping for the specified encodingStyleURI or null
See Also:
TypeMappingRegistry.getTypeMapping(java.lang.String)

createTypeMapping

public TypeMapping createTypeMapping(boolean autoTypes)
Description copied from interface: TypeMappingRegistry
Creates a new empty TypeMapping object.

Specified by:
createTypeMapping in interface TypeMappingRegistry
Returns:
TypeMapping instance.
See Also:
TypeMappingRegistry.createTypeMapping(boolean)

createTypeMapping

public TypeMapping createTypeMapping(java.lang.String parentNamespace,
                                     boolean autoTypes)
Description copied from interface: TypeMappingRegistry
Create a type mapping with the specified encodying style.

Specified by:
createTypeMapping in interface TypeMappingRegistry
Parameters:
parentNamespace - Encoding style of the parent TypeMapping specified as an URI
autoTypes - Should this mapping auto-generate types where possible
Returns:
TypeMapping instance
See Also:
TypeMappingRegistry.createTypeMapping(String, boolean)

createTypeMapping

protected TypeMapping createTypeMapping(TypeMapping parent,
                                        boolean autoTypes)

getTypeCreator

public TypeCreator getTypeCreator()

setTypeCreator

public void setTypeCreator(TypeCreator typeCreator)

createTypeCreator

protected TypeCreator createTypeCreator()

createRootTypeCreator

protected AbstractTypeCreator createRootTypeCreator()

createDefaultTypeCreator

protected AbstractTypeCreator createDefaultTypeCreator()

unregisterTypeMapping

public TypeMapping unregisterTypeMapping(java.lang.String encodingStyleURI)
Description copied from interface: TypeMappingRegistry
Unregisters a TypeMapping instance, if present, from the specified encodingStyleURI.

Specified by:
unregisterTypeMapping in interface TypeMappingRegistry
Parameters:
encodingStyleURI - Encoding style specified as an URI
Returns:
TypeMapping instance that has been unregistered or null if there was no TypeMapping registered for the specified encodingStyleURI
See Also:
TypeMappingRegistry.unregisterTypeMapping(java.lang.String)

removeTypeMapping

public boolean removeTypeMapping(TypeMapping mapping)
Description copied from interface: TypeMappingRegistry
Removes a TypeMapping from the TypeMappingRegistry. A TypeMapping is associated with 1 or more encodingStyleURIs. This method unregisters the specified TypeMapping instance from all associated encodingStyleURIs and then removes this TypeMapping instance from the registry.

Specified by:
removeTypeMapping in interface TypeMappingRegistry
Parameters:
mapping - TypeMapping to remove
Returns:
true if specified TypeMapping is removed from the TypeMappingRegistry; false if the specified TypeMapping was not in the TypeMappingRegistry

clear

public void clear()
Description copied from interface: TypeMappingRegistry
Removes all registered TypeMappings and encodingStyleURIs from this TypeMappingRegistry.

Specified by:
clear in interface TypeMappingRegistry
See Also:
TypeMappingRegistry.clear()

createDefaultMappings

public TypeMapping createDefaultMappings()

createDefaultMappings

protected void createDefaultMappings(TypeMapping tm)

registerIfAvailable

protected void registerIfAvailable(TypeMapping tm,
                                   java.lang.String className,
                                   javax.xml.namespace.QName typeName,
                                   java.lang.String typeClassName)

register

protected void register(TypeMapping tm,
                        java.lang.Class class1,
                        javax.xml.namespace.QName name,
                        Type type)

getConfiguration

public Configuration getConfiguration()

setConfiguration

public void setConfiguration(Configuration typeConfiguration)


Copyright © 2004-2008. All Rights Reserved.