Class MapNamespacePrefixMapper
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.NamespacePrefixMapper
-
- org.eclipse.persistence.oxm.NamespacePrefixMapper
-
- org.eclipse.persistence.internal.oxm.record.namespaces.MapNamespacePrefixMapper
-
public class MapNamespacePrefixMapper extends NamespacePrefixMapper
Implementation of NamespacePrefixMapper. Allows user to set aMap<String, String>
or uris to prefixes for to be used during marshal/unmarshal.- Since:
- 2.3.3
-
-
Constructor Summary
Constructors Constructor Description MapNamespacePrefixMapper(Map<String,String> urisToPrefixes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getPreDeclaredNamespaceUris()
Returns a list of namespace uris that should be declared at the root of the xml document being marshalled.String
getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix)
-
Methods inherited from class org.eclipse.persistence.oxm.NamespacePrefixMapper
supportsMediaType
-
Methods inherited from class org.eclipse.persistence.internal.oxm.NamespacePrefixMapper
getContextualNamespaceDecls, getPreDeclaredNamespaceUris2
-
-
-
-
Method Detail
-
getPreferredPrefix
public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix)
- Specified by:
getPreferredPrefix
in classNamespacePrefixMapper
-
getPreDeclaredNamespaceUris
public String[] getPreDeclaredNamespaceUris()
Description copied from class:NamespacePrefixMapper
Returns a list of namespace uris that should be declared at the root of the xml document being marshalled.- Overrides:
getPreDeclaredNamespaceUris
in classNamespacePrefixMapper
-
-