org.basex.query.xquery.item
Class QNm

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

public final class QNm
extends Item

QName item.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.xquery.expr.Expr
Expr.Return, Expr.Using
 
Field Summary
 Uri uri
          URI.
 
Fields inherited from class org.basex.query.xquery.item.Item
type
 
Constructor Summary
QNm()
          Empty Constructor.
QNm(byte[] n)
          Constructor.
QNm(byte[] n, Uri u)
          Constructor.
QNm(byte[] n, XQContext ctx)
          Constructor.
QNm(javax.xml.namespace.QName qn)
          Convenient method for converting a Java QName to a project specific one.
 
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.
 javax.xml.namespace.QName java()
          Returns a Java object.
 byte[] ln()
          Returns the local name.
 void name(byte[] nm)
          Sets the name.
 boolean ns()
          Checks if the name contains a namespace.
 byte[] pre()
          Returns the prefix.
 byte[] str()
          Returns an atomized string.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xquery.item.Item
castErr, comp, d, dbl, dec, flt, hash, i, iter, iter, itr, n, name, node, plan, returned, s, score, score, serialize, size, u, uses
 
Methods inherited from class org.basex.query.xquery.expr.Expr
e
 
Methods inherited from class org.basex.query.ExprInfo
color, info
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, 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,
           XQContext ctx)
    throws XQException
Constructor.

Parameters:
n - name
ctx - xquery context
Throws:
XQException - query exception

QNm

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

Parameters:
n - name
u - uri

QNm

public QNm(javax.xml.namespace.QName qn)
Convenient method for converting a Java QName to a project specific one.

Parameters:
qn - qname
Method Detail

name

public void name(byte[] nm)
Sets the name.

Parameters:
nm - name

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 XQException
Description copied from class: Item
Returns a boolean representation of the item.

Overrides:
bool in class Item
Returns:
boolean value
Throws:
XQException - evaluation exception

eq

public boolean eq(Item it)
           throws XQException
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:
XQException - evaluation 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 XQException
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:
XQException - evaluation exception

ns

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

Returns:
result of check

pre

public byte[] pre()
Returns the prefix.

Returns:
prefix

ln

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

Returns:
local name

java

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

Overrides:
java in class Item
Returns:
string representation

toString

public java.lang.String toString()
Overrides:
toString in class Item