Module org.eclipse.persistence.core
Class NamespacePrefixMapper
java.lang.Object
org.eclipse.persistence.internal.oxm.NamespacePrefixMapper
- Direct Known Subclasses:
NamespacePrefixMapper
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
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Returns a string array of prefixes and namespace uris that are already available in this context.String[]
Returns a list of namespace uris that should be declared at the root of the xml document being marshalled.String[]
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)
-
Constructor Details
-
NamespacePrefixMapper
protected NamespacePrefixMapper()Default constructor.
-
-
Method Details
-
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. -
getPreDeclaredNamespaceUris
Returns a list of namespace uris that should be declared at the root of the xml document being marshalled. -
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. -
getPreferredPrefix
-