Package org.glassfish.hk2.xml.internal
Class QNameUtilities
java.lang.Object
org.glassfish.hk2.xml.internal.QNameUtilities
- Author:
- jwells
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QNamecreateQName(String namespace, String localPart) static QNamecreateQName(String namespace, String localPart, String defaultNamespace) Creates a QName taking into account the DEFAULT_NAMESPACE field from JAXBstatic final StringfixNamespace(String namespace) Returns the namespace after accounting for null or empty stringsstatic StringgetNamespace(QName qName) Returns the namespace, but if the namespace is null or empty will returnXmlService.DEFAULT_NAMESPACEinsteadstatic StringgetNamespace(QName qName, String defaultNamespace) Returns the namespace, but if the namespace is null or empty will returnXmlService.DEFAULT_NAMESPACEinstead
-
Constructor Details
-
QNameUtilities
public QNameUtilities()
-
-
Method Details
-
fixNamespace
Returns the namespace after accounting for null or empty strings- Parameters:
namespace- The possibly null namespace- Returns:
- The non-null namespace
-
createQName
-
createQName
Creates a QName taking into account the DEFAULT_NAMESPACE field from JAXB- Parameters:
namespace- The possibly null namespacelocalPart- The not-null localPartdefaultNamespace- The default namespace if known, or null if not known- Returns:
-
getNamespace
Returns the namespace, but if the namespace is null or empty will returnXmlService.DEFAULT_NAMESPACEinstead- Parameters:
qName- qName to find the namespace of or null- Returns:
- null if qName is null or the String for the namespace if not null
-
getNamespace
Returns the namespace, but if the namespace is null or empty will returnXmlService.DEFAULT_NAMESPACEinstead- Parameters:
qName- qName to find the namespace of or nulldefaultNamespace- The default namespace if known, or null if not known- Returns:
- null if qName is null or the String for the namespace if not null
-