|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.core.Progress
org.basex.build.Builder
org.basex.build.DiskBuilder
public final class DiskBuilder
This class creates a disk based database instance. The disk layout is
described in the DiskData class.
| Field Summary |
|---|
| Fields inherited from class org.basex.build.Builder |
|---|
elms, meta, size |
| Constructor Summary | |
|---|---|
DiskBuilder()
|
|
| Method Summary | |
|---|---|
void |
addAttr(int t,
int s,
byte[] txt,
int dis)
Adds an attribute to the database. |
void |
addDoc(byte[] txt)
Adds a document node to the database. |
void |
addElem(int t,
int s,
int dis,
int as,
boolean n)
Adds an element node to the database. |
void |
addText(byte[] txt,
int dis,
byte kind)
Adds a text node to the database. |
void |
close()
Closes open references. |
DiskData |
finish()
Finishes the build process and returns a database reference. |
DiskBuilder |
init(java.lang.String db)
Initializes the database construction. |
void |
setAttValue(int pre,
byte[] val)
Stores an attribute value to the specified table position. |
void |
setSize(int pre,
int val)
Stores a size value to the specified table position. |
| Methods inherited from class org.basex.build.Builder |
|---|
build, comment, det, emptyElem, encoding, endDoc, endElem, nodeAndText, pi, prog, startDoc, startElem, startNS, text, tit |
| Methods inherited from class org.basex.core.Progress |
|---|
checkStop, detail, progress, progress, stop, title |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiskBuilder()
| Method Detail |
|---|
public DiskBuilder init(java.lang.String db)
throws java.io.IOException
Builder
init in class Builderdb - name of database
java.io.IOException - in case of parsing or writing problems
public DiskData finish()
throws java.io.IOException
Builder
finish in class Builderjava.io.IOException - in case of parsing or writing problems
public void close()
throws java.io.IOException
Builder
close in class Builderjava.io.IOException - in case of parsing or writing problems
public void addDoc(byte[] txt)
throws java.io.IOException
Builder
addDoc in class Buildertxt - the token to be added (tag name or content)
java.io.IOException - in case of parsing or writing problems
public void addElem(int t,
int s,
int dis,
int as,
boolean n)
throws java.io.IOException
BuilderBuilder.setSize(int, int) has
to be called with the final size value.
addElem in class Buildert - the tag name references - the tag namespacedis - distance (relative parent reference)as - number of attributesn - element has namespaces
java.io.IOException - in case of parsing or writing problems
public void addAttr(int t,
int s,
byte[] txt,
int dis)
throws java.io.IOException
Builder
addAttr in class Buildert - attribute names - namespacetxt - attribute valuedis - distance (relative parent reference)
java.io.IOException - in case of parsing or writing problems
public void addText(byte[] txt,
int dis,
byte kind)
throws java.io.IOException
Builder
addText in class Buildertxt - the token to be added (tag name or content)dis - distance (relative parent reference)kind - the node kind
java.io.IOException - in case of parsing or writing problems
public void setSize(int pre,
int val)
throws java.io.IOException
Builder
setSize in class Builderpre - pre referenceval - value to be stored
java.io.IOException - in case of parsing or writing problems
public void setAttValue(int pre,
byte[] val)
throws java.io.IOException
Builder
setAttValue in class Builderpre - pre referenceval - value to be stored
java.io.IOException - in case of parsing or writing problems
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||