org.apache.xml.utils
public class QName extends Object implements Serializable
UNKNOWN: general
Field Summary | |
---|---|
static String | S_XMLNAMESPACEURI
The XML namespace. |
Constructor Summary | |
---|---|
QName()
Constructs an empty QName.
| |
QName(String namespaceURI, String localName)
Constructs a new QName with the specified namespace URI and
local name.
| |
QName(String namespaceURI, String localName, boolean validate)
Constructs a new QName with the specified namespace URI and
local name.
| |
QName(String namespaceURI, String prefix, String localName)
Constructs a new QName with the specified namespace URI, prefix
and local name.
| |
QName(String namespaceURI, String prefix, String localName, boolean validate)
Constructs a new QName with the specified namespace URI, prefix
and local name.
| |
QName(String localName)
Construct a QName from a string, without namespace resolution. | |
QName(String localName, boolean validate)
Construct a QName from a string, without namespace resolution. | |
QName(String qname, Stack namespaces)
Construct a QName from a string, resolving the prefix
using the given namespace stack. | |
QName(String qname, Stack namespaces, boolean validate)
Construct a QName from a string, resolving the prefix
using the given namespace stack. | |
QName(String qname, Element namespaceContext, PrefixResolver resolver)
Construct a QName from a string, resolving the prefix
using the given namespace context and prefix resolver.
| |
QName(String qname, Element namespaceContext, PrefixResolver resolver, boolean validate)
Construct a QName from a string, resolving the prefix
using the given namespace context and prefix resolver.
| |
QName(String qname, PrefixResolver resolver)
Construct a QName from a string, resolving the prefix
using the given namespace stack. | |
QName(String qname, PrefixResolver resolver, boolean validate)
Construct a QName from a string, resolving the prefix
using the given namespace stack. |
Method Summary | |
---|---|
boolean | equals(String ns, String localPart)
Override equals and agree that we're equal if
the passed object is a string and it matches
the name of the arg.
|
boolean | equals(Object object)
Override equals and agree that we're equal if
the passed object is a QName and it matches
the name of the arg.
|
String | getLocalName()
Returns the local part of the qualified name.
|
String | getLocalPart()
Get the local part of the qualified name.
|
static String | getLocalPart(String qname)
Returns the local name of the given node.
|
String | getNamespace()
Get the namespace of the qualified name.
|
String | getNamespaceURI()
Returns the namespace URI. |
String | getPrefix()
Returns the namespace prefix. |
static String | getPrefixFromXMLNSDecl(String attRawName)
This function tells if a raw attribute name is a
xmlns attribute.
|
static String | getPrefixPart(String qname)
Returns the local name of the given node.
|
static QName | getQNameFromString(String name)
Given a string, create and return a QName object
|
int | hashCode()
Return the cached hashcode of the qualified name.
|
static boolean | isXMLNSDecl(String attRawName)
This function tells if a raw attribute name is a
xmlns attribute.
|
String | toNamespacedString()
Return the string representation of the qualified name using the
the '{ns}foo' notation. |
String | toString()
Return the string representation of the qualified name, using the
prefix if available, or the '{ns}foo' notation if not. |
Parameters: namespaceURI The namespace URI if known, or null localName The local name
Parameters: namespaceURI The namespace URI if known, or null localName The local name validate If true the new QName will be validated and an IllegalArgumentException will be thrown if it is invalid.
Parameters: namespaceURI The namespace URI if known, or null prefix The namespace prefix is known, or null localName The local name
Parameters: namespaceURI The namespace URI if known, or null prefix The namespace prefix is known, or null localName The local name validate If true the new QName will be validated and an IllegalArgumentException will be thrown if it is invalid.
Parameters: localName Local part of qualified name
Parameters: localName Local part of qualified name validate If true the new QName will be validated and an IllegalArgumentException will be thrown if it is invalid.
Parameters: qname Qualified name to resolve namespaces Namespace stack to use to resolve namespace
Parameters: qname Qualified name to resolve namespaces Namespace stack to use to resolve namespace validate If true the new QName will be validated and an IllegalArgumentException will be thrown if it is invalid.
Parameters: qname Qualified name to resolve namespaceContext Namespace Context to use resolver Prefix resolver for this context
Parameters: qname Qualified name to resolve namespaceContext Namespace Context to use resolver Prefix resolver for this context validate If true the new QName will be validated and an IllegalArgumentException will be thrown if it is invalid.
Parameters: qname Qualified name to resolve resolver Prefix resolver for this context
Parameters: qname Qualified name to resolve resolver Prefix resolver for this context validate If true the new QName will be validated and an IllegalArgumentException will be thrown if it is invalid.
Parameters: ns Namespace URI to compare to localPart Local part of qualified name to compare to
Returns: True if the local name and uri match
Returns: True if the qualified names are equal
Returns: The local part of the qualified name
Returns: the local part of the qualified name
Parameters: qname Input name
Returns: Local part of the name if prefixed, or the given name if not
Returns: the namespace URI of the qualified name
Returns: The namespace URI, or null
Returns: The namespace prefix, or null
Parameters: attRawName Raw name of attribute
Returns: Prefix of attribute
Parameters: qname Input name
Returns: Prefix of name or empty string if none there
Parameters: name String to use to create QName
Returns: a QName object
Returns: the cached hashcode of the qualified name
Parameters: attRawName Raw name of attribute
Returns: True if the attribute starts with or is equal to xmlns
Returns: the string representation of the namespace
Returns: the string representation of the namespace