org.basex.query.util
Class DataBuilder

java.lang.Object
  extended by org.basex.query.util.DataBuilder

public final class DataBuilder
extends java.lang.Object

Class for building memory-based database nodes.

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

Constructor Summary
DataBuilder(MemData md)
          Constructor.
 
Method Summary
 void build(ANode node)
          Fills the data instance with the specified node.
 void build(ANodeList nodes)
          Fills the data instance with the specified nodes.
 DataBuilder ftpos(byte[] tag, FTPosData pos, int len)
          Attaches full-text position data.
static ANode stripNS(ANode node, byte[] ns, Context ctx)
          Returns a new node without the specified namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBuilder

public DataBuilder(MemData md)
Constructor.

Parameters:
md - target data
Method Detail

ftpos

public DataBuilder ftpos(byte[] tag,
                         FTPosData pos,
                         int len)
Attaches full-text position data.

Parameters:
tag - name of marker tag
pos - full-text position data
len - length of extract
Returns:
self reference

build

public void build(ANode node)
Fills the data instance with the specified node.

Parameters:
node - node

build

public void build(ANodeList nodes)
Fills the data instance with the specified nodes.

Parameters:
nodes - node list

stripNS

public static ANode stripNS(ANode node,
                            byte[] ns,
                            Context ctx)
Returns a new node without the specified namespace.

Parameters:
node - node to be copied
ns - namespace to be stripped
ctx - database context
Returns:
new node