Package org.apache.cxf.aegis.type
Class DefaultTypeMapping
java.lang.Object
org.apache.cxf.aegis.type.DefaultTypeMapping
- All Implemented Interfaces:
TypeMapping
The implementation of the Aegis type map. It maintains a map from
Java types
Type and AegisType objects,
also indexed by the XML Schema QName of each type.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTypeMapping(String identifierURI) DefaultTypeMapping(String identifierURI, TypeMapping defaultTM) -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultTypeMappingcreateDefaultTypeMapping(boolean defaultNillable, boolean enableMtomXmime) static DefaultTypeMappingcreateDefaultTypeMapping(boolean defaultNillable, boolean enableMtomXmime, boolean enableJDOM) Create a set of default type mappings.static DefaultTypeMappingcreateSoap11TypeMapping(boolean defaultNillable, boolean enableMtomXmime, boolean enableJDOM) Create a type mapping object with a stock set of mappings, including the SOAP 1.1 'encoded' types.Each mapping has a URI that identifies it.getTypeQName(Type clazz) booleanisRegistered(Type javaType) Returns a flag indicating if this type mapping has a mapping for a particular Java class.booleanisRegistered(QName xmlType) Returns a flag indicating if this type mapping has a mapping for a particular XML Schema QName.voidRegister a type, manually specifying the java class, the schema type, and the Aegis type object that provides serialization, deserialization, and schema.voidRegister a type that self-describes the schema type and the Java class.voidremoveType(AegisType type) voidThis exists only to deal with an initialization order problem.voidsetTypeCreator(TypeCreator typeCreator)
-
Field Details
-
DEFAULT_MAPPING_URI
- See Also:
-
-
Constructor Details
-
DefaultTypeMapping
-
DefaultTypeMapping
public DefaultTypeMapping() -
DefaultTypeMapping
-
-
Method Details
-
isRegistered
Description copied from interface:TypeMappingReturns a flag indicating if this type mapping has a mapping for a particular Java class.- Specified by:
isRegisteredin interfaceTypeMapping- Parameters:
javaType- the class.- Returns:
trueif there is a mapping for the type.
-
isRegistered
Description copied from interface:TypeMappingReturns a flag indicating if this type mapping has a mapping for a particular XML Schema QName.- Specified by:
isRegisteredin interfaceTypeMapping- Parameters:
xmlType- the QName.- Returns:
trueif there is a mapping for the type.
-
register
Description copied from interface:TypeMappingRegister a type, manually specifying the java class, the schema type, and the Aegis type object that provides serialization, deserialization, and schema.- Specified by:
registerin interfaceTypeMapping- Parameters:
javaType- Java class.xmlType- XML Schema type QName.type- Aegis type object.
-
register
Register a type that self-describes the schema type and the Java class.- Specified by:
registerin interfaceTypeMapping- Parameters:
type- Aegis type object that
-
removeType
- Specified by:
removeTypein interfaceTypeMapping
-
getType
- Specified by:
getTypein interfaceTypeMapping
-
getType
- Specified by:
getTypein interfaceTypeMapping
-
getTypeQName
- Specified by:
getTypeQNamein interfaceTypeMapping
-
getTypeCreator
- Specified by:
getTypeCreatorin interfaceTypeMapping
-
setTypeCreator
-
getParent
-
createSoap11TypeMapping
public static DefaultTypeMapping createSoap11TypeMapping(boolean defaultNillable, boolean enableMtomXmime, boolean enableJDOM) Create a type mapping object with a stock set of mappings, including the SOAP 1.1 'encoded' types.- Parameters:
defaultNillable- whether elements are nillable by default.enableMtomXmime- whether to enable XMIME annotations with MTOM.enableJDOM- whether to add mappings for JDOM.- Returns:
-
createDefaultTypeMapping
public static DefaultTypeMapping createDefaultTypeMapping(boolean defaultNillable, boolean enableMtomXmime) -
createDefaultTypeMapping
public static DefaultTypeMapping createDefaultTypeMapping(boolean defaultNillable, boolean enableMtomXmime, boolean enableJDOM) Create a set of default type mappings.- Parameters:
defaultNillable- whether elements are nillable by default.enableMtomXmime- whether to enable XMIME annotations on MTOM.enableJDOM- whether to map JDOM types.- Returns:
-
getMappingIdentifierURI
Description copied from interface:TypeMappingEach 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:
getMappingIdentifierURIin interfaceTypeMapping- Returns:
- the URI.
-
setMappingIdentifierURI
Description copied from interface:TypeMappingThis exists only to deal with an initialization order problem.- Specified by:
setMappingIdentifierURIin interfaceTypeMapping
-