org.basex.query.item
Class QNm

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.item.Item
              extended by org.basex.query.item.QNm

public final class QNm
extends Item

QName item.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Use
 
Field Summary
 Uri uri
          URI.
 
Fields inherited from class org.basex.query.item.Item
score, type
 
Constructor Summary
QNm()
          Empty constructor.
QNm(byte[] n)
          Constructor.
QNm(byte[] n, QueryContext ctx)
          Constructor.
QNm(byte[] n, Uri u)
          Constructor.
QNm(QName qn)
          Convenience method for converting a Java QName.
 
Method Summary
 boolean bool()
          Returns a boolean representation of the item.
 int diff(Item it)
          Returns the difference between the current and the specified item.
 boolean eq(Item it)
          Checks the items for equality.
 boolean eq(QNm n)
          Compares the specified item.
 boolean equals(Object o)
           
 int hashCode()
           
 QName java()
          Returns a Java object.
 byte[] ln()
          Returns the local name.
 boolean ns()
          Checks if the name contains a namespace.
 byte[] pref()
          Returns the prefix.
 byte[] str()
          Returns an atomized string.
 String toString()
           
 
Methods inherited from class org.basex.query.item.Item
atomic, comp, d, dbl, dec, duplicates, ebv, flt, i, iter, iter, itr, n, name, node, plan, removable, returned, s, score, score, serialize, size, test, u, uses
 
Methods inherited from class org.basex.query.expr.Expr
addText, checkCtx, checkDbl, checkItr, e, indexAccessible, indexEquivalent, remove, sameAs, v
 
Methods inherited from class org.basex.query.ExprInfo
color, info
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

uri

public Uri uri
URI.

Constructor Detail

QNm

public QNm()
Empty constructor.


QNm

public QNm(byte[] n)
Constructor.

Parameters:
n - name

QNm

public QNm(byte[] n,
           QueryContext ctx)
    throws QueryException
Constructor.

Parameters:
n - name
ctx - query context
Throws:
QueryException - query exception

QNm

public QNm(byte[] n,
           Uri u)
Constructor.

Parameters:
n - name
u - uri

QNm

public QNm(QName qn)
Convenience method for converting a Java QName.

Parameters:
qn - qname
Method Detail

str

public byte[] str()
Description copied from class: Item
Returns an atomized string.

Overrides:
str in class Item
Returns:
string representation

bool

public boolean bool()
             throws QueryException
Description copied from class: Item
Returns a boolean representation of the item.

Overrides:
bool in class Item
Returns:
boolean value
Throws:
QueryException - query exception

eq

public boolean eq(Item it)
           throws QueryException
Description copied from class: Item
Checks the items for equality.

Specified by:
eq in class Item
Parameters:
it - item to be compared
Returns:
result of check
Throws:
QueryException - query exception

eq

public boolean eq(QNm n)
Compares the specified item.

Parameters:
n - name to be compared
Returns:
result of check

diff

public int diff(Item it)
         throws QueryException
Description copied from class: Item
Returns the difference between the current and the specified item.

Overrides:
diff in class Item
Parameters:
it - item to be compared
Returns:
difference
Throws:
QueryException - query exception

ns

public boolean ns()
Checks if the name contains a namespace.

Returns:
result of check

pref

public byte[] pref()
Returns the prefix.

Returns:
prefix

ln

public byte[] ln()
Returns the local name.

Returns:
local name

java

public QName java()
Description copied from class: Item
Returns a Java object.

Overrides:
java in class Item
Returns:
string representation

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Item

toString

public String toString()
Overrides:
toString in class Item