public final class

QName

extends Object
implements Comparable<T>
java.lang.Object
   ↳ com.google.gdata.model.QName

Class Overview

Qualified name of a data model element or attribute. A qname instance is immutable.

Summary

Constants
String ANY_LOCALNAME Special value for the QName local name that will match any local name.
Fields
public static final XmlNamespace ANY_NAMESPACE Special value for the QName namespace that will match any namespace.
private final String localName
private final XmlNamespace namespace
Public Constructors
QName(String localName)
QName(XmlNamespace namespace, String localName)
Public Methods
int compareTo(QName o)
boolean equals(Object other)
String getLocalName()
XmlNamespace getNs()
int hashCode()
boolean matches(QName o)
Checks if this QName is a match for the other QName.
boolean matchesAnyLocalName()
Returns true if this qname has a local name that will match any local name.
boolean matchesAnyNamespace()
Returns true if this qname has a namespace value that will match any namespace.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Comparable

Constants

public static final String ANY_LOCALNAME

Special value for the QName local name that will match any local name.

Constant Value: "*"

Fields

public static final XmlNamespace ANY_NAMESPACE

Special value for the QName namespace that will match any namespace.

private final String localName

private final XmlNamespace namespace

Public Constructors

public QName (String localName)

Parameters
localName

public QName (XmlNamespace namespace, String localName)

Parameters
namespace
localName

Public Methods

public int compareTo (QName o)

Parameters
o

public boolean equals (Object other)

Parameters
other

public String getLocalName ()

public XmlNamespace getNs ()

public int hashCode ()

public boolean matches (QName o)

Checks if this QName is a match for the other QName. A QName is a match if it is null and if 1) the local namespace is ANY_NAMESPACE or the two namespaces are both null or have a matching uri and 2) the local name is ANY_LOCALNAME or the two local names are equal.

Parameters
o

public boolean matchesAnyLocalName ()

Returns true if this qname has a local name that will match any local name.

See Also
  • ANY_LOCALNAME

public boolean matchesAnyNamespace ()

Returns true if this qname has a namespace value that will match any namespace.

See Also
  • ANY_NAMESPACE

public String toString ()