org.apache.cxf.aegis.type
Class DefaultTypeMapping

java.lang.Object
  extended by org.apache.cxf.aegis.type.DefaultTypeMapping
All Implemented Interfaces:
TypeMapping

public class DefaultTypeMapping
extends java.lang.Object
implements TypeMapping

Contains type mappings for java/qname pairs.


Field Summary
static java.lang.String DEFAULT_MAPPING_URI
           
 
Constructor Summary
DefaultTypeMapping()
           
DefaultTypeMapping(java.lang.String identifierURI)
           
DefaultTypeMapping(java.lang.String identifierURI, TypeMapping defaultTM)
           
 
Method Summary
static DefaultTypeMapping createDefaultTypeMapping(boolean defaultNillable, boolean enableMtomXmime)
           
static DefaultTypeMapping createSoap11TypeMapping(boolean defaultNillable, boolean enableMtomXmime)
           
 java.lang.String getMappingIdentifierURI()
          Each mapping has a URI that identifies it.
 TypeMapping getParent()
           
 Type getType(java.lang.Class javaType)
           
 Type getType(javax.xml.namespace.QName xmlType)
           
 TypeCreator getTypeCreator()
           
 javax.xml.namespace.QName getTypeQName(java.lang.Class clazz)
           
 boolean isRegistered(java.lang.Class javaType)
          Returns a flag indicating if this type mapping has a mapping for a particular Java class.
 boolean isRegistered(javax.xml.namespace.QName xmlType)
          Returns a flag indicating if this type mapping has a mapping for a particular XML Schema QName.
 void register(java.lang.Class javaType, javax.xml.namespace.QName xmlType, Type type)
          Register a type, manually specifying the java class, the schema type, and the Aegis type object that provides serialization, deserialization, and schema.
 void register(Type type)
          Register a type that self-describes the schema type and the Java class.
 void removeType(Type type)
           
 void setMappingIdentifierURI(java.lang.String uri)
          This exists only to deal with an initialization order problem.
 void setTypeCreator(TypeCreator typeCreator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAPPING_URI

public static final java.lang.String DEFAULT_MAPPING_URI
See Also:
Constant Field Values
Constructor Detail

DefaultTypeMapping

public DefaultTypeMapping(java.lang.String identifierURI,
                          TypeMapping defaultTM)

DefaultTypeMapping

public DefaultTypeMapping()

DefaultTypeMapping

public DefaultTypeMapping(java.lang.String identifierURI)
Method Detail

isRegistered

public boolean isRegistered(java.lang.Class javaType)
Description copied from interface: TypeMapping
Returns a flag indicating if this type mapping has a mapping for a particular Java class.

Specified by:
isRegistered in interface TypeMapping
Parameters:
javaType - the class.
Returns:
true if there is a mapping for the type.

isRegistered

public boolean isRegistered(javax.xml.namespace.QName xmlType)
Description copied from interface: TypeMapping
Returns a flag indicating if this type mapping has a mapping for a particular XML Schema QName.

Specified by:
isRegistered in interface TypeMapping
Parameters:
xmlType - the QName.
Returns:
true if there is a mapping for the type.

register

public void register(java.lang.Class javaType,
                     javax.xml.namespace.QName xmlType,
                     Type type)
Description copied from interface: TypeMapping
Register a type, manually specifying the java class, the schema type, and the Aegis type object that provides serialization, deserialization, and schema.

Specified by:
register in interface TypeMapping
Parameters:
javaType - Java class.
xmlType - XML Schema type QName.
type - Aegis type object.

register

public void register(Type type)
Register a type that self-describes the schema type and the Java class.

Specified by:
register in interface TypeMapping
Parameters:
type - Aegis type object that

removeType

public void removeType(Type type)
Specified by:
removeType in interface TypeMapping

getType

public Type getType(java.lang.Class javaType)
Specified by:
getType in interface TypeMapping
See Also:
TypeMapping.getType(java.lang.Class)

getType

public Type getType(javax.xml.namespace.QName xmlType)
Specified by:
getType in interface TypeMapping
See Also:
TypeMapping.getType(javax.xml.namespace.QName)

getTypeQName

public javax.xml.namespace.QName getTypeQName(java.lang.Class clazz)
Specified by:
getTypeQName in interface TypeMapping
See Also:
TypeMapping.getTypeQName(java.lang.Class)

getTypeCreator

public TypeCreator getTypeCreator()
Specified by:
getTypeCreator in interface TypeMapping

setTypeCreator

public void setTypeCreator(TypeCreator typeCreator)

getParent

public TypeMapping getParent()

createSoap11TypeMapping

public static DefaultTypeMapping createSoap11TypeMapping(boolean defaultNillable,
                                                         boolean enableMtomXmime)

createDefaultTypeMapping

public static DefaultTypeMapping createDefaultTypeMapping(boolean defaultNillable,
                                                          boolean enableMtomXmime)

getMappingIdentifierURI

public java.lang.String getMappingIdentifierURI()
Description copied from interface: TypeMapping
Each mapping has a URI that identifies it. The mapping for a service uses the service URI. XML files can choose to only contribute mappings that match.

Specified by:
getMappingIdentifierURI in interface TypeMapping
Returns:
the URI.

setMappingIdentifierURI

public void setMappingIdentifierURI(java.lang.String uri)
Description copied from interface: TypeMapping
This exists only to deal with an initialization order problem.

Specified by:
setMappingIdentifierURI in interface TypeMapping


Apache CXF