|
||||||||||
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.Parser
public abstract class Parser
This class defines a parser, which is used to create new databases instances.
Field Summary | |
---|---|
protected Atts |
atts
Attributes of currently parsed element. |
protected Atts |
nsp
Namespaces of currently parsed element. |
protected Prop |
prop
Database properties. |
IO |
src
Source document, or null . |
Fields inherited from class org.basex.core.Proc |
---|
listen, updating |
Constructor Summary | |
---|---|
protected |
Parser(IO source,
Prop pr)
Constructor. |
protected |
Parser(java.lang.String source,
Prop pr)
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes the parser. |
static Parser |
emptyParser(Prop pr)
Returns a parser instance for creating empty databases. |
java.lang.String |
info()
Returns parser information. |
abstract void |
parse(Builder build)
Parses all nodes and sends events to the specified builder. |
static SingleParser |
singleParser(IO in,
Prop prop,
java.lang.String target)
Returns a parser instance, based on the current options. |
Parser |
target(java.lang.String path)
Sets the target path. |
static SingleParser |
xmlParser(IO in,
Prop prop)
Returns an XML parser instance. |
Methods inherited from class org.basex.core.Proc |
---|
abort, checkStop, databases, det, detail, listen, proc, prog, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IO src
null
.
protected final Atts atts
protected final Atts nsp
protected final Prop prop
Constructor Detail |
---|
protected Parser(java.lang.String source, Prop pr)
source
- document source, or null
pr
- database propertiesprotected Parser(IO source, Prop pr)
source
- document source, or null
pr
- database propertiesMethod Detail |
---|
public abstract void parse(Builder build) throws java.io.IOException
build
- database builder
java.io.IOException
- I/O exceptionpublic void close() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic java.lang.String info()
public Parser target(java.lang.String path)
path
- target path
public static Parser emptyParser(Prop pr)
pr
- database properties
public static SingleParser xmlParser(IO in, Prop prop) throws java.io.IOException
in
- input sourceprop
- database properties
java.io.IOException
- I/O exceptionpublic static SingleParser singleParser(IO in, Prop prop, java.lang.String target) throws java.io.IOException
in
- input sourceprop
- database propertiestarget
- relative path reference
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |