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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeclaredByDefault(String prefix) clone()debugDump(int indent) static StringgetPreferredPrefix(String namespace) getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) voidregisterPrefix(String namespace, String prefix, boolean isDefaultNamespace) voidregisterPrefixLocal(String namespace, String prefix) voidsetDefaultNamespace(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, getPreDeclaredNamespaceUris2Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Constructor Details
-
GlobalDynamicNamespacePrefixMapper
public GlobalDynamicNamespacePrefixMapper()
-
-
Method Details
-
getDefaultNamespace
-
setDefaultNamespace
-
addDeclaredByDefault
- Specified by:
addDeclaredByDefaultin interfaceDynamicNamespacePrefixMapper
-
getNamespacesDeclaredByDefault
- Specified by:
getNamespacesDeclaredByDefaultin interfaceDynamicNamespacePrefixMapper
-
registerPrefix
- Specified by:
registerPrefixin interfaceDynamicNamespacePrefixMapper
-
registerPrefixLocal
- Specified by:
registerPrefixLocalin interfaceDynamicNamespacePrefixMapper
-
getPrefix
- Specified by:
getPrefixin interfaceDynamicNamespacePrefixMapper
-
setQNamePrefix
- Specified by:
setQNamePrefixin interfaceDynamicNamespacePrefixMapper
-
setQNamePrefixExplicit
Description copied from interface:DynamicNamespacePrefixMapperMakes sure that there is explicit prefix and not a default namespace prefix.- Specified by:
setQNamePrefixExplicitin interfaceDynamicNamespacePrefixMapper
-
getPreferredPrefix
- Specified by:
getPreferredPrefixin 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:
clonein interfaceDynamicNamespacePrefixMapper- Overrides:
clonein classObject
-
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable
-