Class GlobalDynamicNamespacePrefixMapper
java.lang.Object
org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
com.evolveum.midpoint.prism.impl.xml.GlobalDynamicNamespacePrefixMapper
- All Implemented Interfaces:
DynamicNamespacePrefixMapper
,DebugDumpable
public class GlobalDynamicNamespacePrefixMapper
extends org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
implements DynamicNamespacePrefixMapper, DebugDumpable
Maps namespaces to preferred prefixes. Should be used through the code to
avoid generation of prefixes.
Although this is usually used as singleton (static), it can also be instantiated to locally
override some namespace mappings. This is useful for prefixes like "tns" (schema) or "ri" (resource schema).
- Author:
- Igor Farinic, Radovan Semancik
- See Also:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDeclaredByDefault
(String prefix) clone()
boolean
containsPrefix
(String prefix) debugDump
(int indent) static String
getPreferredPrefix
(String namespace) getPreferredPrefix
(String namespaceUri, String suggestion, boolean requirePrefix) void
registerPrefix
(String namespace, String prefix, boolean isDefaultNamespace) static void
registerPrefixGlobal
(String namespace, String prefix) void
registerPrefixLocal
(String namespace, String prefix) void
setDefaultNamespace
(String defaultNamespace) setQNamePrefix
(QName qname) setQNamePrefixExplicit
(QName qname) Makes sure that there is explicit prefix and not a default namespace prefix.Methods inherited from class org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
getContextualNamespaceDecls, getPreDeclaredNamespaceUris, getPreDeclaredNamespaceUris2
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Constructor Details
-
GlobalDynamicNamespacePrefixMapper
public GlobalDynamicNamespacePrefixMapper()
-
-
Method Details
-
getDefaultNamespace
-
setDefaultNamespace
-
addDeclaredByDefault
- Specified by:
addDeclaredByDefault
in interfaceDynamicNamespacePrefixMapper
-
getNamespacesDeclaredByDefault
- Specified by:
getNamespacesDeclaredByDefault
in interfaceDynamicNamespacePrefixMapper
-
registerPrefix
- Specified by:
registerPrefix
in interfaceDynamicNamespacePrefixMapper
-
registerPrefixGlobal
-
registerPrefixLocal
- Specified by:
registerPrefixLocal
in interfaceDynamicNamespacePrefixMapper
-
getPrefix
- Specified by:
getPrefix
in interfaceDynamicNamespacePrefixMapper
-
setQNamePrefix
- Specified by:
setQNamePrefix
in interfaceDynamicNamespacePrefixMapper
-
setQNamePrefixExplicit
Description copied from interface:DynamicNamespacePrefixMapper
Makes sure that there is explicit prefix and not a default namespace prefix.- Specified by:
setQNamePrefixExplicit
in interfaceDynamicNamespacePrefixMapper
-
getPreferredPrefix
- Specified by:
getPreferredPrefix
in classorg.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
-
getPreferredPrefix
- Returns:
- preferred prefix for the namespace, if no prefix is assigned yet, then it will assign a prefix and return it.
-
clone
- Specified by:
clone
in interfaceDynamicNamespacePrefixMapper
- Overrides:
clone
in classObject
-
containsPrefix
- Specified by:
containsPrefix
in interfaceDynamicNamespacePrefixMapper
-
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-