public final class DiskBuilder extends Builder implements Closeable
Data
class.Constructor and Description |
---|
DiskBuilder(String name,
Parser parser,
StaticOptions sopts,
MainOptions opts)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts a failed or interrupted process.
|
protected void |
addAttr(int name,
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 name,
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.
|
DataClip |
dataClip()
Returns a data clip with the parsed input.
|
protected void |
setSize(int pre,
int size)
Stores a size value to the specified table position.
|
closeDoc, closeElem, comment, det, emptyElem, encoding, openDoc, openElem, pi, prog, text, tit
checkStop, databases, detail, listen, proc, progress, registered, registered, startTimeout, stop, stopTimeout, title
public DiskBuilder(String name, Parser parser, StaticOptions sopts, MainOptions opts)
name
- name of databaseparser
- parsersopts
- static optionsopts
- main optionspublic DiskData build() throws IOException
Builder
build
in class Builder
IOException
- I/O exceptionpublic void abort()
Proc
public DataClip dataClip() throws IOException
Builder
dataClip
in class Builder
IOException
- I/O exceptionpublic void close() throws IOException
Builder
close
in interface Closeable
close
in interface AutoCloseable
close
in class Builder
IOException
- I/O exceptionprotected void addDoc(byte[] value) throws IOException
Builder
addDoc
in class Builder
value
- name of the documentIOException
- I/O exceptionprotected void addElem(int dist, int name, int asize, int uri, boolean ne) throws IOException
Builder
Builder.setSize(int, int)
must
be called to set the final size value.addElem
in class Builder
dist
- distance to parentname
- element nameasize
- number of attributesuri
- namespace uri referencene
- namespace flagIOException
- I/O exceptionprotected void addAttr(int name, byte[] value, int dist, int uri) throws IOException
Builder
addAttr
in class Builder
name
- attribute namevalue
- attribute valuedist
- distance to parenturi
- namespace uri referenceIOException
- I/O exceptionprotected void addText(byte[] value, int dist, byte kind) throws IOException
Builder
addText
in class Builder
value
- the token to be addeddist
- distance to parentkind
- the node kindIOException
- I/O exceptionprotected void setSize(int pre, int size) throws IOException
Builder
setSize
in class Builder
pre
- pre referencesize
- value to be storedIOException
- I/O exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.