Constructor and Description |
---|
QNm()
Empty constructor.
|
QNm(byte[] name)
Constructor.
|
QNm(byte[] name,
byte[] uri)
Constructor.
|
QNm(byte[] name,
StaticContext sc)
Constructor, binding a statically known namespace.
|
QNm(QName name)
Constructor for converting a Java QName.
|
QNm(String name)
Constructor.
|
QNm(String name,
byte[] uri)
Constructor.
|
QNm(String name,
String uri)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
diff(Item it,
Collation coll,
InputInfo ii)
Returns the difference between the current and the specified item.
|
boolean |
eq(Item item,
Collation coll,
StaticContext sc,
InputInfo ii)
Checks the items for equality.
|
boolean |
eq(QNm n)
Compares the specified item.
|
boolean |
equals(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(byte[] prefix,
String local,
byte[] uri)
Returns a cached QName with the specified prefix, local name and uri.
|
static QNm |
get(String local)
Returns a cached QName with the specified local name.
|
static QNm |
get(String local,
byte[] uri)
Returns a cached QName with the specified local name and uri.
|
static QNm |
get(String prefix,
String local,
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.
|
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.
|
byte[] |
prefixId()
Returns a unique representation of the QName.
|
byte[] |
prefixId(byte[] ns)
Returns a unique representation of the QName.
|
static QNm |
resolve(byte[] name,
byte[] def,
StaticContext sc,
InputInfo info)
Resolves a QName string.
|
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.
|
QName |
toJava()
Returns a Java representation of the value.
|
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.
|
atomItem, atomItem, atomSize, atomValue, bool, comparable, dbl, dec, description, ebv, equiv, flt, homogeneous, input, item, itemAt, iter, iterable, itr, materialize, plan, score, score, seqType, size, test, typeId, writeTo
accept, atomValue, cache, checkUp, compile, copy, count, exprSize, has, inline, isValue, iter, iterator, removable, serialize, serialize, value
atomIter, data, hasFreeVars, indexAccessible, inlineAll, isEmpty, isFunction, isVacuous, markTailCalls, optimize, optimizeEbv, sameAs, typeCheck, uses, visitAll
public QNm()
public QNm(byte[] name)
name
- namepublic QNm(String name)
name
- namepublic QNm(byte[] name, byte[] uri)
name
- nameuri
- namespace URIpublic QNm(String name, byte[] uri)
name
- nameuri
- namespace URIpublic QNm(byte[] name, StaticContext sc)
null
.name
- namesc
- static contextpublic QNm(QName name)
name
- qnamepublic static QNm resolve(byte[] name, byte[] def, StaticContext sc, InputInfo info) throws QueryException
name
- name to resolvedef
- default namespace (can be null
)sc
- static contextinfo
- input infoQueryException
- query exceptionpublic void uri(byte[] u)
u
- the uri to be setpublic byte[] uri()
public boolean hasURI()
public byte[] string(InputInfo ii)
Item
public byte[] string()
public boolean eq(Item item, Collation coll, StaticContext sc, InputInfo ii) throws QueryException
Item
eq
in class Item
item
- item to be comparedcoll
- collationsc
- static contextii
- input infoQueryException
- query exceptionpublic boolean eq(QNm n)
n
- name to be comparedpublic int diff(Item it, Collation coll, InputInfo ii) throws QueryException
Item
diff
in class Item
it
- item to be comparedcoll
- query contextii
- input infoQueryException
- query exceptionpublic boolean hasPrefix()
public byte[] prefix()
public byte[] local()
public void set(byte[] n, byte[] u)
n
- nameu
- URIpublic byte[] id()
public byte[] prefixId()
public byte[] prefixId(byte[] ns)
id()
is called.ns
- default uri (can be null
)public QName toJava()
Value
public int hash(InputInfo ii)
Value
public byte[] xdmInfo()
Item
public static QNm get(String local)
local
- local namepublic static QNm get(byte[] local)
local
- local namepublic static QNm get(String local, byte[] uri)
local
- local nameuri
- namespace uripublic static QNm get(byte[] local, byte[] uri)
local
- local nameuri
- namespace uripublic static QNm get(byte[] prefix, String local, byte[] uri)
prefix
- prefixlocal
- local nameuri
- namespace uripublic static QNm get(String prefix, String local, String uri)
prefix
- prefixlocal
- local nameuri
- namespace uripublic static QNm get(byte[] prefix, byte[] local, byte[] uri)
prefix
- prefixlocal
- local nameuri
- namespace uripublic static byte[] internal(byte[] prefix, byte[] local, byte[] uri)
prefix
- prefixlocal
- nameuri
- uriCopyright © 2005–2015 BaseX Team. All rights reserved.