|
||||||||||
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.node.ANode
public abstract class ANode
Abstract node type.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary | |
---|---|
int |
id
Unique node id. |
Fields inherited from class org.basex.query.value.item.Item |
---|
score, UNDEF |
Fields inherited from class org.basex.query.value.Value |
---|
type |
Method Summary | |
---|---|
abstract AxisIter |
ancestor()
Returns an ancestor axis iterator. |
abstract AxisIter |
ancestorOrSelf()
Returns an ancestor-or-self axis iterator. |
byte[] |
attribute(byte[] name)
Returns the value of the specified attribute, or null . |
byte[] |
attribute(QNm name)
Returns the value of the specified attribute, or null . |
byte[] |
attribute(java.lang.String name)
Returns the value of the specified attribute, or null . |
abstract AxisMoreIter |
attributes()
Returns an attribute axis iterator. |
byte[] |
baseURI()
Returns the base URI of the node. |
boolean |
bool(InputInfo ii)
Returns a boolean representation of the value. |
abstract AxisMoreIter |
children()
Returns a child axis iterator. |
abstract ANode |
copy()
Creates a copy of this node. |
DBNode |
dbCopy(Prop prop)
Returns a database node representation of the node. |
abstract ANode |
deepCopy()
Returns a deep copy of the node. |
abstract AxisIter |
descendant()
Returns a descendant axis iterator. |
abstract AxisIter |
descendantOrSelf()
Returns a descendant-or-self axis iterator. |
abstract int |
diff(ANode node)
Checks the document order of two nodes. |
protected static int |
diff(ANode node1,
ANode node2)
Compares two nodes for their unique order. |
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. |
ANode |
finish()
Returns a final node representation. |
abstract AxisIter |
following()
Returns a following axis iterator. |
abstract AxisIter |
followingSibling()
Returns a following-sibling axis iterator. |
abstract boolean |
hasChildren()
Returns true if the node has children. |
abstract boolean |
is(ANode node)
Checks if two nodes are identical. |
int |
kind()
Returns a database kind for the specified node type. |
static int |
kind(NodeType t)
Returns a database kind for the specified node type. |
byte[] |
name()
Returns the name of the node, composed of an optional prefix and the local name. |
Atts |
namespaces()
Returns all namespaces defined for the nodes. |
NodeType |
nodeType()
Returns this Node's node type. |
Atts |
nsScope()
Returns a copy of the namespace hierarchy. |
ANode |
optimize()
Minimizes the memory consumption of the node. |
abstract ANode |
parent()
Returns the parent node. |
abstract ANode |
parent(ANode p)
Sets the parent node. |
abstract AxisIter |
parentIter()
Returns a parent axis iterator. |
AxisIter |
preceding()
Returns a preceding axis iterator. |
AxisIter |
precedingSibling()
Returns a preceding-sibling axis iterator. |
QNm |
qname()
Returns the QName of the node. |
abstract QNm |
qname(QNm nm)
Updates the specified with the information of the current node. |
AxisMoreIter |
self()
Returns an self axis iterator. |
abstract byte[] |
string()
Returns the string value. |
byte[] |
string(InputInfo ii)
Returns a string representation of the value. |
BXNode |
toJava()
Returns a Java representation of the value. |
static NodeType |
type(int k)
Returns a node type for the specified database kind. |
byte[] |
uri(byte[] pref,
QueryContext ctx)
Recursively finds the uri for the specified prefix. |
Methods inherited from class org.basex.query.value.item.Item |
---|
castErr, comparable, dbl, dec, description, ebv, equiv, flt, hash, homogeneous, input, isItem, item, itemAt, iter, iterable, itr, materialize, plan, score, score, size, test, type, typeId, writeTo, xdmInfo |
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, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int id
Method Detail |
---|
public final boolean bool(InputInfo ii)
Item
bool
in class Item
ii
- input info
public final byte[] string(InputInfo ii)
Item
string
in class Item
ii
- input info, use null
if none is available
public abstract byte[] string()
public final 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 final 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 abstract ANode copy()
public abstract ANode deepCopy()
public DBNode dbCopy(Prop prop)
prop
- properties
public byte[] name()
qname()
, as no QNm
instance is created.
public QNm qname()
public abstract QNm qname(QNm nm)
qname()
, as an existing
QNm
instance is reused.
This function must only be called for elements, attributes and pi's.
nm
- temporary qname
public ANode optimize()
public Atts namespaces()
FElem
and DBNode
.
public final Atts nsScope()
public final byte[] uri(byte[] pref, QueryContext ctx)
pref
- prefixctx
- query context
public byte[] baseURI()
public abstract boolean is(ANode node)
node
- node to be compared
public abstract int diff(ANode node)
node
- node to be compared
0
if the nodes are identical, or 1
/-1
if the node appears after/before the argumentprotected static int diff(ANode node1, ANode node2)
node1
- first nodenode2
- node to be compared
0
if the nodes are identical, or 1
/-1
if the first node appears after/before the secondpublic ANode finish()
public abstract ANode parent()
public abstract ANode parent(ANode p)
p
- parent node
public abstract boolean hasChildren()
public byte[] attribute(java.lang.String name)
null
.
name
- attribute to be found
public byte[] attribute(byte[] name)
null
.
name
- attribute to be found
public byte[] attribute(QNm name)
null
.
name
- attribute to be found
public abstract AxisIter ancestor()
public abstract AxisIter ancestorOrSelf()
public abstract AxisMoreIter attributes()
public abstract AxisMoreIter children()
public abstract AxisIter descendant()
public abstract AxisIter descendantOrSelf()
public abstract AxisIter following()
public abstract AxisIter followingSibling()
public abstract AxisIter parentIter()
public final AxisIter preceding()
public final AxisIter precedingSibling()
public final AxisMoreIter self()
public int kind()
public static int kind(NodeType t)
t
- node type
public static NodeType type(int k)
k
- database kind
public final BXNode toJava()
Value
toJava
in class Value
public final NodeType nodeType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |