org.basex.query.value.node
Class FDoc

java.lang.Object
  extended by org.basex.data.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.value.Value
              extended by org.basex.query.value.item.Item
                  extended by org.basex.query.value.node.ANode
                      extended by org.basex.query.value.node.FNode
                          extended by org.basex.query.value.node.FDoc
All Implemented Interfaces:
java.lang.Iterable<Item>

public final class FDoc
extends FNode

Document node fragment.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

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.node.ANode
id
 
Fields inherited from class org.basex.query.value.item.Item
score, UNDEF
 
Fields inherited from class org.basex.query.value.Value
type
 
Constructor Summary
FDoc()
          Constructor.
FDoc(ANodeList ch, byte[] b)
          Constructor.
FDoc(byte[] b)
          Constructor.
FDoc(org.w3c.dom.DocumentFragment doc, byte[] bu)
          Constructor for DOM nodes.
FDoc(java.lang.String b)
          Constructor.
 
Method Summary
 FDoc add(ANode node)
          Adds a node and updates its parent reference.
 byte[] baseURI()
          Returns the base URI of the node.
 AxisMoreIter children()
          Returns a child axis iterator.
 FDoc copy()
          Creates a copy of this node.
 boolean hasChildren()
          Returns true if the node has children.
 FDoc optimize()
          Minimizes the memory consumption of the node.
 void plan(FElem plan)
          Creates an expression tree.
 byte[] string()
          Returns the string value.
 java.lang.String toString()
           
 Type.ID typeId()
          Returns a type id.
 byte[] xdmInfo()
          Returns data model info.
 
Methods inherited from class org.basex.query.value.node.FNode
ancestor, ancestorOrSelf, attributes, deepCopy, descendant, descendantOrSelf, diff, following, followingSibling, is, parent, parent, parentIter, qname
 
Methods inherited from class org.basex.query.value.node.ANode
attribute, attribute, attribute, bool, dbCopy, diff, diff, eq, finish, kind, kind, name, namespaces, nodeType, nsScope, preceding, precedingSibling, qname, self, string, toJava, type, uri
 
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, score, score, size, test, type, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FDoc

public FDoc()
Constructor.


FDoc

public FDoc(java.lang.String b)
Constructor.

Parameters:
b - base uri

FDoc

public FDoc(byte[] b)
Constructor.

Parameters:
b - base uri

FDoc

public FDoc(ANodeList ch,
            byte[] b)
Constructor.

Parameters:
ch - children
b - base uri

FDoc

public FDoc(org.w3c.dom.DocumentFragment doc,
            byte[] bu)
Constructor for DOM nodes. Originally provided by Erdal Karaca.

Parameters:
doc - DOM node
bu - base uri
Method Detail

optimize

public FDoc optimize()
Description copied from class: ANode
Minimizes the memory consumption of the node.

Overrides:
optimize in class ANode
Returns:
self reference

add

public FDoc add(ANode node)
Adds a node and updates its parent reference.

Parameters:
node - node to be added
Returns:
self reference

string

public byte[] string()
Description copied from class: ANode
Returns the string value.

Overrides:
string in class FNode
Returns:
string value

children

public AxisMoreIter children()
Description copied from class: ANode
Returns a child axis iterator.

Overrides:
children in class FNode
Returns:
iterator

hasChildren

public boolean hasChildren()
Description copied from class: ANode
Returns true if the node has children.

Overrides:
hasChildren in class FNode
Returns:
result of test

baseURI

public byte[] baseURI()
Description copied from class: ANode
Returns the base URI of the node.

Overrides:
baseURI in class ANode
Returns:
base URI

copy

public FDoc copy()
Description copied from class: ANode
Creates a copy of this node.

Specified by:
copy in class ANode
Returns:
copy

plan

public void plan(FElem plan)
Description copied from class: ExprInfo
Creates an expression tree.

Overrides:
plan in class Item
Parameters:
plan - root element

xdmInfo

public byte[] xdmInfo()
Description copied from class: Item
Returns data model info.

Overrides:
xdmInfo in class Item
Returns:
type string

typeId

public Type.ID typeId()
Description copied from class: Item
Returns a type id.

Overrides:
typeId in class Item
Returns:
type string

toString

public java.lang.String toString()
Specified by:
toString in class ExprInfo