Package com.evolveum.midpoint.util
Class QNameUtil
java.lang.Object
com.evolveum.midpoint.util.QNameUtil
QName <-> URI conversion.
Very simplistic but better than nothing.
- Author:
- semancik
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontains(Collection<? extends QName> col, QName qname) static booleanstatic Collection<QName>createCollection(QName... qnames) static StringescapeElementName(String name) static <K extends QName,V>
VgetByQName(@NotNull Map<K, V> map, K key) Finds value in the map by QName key usingmatch(QName, QName).static StringgetLocalPart(QName name) static booleanhasNamespace(@NotNull QName name) static booleanisPrefixUndeclared(String namespacePrefix) static booleanisQualified(QName name) static booleanstatic booleanisUnqualified(String uri) static booleanisUnqualified(QName name) static booleanstatic booleanisUriQName(@NotNull String maybeUri) static StringmarkPrefixAsUndeclared(String namespacePrefix) static booleanMatching with considering wildcard namespace (null).static booleanstatic booleanmatchAny(QName nameToFind, Collection<? extends QName> names) static booleanstatic booleanstatic booleanmatchWithUri(QName qname, String uri) Matches QName with a URI representation.static booleannoNamespace(@NotNull QName name) static QNamenullNamespace(QName qname) static QNameUtil.PrefixedNameparsePrefixedName(String name) static StringprettyPrint(QName... qnames) static QNameUtil.QNameInfoqnameToQnameInfo(QName name) static StringqNameToUri(QName qname) static StringqNameToUri(QName qname, boolean unqualifiedStartsWithHash) static StringqNameToUri(QName qname, boolean unqualifiedStartsWithHash, char separatorChar) static QNamequalifyIfNeeded(QName name, String defaultNamespace) static booleanremove(Collection<? extends QName> col, QName qname) static voidreportUndeclaredNamespacePrefix(String prefix, String context) static QNameresolveNs(QName a, Collection<QName> col) static voidstatic voidsetTolerateUndeclaredPrefixes(boolean value) static booleanstatic QNamestatic @NotNull QNameuriToQName(@NotNull String uri, boolean allowUnqualified) static QNameuriToQName(String uri) static @NotNull QNameuriToQName(String uri, String defaultNamespace) static @NotNull QNameUtil.QNameInfouriToQNameInfo(@NotNull String uri, boolean allowUnqualified)
-
Field Details
-
LOGGER
-
DEFAULT_QNAME_URI_SEPARATOR_CHAR
public static final char DEFAULT_QNAME_URI_SEPARATOR_CHAR- See Also:
-
-
Constructor Details
-
QNameUtil
public QNameUtil()
-
-
Method Details
-
qNameToUri
-
qNameToUri
-
qNameToUri
-
uriToQName
-
noNamespace
-
hasNamespace
-
unqualify
-
qualifyIfNeeded
-
getByQName
Finds value in the map by QName key usingmatch(QName, QName). Fails if multiple matches are found. Returnsnullif no match is found. !!! EXPECTS THAT THE MAP CONTAINS QUALIFIED NAMES (if querying by qualified key) !!! -
matchUri
-
parsePrefixedName
-
qnameToQnameInfo
-
uriToQName
-
isUriQName
-
uriToQName
-
uriToQNameInfo
@NotNull public static @NotNull QNameUtil.QNameInfo uriToQNameInfo(@NotNull @NotNull String uri, boolean allowUnqualified) -
matches
-
match
Matching with considering wildcard namespace (null). -
match
-
unorderedCollectionMatch
-
matchWithUri
Matches QName with a URI representation. The URL may in fact be just the local part. -
resolveNs
-
matchAny
-
createCollection
-
nullNamespace
-
isUnqualified
-
isQualified
-
isUnqualified
-
isTolerateUndeclaredPrefixes
public static boolean isTolerateUndeclaredPrefixes() -
setTolerateUndeclaredPrefixes
public static void setTolerateUndeclaredPrefixes(boolean value) -
setTemporarilyTolerateUndeclaredPrefixes
-
reportUndeclaredNamespacePrefix
-
markPrefixAsUndeclared
-
isPrefixUndeclared
-
isUri
-
getLocalPart
-
contains
-
contains
-
remove
-
escapeElementName
-
prettyPrint
-