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
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
contains
(Collection<? extends QName> col, QName qname) static boolean
static Collection<QName>
createCollection
(QName... qnames) static String
escapeElementName
(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 String
getLocalPart
(QName name) static boolean
hasNamespace
(@NotNull QName name) static boolean
isPrefixUndeclared
(String namespacePrefix) static boolean
isQualified
(QName name) static boolean
static boolean
isUnqualified
(String uri) static boolean
isUnqualified
(QName name) static boolean
static boolean
isUriQName
(@NotNull String maybeUri) static String
markPrefixAsUndeclared
(String namespacePrefix) static boolean
Matching with considering wildcard namespace (null).static boolean
static boolean
matchAny
(QName nameToFind, Collection<? extends QName> names) static boolean
static boolean
static boolean
matchWithUri
(QName qname, String uri) Matches QName with a URI representation.static boolean
noNamespace
(@NotNull QName name) static QName
nullNamespace
(QName qname) static QNameUtil.PrefixedName
parsePrefixedName
(String name) static String
prettyPrint
(QName... qnames) static QNameUtil.QNameInfo
qnameToQnameInfo
(QName name) static String
qNameToUri
(QName qname) static String
qNameToUri
(QName qname, boolean unqualifiedStartsWithHash) static String
qNameToUri
(QName qname, boolean unqualifiedStartsWithHash, char separatorChar) static QName
qualifyIfNeeded
(QName name, String defaultNamespace) static boolean
remove
(Collection<? extends QName> col, QName qname) static void
reportUndeclaredNamespacePrefix
(String prefix, String context) static QName
resolveNs
(QName a, Collection<QName> col) static void
static void
setTolerateUndeclaredPrefixes
(boolean value) static boolean
static QName
static @NotNull QName
uriToQName
(@NotNull String uri, boolean allowUnqualified) static QName
uriToQName
(String uri) static @NotNull QName
uriToQName
(String uri, String defaultNamespace) static @NotNull QNameUtil.QNameInfo
uriToQNameInfo
(@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. Returnsnull
if 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
-