|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.ExprInfo
org.basex.query.expr.Expr
org.basex.query.value.Value
org.basex.query.value.item.Item
org.basex.query.value.item.QNm
public final class QNm
QName item (xs:QName
).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary |
---|
Fields inherited from class org.basex.query.value.item.Item |
---|
score, UNDEF |
Fields inherited from class org.basex.query.value.Value |
---|
type |
Constructor Summary | |
---|---|
QNm()
Empty constructor. |
|
QNm(byte[] n)
Constructor. |
|
QNm(byte[] n,
byte[] u)
Constructor. |
|
QNm(byte[] n,
QueryContext ctx)
Constructor, binding a statically known namespace. |
|
QNm(javax.xml.namespace.QName qn)
Constructor for converting a Java QName. |
|
QNm(java.lang.String n)
Constructor. |
|
QNm(java.lang.String n,
byte[] u)
Constructor. |
|
QNm(java.lang.String n,
java.lang.String u)
Constructor. |
Method Summary | |
---|---|
int |
diff(Item it,
Collation coll,
InputInfo ii)
Returns the difference between the current and the specified item. |
boolean |
eq(Item it,
Collation coll,
InputInfo ii)
Checks the items for equality. |
boolean |
eq(QNm n)
Compares the specified item. |
boolean |
equals(java.lang.Object obj)
|
static QNm |
get(byte[] local)
Returns a cached QName with the specified local name. |
static QNm |
get(byte[] local,
byte[] uri)
Returns a cached QName with the specified local name and uri. |
static QNm |
get(byte[] prefix,
byte[] local,
byte[] uri)
Returns a cached QName with the specified prefix, local name and uri. |
static QNm |
get(java.lang.String local)
Returns a cached QName with the specified local name. |
static QNm |
get(java.lang.String local,
byte[] uri)
Returns a cached QName with the specified local name and uri. |
static QNm |
get(java.lang.String prefix,
java.lang.String local,
byte[] uri)
Returns a cached QName with the specified prefix, local name and uri. |
static QNm |
get(java.lang.String prefix,
java.lang.String local,
java.lang.String uri)
Returns a cached QName with the specified prefix, local name and uri. |
int |
hash(InputInfo ii)
Returns a hash code for this value. |
int |
hashCode()
|
boolean |
hasPrefix()
Checks if the name contains a prefix. |
boolean |
hasURI()
Checks if the URI of this QName has been explicitly set. |
byte[] |
id()
Returns a unique representation of the QName: if a URI exists, the EQName notation is used. otherwise, if a prefix exists, the prefix and local name is returned. otherwise, the local name is returned. |
static byte[] |
internal(byte[] prefix,
byte[] local,
byte[] uri)
Constructs an internal string representation for the components of a QName. |
byte[] |
local()
Returns the local name. |
byte[] |
prefix()
Returns the prefix. |
void |
set(byte[] n,
byte[] u)
Updates the values of this QName. |
byte[] |
string()
Returns the string value. |
byte[] |
string(InputInfo ii)
Returns a string representation of the value. |
javax.xml.namespace.QName |
toJava()
Returns a Java representation of the value. |
java.lang.String |
toString()
|
byte[] |
uri()
Returns the URI of this QName. |
void |
uri(byte[] u)
Sets the URI of this QName. |
byte[] |
xdmInfo()
Returns data model info. |
Methods inherited from class org.basex.query.value.item.Item |
---|
bool, castErr, comparable, dbl, dec, description, ebv, equiv, flt, homogeneous, input, isItem, item, itemAt, iter, iterable, itr, materialize, plan, score, score, size, test, type, typeId, writeTo |
Methods inherited from class org.basex.query.value.Value |
---|
accept, cache, checkUp, compile, copy, count, data, exprSize, has, inline, isValue, iter, iterator, removable, serialize, value |
Methods inherited from class org.basex.query.expr.Expr |
---|
addText, compEbv, copy, hasFreeVars, indexAccessible, indexEquivalent, inlineAll, isEmpty, isFunction, isVacuous, markTailCalls, optimize, sameAs, uses, visitAll |
Methods inherited from class org.basex.data.ExprInfo |
---|
addPlan, addPlan, info, planAttr, planElem |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QNm()
public QNm(byte[] n)
n
- namepublic QNm(java.lang.String n)
n
- namepublic QNm(byte[] n, byte[] u)
n
- nameu
- namespace URIpublic QNm(java.lang.String n, byte[] u)
n
- nameu
- namespace URIpublic QNm(java.lang.String n, java.lang.String u)
n
- nameu
- namespace URIpublic QNm(byte[] n, QueryContext ctx)
null
.
n
- namectx
- query contextpublic QNm(javax.xml.namespace.QName qn)
qn
- qnameMethod Detail |
---|
public void uri(byte[] u)
u
- the uri to be setpublic byte[] uri()
public boolean hasURI()
public byte[] string(InputInfo ii)
Item
string
in class Item
ii
- input info, use null
if none is available
public byte[] string()
public boolean eq(Item it, Collation coll, InputInfo ii) throws QueryException
Item
eq
in class Item
it
- item to be comparedcoll
- collationii
- input info
QueryException
- query exceptionpublic boolean eq(QNm n)
n
- name to be compared
public int diff(Item it, Collation coll, InputInfo ii) throws QueryException
Item
diff
in class Item
it
- item to be comparedcoll
- query contextii
- input info
QueryException
- query exceptionpublic boolean hasPrefix()
public byte[] prefix()
public byte[] local()
public void set(byte[] n, byte[] u)
n
- nameu
- URIpublic byte[] id()
public javax.xml.namespace.QName toJava()
Value
toJava
in class Value
public int hash(InputInfo ii) throws QueryException
Value
hash
in class Item
ii
- input info
QueryException
- if atomization can't be applied (e.g. function item)public byte[] xdmInfo()
Item
xdmInfo
in class Item
public java.lang.String toString()
toString
in class ExprInfo
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static QNm get(java.lang.String local)
local
- local name
public static QNm get(byte[] local)
local
- local name
public static QNm get(java.lang.String local, byte[] uri)
local
- local nameuri
- namespace uri
public static QNm get(byte[] local, byte[] uri)
local
- local nameuri
- namespace uri
public static QNm get(java.lang.String prefix, java.lang.String local, byte[] uri)
prefix
- prefixlocal
- local nameuri
- namespace uri
public static QNm get(java.lang.String prefix, java.lang.String local, java.lang.String uri)
prefix
- prefixlocal
- local nameuri
- namespace uri
public static QNm get(byte[] prefix, byte[] local, byte[] uri)
prefix
- prefixlocal
- local nameuri
- namespace uri
public static byte[] internal(byte[] prefix, byte[] local, byte[] uri)
prefix
- prefixlocal
- nameuri
- uri
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |