Top Description Constructors Methods
org.eclipse.persistence.internal.oxm

public abstract Class NamespacePrefixMapper

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.oxm.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

AccessConstructor and Description
protected
NamespacePrefixMapper()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public String[]
getContextualNamespaceDecls()

Returns a string array of prefixes and namespace uris that are already available in this context.

public String[]
getPreDeclaredNamespaceUris()

Returns a list of namespace uris that should be declared at the root of the xml document being marshalled.

public String[]
getPreDeclaredNamespaceUris2()

Returns a string array of prefixes and namespace uris to be declared at the root of the document.

public abstract String
getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NamespacePrefixMapperback to summary
protected NamespacePrefixMapper()

Default constructor.

Method Detail

getContextualNamespaceDeclsback to summary
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.

getPreDeclaredNamespaceUrisback to summary
public String[] getPreDeclaredNamespaceUris()

Returns a list of namespace uris that should be declared at the root of the xml document being marshalled.

getPreDeclaredNamespaceUris2back to summary
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.

getPreferredPrefixback to summary
public abstract String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix)