|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.core.Progress
org.basex.core.Command
org.basex.core.cmd.ACreate
org.basex.core.cmd.CreateDB
public final class CreateDB
Evaluates the 'create db' command and creates a new database.
| Field Summary |
|---|
| Fields inherited from class org.basex.core.Command |
|---|
args |
| Fields inherited from class org.basex.core.Progress |
|---|
listen, updating |
| Constructor Summary | |
|---|---|
CreateDB(java.lang.String name)
Default constructor. |
|
CreateDB(java.lang.String name,
java.lang.String input)
Constructor, specifying an initial database input. |
|
| Method Summary | |
|---|---|
void |
build(CmdBuilder cb)
Builds a string representation from the command. |
static Data |
create(IO source,
boolean single,
Context ctx)
Creates a new database if a valid path was specified. |
static Data |
create(java.lang.String name,
Parser parser,
Context ctx)
Returns a database instance from the specified parser. |
static MemData |
mainMem(IO source,
Context ctx)
Returns a main memory database instance for the specified input reference. |
static MemData |
mainMem(Parser parser,
Context ctx)
Returns a main memory database instance from the specified parser. |
void |
setParser(Parser p)
Attaches a parser. |
| Methods inherited from class org.basex.core.cmd.ACreate |
|---|
newData, stoppable, supportsProg |
| Methods inherited from class org.basex.core.Command |
|---|
execute, execute, info, result, run, run, setInput, setInput, toString, updated, updating |
| Methods inherited from class org.basex.core.Progress |
|---|
checkStop, detail, listen, progress, startTimeout, stop, stopTimeout, title |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CreateDB(java.lang.String name)
Command.setInput(InputStream).
name - name of database
public CreateDB(java.lang.String name,
java.lang.String input)
name - name of databaseinput - input reference (local/remote file or XML string)| Method Detail |
|---|
public void setParser(Parser p)
p - input parser
public static Data create(java.lang.String name,
Parser parser,
Context ctx)
throws java.io.IOException
name - name of the databaseparser - input parserctx - database context
java.io.IOException - I/O exception
public static MemData mainMem(Parser parser,
Context ctx)
throws java.io.IOException
parser - input parserctx - database context
java.io.IOException - I/O exception
public static MemData mainMem(IO source,
Context ctx)
throws java.io.IOException
source - document sourcectx - database context
java.io.IOException - I/O exception
public static Data create(IO source,
boolean single,
Context ctx)
throws java.io.IOException
source - document sourcesingle - expect single documentctx - database context
java.io.IOException - I/O exceptionpublic void build(CmdBuilder cb)
Command
cb - command builder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||