|
||||||||||
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.
Field Summary | |
---|---|
MetaData |
meta
Meta data on built database. |
Parser |
parser
Parser instance. |
Method Summary | |
---|---|
Data |
build()
Builds the database by running the specified parser. |
abstract Data |
build(String db)
Builds the database by running the specified parser. |
abstract void |
close()
Closes open references. |
void |
comment(TokenBuilder com)
Stores a comment. |
String |
det()
Returns short information on this process. |
void |
emptyElem(byte[] tag,
Atts att)
Stores an empty element. |
void |
encoding(String enc)
Sets the document encoding. |
void |
endDoc()
Closes a document node. |
void |
endElem(byte[] tag)
Closes an element. |
void |
pi(TokenBuilder pi)
Stores a processing instruction. |
double |
prog()
Returns progress information. |
void |
startDoc(byte[] doc)
Opens a document node. |
int |
startElem(byte[] tag,
Atts att)
Opens a new element node. |
void |
startNS(byte[] pref,
byte[] uri)
Adds a new namespace; called by the building instance. |
void |
text(TokenBuilder t)
Stores a text node. |
String |
tit()
Returns short information on this process. |
Methods inherited from class org.basex.core.Progress |
---|
abort, checkStop, detail, progress, progress, stop, title |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Parser parser
public MetaData meta
Method Detail |
---|
public final Data build() throws IOException
IOException
- I/O exceptionpublic final void startDoc(byte[] doc) throws IOException
doc
- document name
IOException
- I/O exceptionpublic final void endDoc() throws IOException
IOException
- I/O exceptionpublic final void startNS(byte[] pref, byte[] uri)
pref
- the namespace prefixuri
- namespace uripublic final int startElem(byte[] tag, Atts att) throws IOException
tag
- tag nameatt
- attributes
IOException
- I/O exceptionpublic final void emptyElem(byte[] tag, Atts att) throws IOException
tag
- tag nameatt
- attributes
IOException
- I/O exceptionpublic final void endElem(byte[] tag) throws IOException
tag
- tag name
IOException
- I/O exceptionpublic final void text(TokenBuilder t) throws IOException
t
- text value
IOException
- I/O exceptionpublic final void comment(TokenBuilder com) throws IOException
com
- comment text
IOException
- I/O exceptionpublic final void pi(TokenBuilder pi) throws IOException
pi
- processing instruction name and value
IOException
- I/O exceptionpublic final void encoding(String enc)
enc
- encodingpublic final String tit()
Progress
tit
in class Progress
public final String det()
Progress
det
in class Progress
public final double prog()
Progress
prog
in class Progress
public abstract Data build(String db) throws IOException
db
- name of database
IOException
- I/O exceptionpublic abstract void close() throws IOException
IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |