|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Proc
org.basex.build.Builder
org.basex.build.DiskBuilder
public final class DiskBuilder
This class creates a database instance on disk.
The storage layout is described in the Data
class.
Field Summary |
---|
Fields inherited from class org.basex.core.Proc |
---|
listen, updating |
Constructor Summary | |
---|---|
DiskBuilder(java.lang.String nm,
Parser parse,
Context ctx)
Constructor. |
Method Summary | |
---|---|
void |
abort()
Aborts a failed or interrupted process. |
protected void |
addAttr(int nm,
byte[] value,
int dist,
int uri)
Adds an attribute to the database. |
protected void |
addDoc(byte[] value)
Adds a document node to the database. |
protected void |
addElem(int dist,
int nm,
int asize,
int uri,
boolean ne)
Adds an element node to the database. |
protected void |
addText(byte[] value,
int dist,
byte kind)
Adds a text node to the database. |
DiskData |
build()
Builds the database. |
void |
close()
Closes open references. |
protected void |
setSize(int pre,
int size)
Stores a size value to the specified table position. |
Methods inherited from class org.basex.build.Builder |
---|
closeDoc, closeElem, comment, det, emptyElem, encoding, openDoc, openElem, pi, prog, text, tit |
Methods inherited from class org.basex.core.Proc |
---|
checkStop, databases, detail, listen, proc, progress, registered, registered, startTimeout, stop, stopTimeout, title |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiskBuilder(java.lang.String nm, Parser parse, Context ctx)
nm
- name of databaseparse
- parserctx
- database contextMethod Detail |
---|
public DiskData build() throws java.io.IOException
Builder
build
in class Builder
java.io.IOException
- I/O exceptionpublic void abort()
Proc
abort
in class Proc
public void close() throws java.io.IOException
Builder
close
in class Builder
java.io.IOException
- I/O exceptionprotected void addDoc(byte[] value) throws java.io.IOException
Builder
addDoc
in class Builder
value
- name of the document
java.io.IOException
- I/O exceptionprotected void addElem(int dist, int nm, int asize, int uri, boolean ne) throws java.io.IOException
Builder
Builder.setSize(int, int)
must
be called to set the final size value.
addElem
in class Builder
dist
- distance to parentnm
- the tag name referenceasize
- number of attributesuri
- namespace uri referencene
- namespace flag
java.io.IOException
- I/O exceptionprotected void addAttr(int nm, byte[] value, int dist, int uri) throws java.io.IOException
Builder
addAttr
in class Builder
nm
- attribute namevalue
- attribute valuedist
- distance to parenturi
- namespace uri reference
java.io.IOException
- I/O exceptionprotected void addText(byte[] value, int dist, byte kind) throws java.io.IOException
Builder
addText
in class Builder
value
- the token to be added (tag name or content)dist
- distance to parentkind
- the node kind
java.io.IOException
- I/O exceptionprotected void setSize(int pre, int size) throws java.io.IOException
Builder
setSize
in class Builder
pre
- pre referencesize
- value to be stored
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |