public abstract class ACreate extends Command
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
build(Parser parser,
java.lang.String db)
Builds and creates a new database instance.
|
protected IOContent |
cache()
Returns cached input if the input is streamed and a data format different
than XML has been chosen.
|
protected static void |
create(IndexToken.IndexType index,
Data data,
ACreate cmd)
Builds the specified index.
|
protected static boolean |
drop(IndexToken.IndexType index,
Data data)
Drops the specified index.
|
boolean |
newData(Context ctx)
Closes an open data reference and returns
true if this command will change
the Context.data reference. |
protected static boolean |
pinned(Context ctx,
java.lang.String name)
Checks if the addressed database is pinned by this or another process.
|
protected boolean |
startUpdate(Data data)
Starts an update by marking the database as 'updating'.
|
boolean |
stoppable()
Returns true if this command can be stopped.
|
protected boolean |
stopUpdate(Data data)
Finalizes an update by removing 'updating' flag.
|
boolean |
supportsProg()
Returns true if this command returns a progress value.
|
build, close, error, execute, execute, getOption, getOption, info, info, pinned, result, run, run, setInput, setInput, toString, updated, updatingpublic boolean newData(Context ctx)
Commandtrue if this command will change
the Context.data reference. This method is required by the progress dialog
in the frontend.public final boolean supportsProg()
CommandsupportsProg in class Commandpublic boolean stoppable()
Commandprotected final boolean build(Parser parser, java.lang.String db)
parser - parser instancedb - name of databaseprotected boolean startUpdate(Data data)
data - data referenceprotected boolean stopUpdate(Data data)
data - data referenceprotected IOContent cache() throws java.io.IOException
java.io.IOException - I/O exceptionprotected static void create(IndexToken.IndexType index, Data data, ACreate cmd) throws java.io.IOException
index - index to be builtdata - data referencecmd - calling commandjava.io.IOException - I/O exceptionprotected static boolean drop(IndexToken.IndexType index, Data data) throws java.io.IOException
index - index typedata - data referencejava.io.IOException - I/O exceptionprotected static boolean pinned(Context ctx, java.lang.String name)
name - name of databasectx - database context