Class NamespacePrefixMapper
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.NamespacePrefixMapper
-
- Direct Known Subclasses:
NamespacePrefixMapper
public abstract class NamespacePrefixMapper extends Object
Purpose:Provides a means to customise the namespace prefixes used while marshalling An implementation of this class can be set on an instance of XMLMarshaller to allow for each instance of XMLMarshaller to use different namespace prefixes.
-
-
Constructor Summary
Constructors Constructor Description NamespacePrefixMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String[]
getContextualNamespaceDecls()
Returns a string array of prefixes and namespace uris that are already available in this context.String[]
getPreDeclaredNamespaceUris()
Returns a list of namespace uris that should be declared at the root of the xml document being marshalled.String[]
getPreDeclaredNamespaceUris2()
Returns a string array of prefixes and namespace uris to be declared at the root of the document.abstract String
getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix)
-
-
-
Method Detail
-
getContextualNamespaceDecls
public String[] getContextualNamespaceDecls()
Returns a string array of prefixes and namespace uris that are already available in this context. Only required when marshalling to an output stream or a writer, since it's not possible to determine which namespaces are already in scope.- Returns:
-
getPreDeclaredNamespaceUris
public String[] getPreDeclaredNamespaceUris()
Returns a list of namespace uris that should be declared at the root of the xml document being marshalled.
-
getPreDeclaredNamespaceUris2
public String[] getPreDeclaredNamespaceUris2()
Returns a string array of prefixes and namespace uris to be declared at the root of the document. This eliminates the need of implementing both getPredeclaredNamespaceUris and getPreferredPrefix since the prefix and uri can be associated here.- Returns:
-
-