org.basex.build
Class DiskBuilder

java.lang.Object
  extended by org.basex.core.Progress
      extended by org.basex.build.Builder
          extended by org.basex.build.DiskBuilder

public final class DiskBuilder
extends Builder

This class creates a disk based database instance.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Constructor Summary
DiskBuilder()
           
 
Method Summary
 void addNode(int tag, int par, byte[][] atr, int[] attRef, int type)
          Adds a complex node to the database.
 void addSize(int pre)
          Adds the size value to the table.
 void addText(byte[] txt, int par, int type)
          Adds a simple node to the database.
 void close()
          Closes open references.
static void main(java.lang.String[] args)
          Test method for the, building the database and storing the table to disk.
 
Methods inherited from class org.basex.build.Builder
build, comment, det, emptyNode, encoding, endNode, head, nodeAndText, pi, prog, startNode, state, text
 
Methods inherited from class org.basex.core.Progress
detail, header, progress, progress, stop, stopped
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskBuilder

public DiskBuilder()
Method Detail

addNode

public void addNode(int tag,
                    int par,
                    byte[][] atr,
                    int[] attRef,
                    int type)
             throws java.io.IOException
Description copied from class: Builder
Adds a complex node to the database.

Parameters:
tag - the token to be added (tag name or content)
par - relative parent value (distance)
atr - optional attribute tokens
attRef - numeric attribute references
type - node type
Throws:
java.io.IOException - in case of parsing or writing problems

addSize

public void addSize(int pre)
             throws java.io.IOException
Description copied from class: Builder
Adds the size value to the table.

Parameters:
pre - closing pre tag
Throws:
java.io.IOException - in case of parsing or writing problems

addText

public void addText(byte[] txt,
                    int par,
                    int type)
             throws java.io.IOException
Description copied from class: Builder
Adds a simple node to the database.

Parameters:
txt - the token to be added (tag name or content)
par - relative parent value (distance)
type - the node type
Throws:
java.io.IOException - in case of parsing or writing problems

close

public void close()
           throws java.io.IOException
Description copied from class: Builder
Closes open references.

Specified by:
close in class Builder
Throws:
java.io.IOException - in case of parsing or writing problems

main

public static void main(java.lang.String[] args)
Test method for the, building the database and storing the table to disk.

Parameters:
args - files to be built