public class QNameUtilities extends Object
| Constructor and Description |
|---|
QNameUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static QName |
createQName(String namespace,
String localPart) |
static QName |
createQName(String namespace,
String localPart,
String defaultNamespace)
Creates a QName taking into account the DEFAULT_NAMESPACE field
from JAXB
|
static String |
fixNamespace(String namespace)
Returns the namespace after accounting for null or empty strings
|
static String |
getNamespace(QName qName)
Returns the namespace, but if the namespace is null or
empty will return
XmlService.DEFAULT_NAMESPACE instead |
static String |
getNamespace(QName qName,
String defaultNamespace)
Returns the namespace, but if the namespace is null or
empty will return
XmlService.DEFAULT_NAMESPACE instead |
public static final String fixNamespace(String namespace)
namespace - The possibly null namespacepublic static QName createQName(String namespace, String localPart, String defaultNamespace)
namespace - The possibly null namespacelocalPart - The not-null localPartdefaultNamespace - The default namespace if known, or null if not knownpublic static String getNamespace(QName qName)
XmlService.DEFAULT_NAMESPACE insteadqName - qName to find the namespace of or nullpublic static String getNamespace(QName qName, String defaultNamespace)
XmlService.DEFAULT_NAMESPACE insteadqName - qName to find the namespace of or nulldefaultNamespace - The default namespace if known, or null if not knownCopyright © 2009–2020 Oracle Corporation. All rights reserved.