|
||||||||||
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
public abstract class Builder
This class provides an interface for building database instances.
The specified Parser
sends events to this class whenever nodes
are to be added or closed. The builder implementation decides whether
the nodes are stored on disk or kept in memory.
Field Summary |
---|
Fields inherited from class org.basex.core.Proc |
---|
listen, updating |
Method Summary | |
---|---|
protected abstract void |
addAttr(int nm,
byte[] value,
int dist,
int uri)
Adds an attribute to the database. |
protected abstract void |
addDoc(byte[] value)
Adds a document node to the database. |
protected abstract void |
addElem(int dist,
int nm,
int asize,
int uri,
boolean ne)
Adds an element node to the database. |
protected abstract void |
addText(byte[] value,
int dist,
byte kind)
Adds a text node to the database. |
abstract Data |
build()
Builds the database. |
abstract void |
close()
Closes open references. |
void |
closeDoc()
Closes a document node. |
void |
closeElem()
Closes an element. |
void |
comment(byte[] value)
Stores a comment. |
java.lang.String |
det()
Returns short information on this process. |
void |
emptyElem(byte[] nm,
Atts att,
Atts nsp)
Stores an empty element. |
void |
encoding(java.lang.String enc)
Sets the document encoding. |
void |
openDoc(byte[] value)
Opens a document node. |
void |
openElem(byte[] nm,
Atts att,
Atts nsp)
Opens a new element node. |
void |
pi(byte[] pi)
Stores a processing instruction. |
double |
prog()
Returns a progress value (0 - 1). |
protected abstract void |
setSize(int pre,
int size)
Stores a size value to the specified table position. |
void |
text(byte[] value)
Stores a text node. |
protected java.lang.String |
tit()
Returns short information on this process. |
Methods inherited from class org.basex.core.Proc |
---|
abort, 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 |
Method Detail |
---|
public final void openDoc(byte[] value) throws java.io.IOException
value
- document name
java.io.IOException
- I/O exceptionpublic final void closeDoc() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic final void openElem(byte[] nm, Atts att, Atts nsp) throws java.io.IOException
nm
- tag nameatt
- attributesnsp
- namespaces
java.io.IOException
- I/O exceptionpublic final void emptyElem(byte[] nm, Atts att, Atts nsp) throws java.io.IOException
nm
- tag nameatt
- attributesnsp
- namespaces
java.io.IOException
- I/O exceptionpublic final void closeElem() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic final void text(byte[] value) throws java.io.IOException
value
- text value
java.io.IOException
- I/O exceptionpublic final void comment(byte[] value) throws java.io.IOException
value
- comment text
java.io.IOException
- I/O exceptionpublic final void pi(byte[] pi) throws java.io.IOException
pi
- processing instruction name and value
java.io.IOException
- I/O exceptionpublic final void encoding(java.lang.String enc)
enc
- encodingprotected final java.lang.String tit()
Proc
tit
in class Proc
public final java.lang.String det()
Proc
det
in class Proc
public final double prog()
Proc
prog
in class Proc
public abstract Data build() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic abstract void close() throws java.io.IOException
java.io.IOException
- I/O exceptionprotected abstract void addDoc(byte[] value) throws java.io.IOException
value
- name of the document
java.io.IOException
- I/O exceptionprotected abstract void addElem(int dist, int nm, int asize, int uri, boolean ne) throws java.io.IOException
setSize(int, int)
must
be called to set the final size value.
dist
- distance to parentnm
- the tag name referenceasize
- number of attributesuri
- namespace uri referencene
- namespace flag
java.io.IOException
- I/O exceptionprotected abstract void addAttr(int nm, byte[] value, int dist, int uri) throws java.io.IOException
nm
- attribute namevalue
- attribute valuedist
- distance to parenturi
- namespace uri reference
java.io.IOException
- I/O exceptionprotected abstract void addText(byte[] value, int dist, byte kind) throws java.io.IOException
value
- the token to be added (tag name or content)dist
- distance to parentkind
- the node kind
java.io.IOException
- I/O exceptionprotected abstract void setSize(int pre, int size) throws java.io.IOException
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 |