|
|||||||||
| 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
public abstract class Builder
This class provides an interface for building database instances.
The specified Parser send 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.
| Method Summary | |
|---|---|
Data |
build(Parser p,
java.lang.String db)
Builds the database by running the specified parser. |
abstract void |
close()
Closes open references. |
void |
comment(byte[] com)
Stores comments; called by the building instance. |
java.lang.String |
det()
Returns detailed information on this progress. |
void |
emptyNode(byte[] tag,
byte[][] att)
Stores an empty tag; called by the building instance. |
void |
encoding(java.lang.String enc)
Sets the document encoding. |
void |
endNode(byte[] tag)
Closes a tag; called by the building instance. |
java.lang.String |
head()
Returns short information on this process. |
void |
nodeAndText(byte[] tag,
byte[] txt)
Convenience method for adding a tag and a text node; called by the building instance. |
void |
pi(byte[] pi)
Stores processing instructions; called by the building instance. |
double |
prog()
Returns progress information. |
void |
startNode(byte[] tag,
byte[][] att)
Opens a new tag; called by the building instance. |
java.lang.Object[] |
state()
Returns current progress header. |
void |
text(byte[] tok,
boolean chars)
Stores text nodes; called by the building instance. |
| 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 |
| Method Detail |
|---|
public final Data build(Parser p,
java.lang.String db)
throws java.io.IOException
p - parser instancedb - name of database
java.io.IOException - in case of parsing or writing problems
public abstract void close()
throws java.io.IOException
java.io.IOException - in case of parsing or writing problems
public final void comment(byte[] com)
throws java.io.IOException
com - the comment to be processed
java.io.IOException - in case of parsing or writing problemspublic final java.lang.String det()
Progress
public final void emptyNode(byte[] tag,
byte[][] att)
throws java.io.IOException
tag - the tag to be processedatt - the tag attributes
java.io.IOException - in case of parsing or writing problemspublic final void encoding(java.lang.String enc)
enc - encoding
public final void endNode(byte[] tag)
throws java.io.IOException
tag - the tag to be processed
java.io.IOException - in case of parsing or writing problemspublic final java.lang.String head()
Progress
public final void nodeAndText(byte[] tag,
byte[] txt)
throws java.io.IOException
tag - the tag to be processedtxt - text node
java.io.IOException - in case of parsing or writing problems
public final void pi(byte[] pi)
throws java.io.IOException
pi - the processing instruction to be processed
java.io.IOException - in case of parsing or writing problemspublic final double prog()
Progress
public final void startNode(byte[] tag,
byte[][] att)
throws java.io.IOException
tag - the tag to be processedatt - the tag attributes
java.io.IOException - in case of parsing or writing problemspublic final java.lang.Object[] state()
public final void text(byte[] tok,
boolean chars)
throws java.io.IOException
tok - the text to be processedchars - indicates if the text node is not a pure whitespace node
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 | ||||||||