Apache CXF API

org.apache.cxf.aegis.type
Interface TypeMapping

All Known Implementing Classes:
DefaultTypeMapping

public interface TypeMapping

Abstraction for the map between Java types (represented as Type and Aegis types.


Method Summary
 String getMappingIdentifierURI()
          Each mapping has a URI that identifies it.
 AegisType getType(QName xmlType)
           
 AegisType getType(Type javaType)
           
 TypeCreator getTypeCreator()
           
 QName getTypeQName(Type clazz)
           
 boolean isRegistered(QName xmlType)
          Returns a flag indicating if this type mapping has a mapping for a particular XML Schema QName.
 boolean isRegistered(Type javaType)
          Returns a flag indicating if this type mapping has a mapping for a particular Java class.
 void register(AegisType type)
          Register a type that self-describes the schema type and the Java class.
 void register(Type javaType, QName xmlType, AegisType type)
          Register a type, manually specifying the java class, the schema type, and the Aegis type object that provides serialization, deserialization, and schema.
 void removeType(AegisType type)
           
 void setMappingIdentifierURI(String uri)
          This exists only to deal with an initialization order problem.
 

Method Detail

isRegistered

boolean isRegistered(Type javaType)
Returns a flag indicating if this type mapping has a mapping for a particular Java class.

Parameters:
javaType - the class.
Returns:
true if there is a mapping for the type.

isRegistered

boolean isRegistered(QName xmlType)
Returns a flag indicating if this type mapping has a mapping for a particular XML Schema QName.

Parameters:
xmlType - the QName.
Returns:
true if there is a mapping for the type.

register

void register(Type javaType,
              QName xmlType,
              AegisType type)
Register a type, manually specifying the java class, the schema type, and the Aegis type object that provides serialization, deserialization, and schema.

Parameters:
javaType - Java class.
xmlType - XML Schema type QName.
type - Aegis type object.

register

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

Parameters:
type - Aegis type object that

removeType

void removeType(AegisType type)

getType

AegisType getType(Type javaType)

getType

AegisType getType(QName xmlType)

getTypeQName

QName getTypeQName(Type clazz)

getTypeCreator

TypeCreator getTypeCreator()

getMappingIdentifierURI

String getMappingIdentifierURI()
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.

Returns:
the URI.

setMappingIdentifierURI

void setMappingIdentifierURI(String uri)
This exists only to deal with an initialization order problem.

Parameters:
uri -

Apache CXF API

Apache CXF