Interface JaxbNamespacePrefixMapper

All Known Implementing Classes:
DefaultNamespacePrefixMapper

public interface JaxbNamespacePrefixMapper
A prefix mapper for namespaces to control namespaces during JAXB marshalling.
  • Method Details

    • getRegistrationKey

      String getRegistrationKey()
      JAXB requires the mapper to be registered as a property on the JAXBContext.
    • setNamespaces

      void setNamespaces(Map<String,String> namespaces)
      Sets the namespace prefix mapping.

      The key is the namespace, the value is the prefix to use.

      Parameters:
      namespaces - namespace mappings
    • getPreferredPrefix

      String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix)
      Used by JAXB to obtain the preferred prefix.