Class DefaultNamespacePrefixMapper
java.lang.Object
org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
org.apache.camel.converter.jaxb.mapper.DefaultNamespacePrefixMapper
- All Implemented Interfaces:
JaxbNamespacePrefixMapper
public class DefaultNamespacePrefixMapper
extends org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
implements JaxbNamespacePrefixMapper
A namespace prefix mapper which overrides SUN JAXB-RI to allow Camel to control the prefixes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPreferredPrefix
(String namespaceUri, String suggestion, boolean requirePrefix) Used by JAXB to obtain the preferred prefix.JAXB requires the mapper to be registered as a property on theJAXBContext
.void
setNamespaces
(Map<String, String> namespaces) Sets the namespace prefix mapping.Methods inherited from class org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
getContextualNamespaceDecls, getPreDeclaredNamespaceUris, getPreDeclaredNamespaceUris2
-
Constructor Details
-
DefaultNamespacePrefixMapper
public DefaultNamespacePrefixMapper()
-
-
Method Details
-
setNamespaces
Description copied from interface:JaxbNamespacePrefixMapper
Sets the namespace prefix mapping. The key is the namespace, the value is the prefix to use.- Specified by:
setNamespaces
in interfaceJaxbNamespacePrefixMapper
- Parameters:
namespaces
- namespace mappings
-
getRegistrationKey
Description copied from interface:JaxbNamespacePrefixMapper
JAXB requires the mapper to be registered as a property on theJAXBContext
.- Specified by:
getRegistrationKey
in interfaceJaxbNamespacePrefixMapper
-
getPreferredPrefix
Description copied from interface:JaxbNamespacePrefixMapper
Used by JAXB to obtain the preferred prefix.- Specified by:
getPreferredPrefix
in interfaceJaxbNamespacePrefixMapper
- Specified by:
getPreferredPrefix
in classorg.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
-