org.basex.core.cmd
Class Export

java.lang.Object
  extended by org.basex.core.Proc
      extended by org.basex.core.Command
          extended by org.basex.core.cmd.Export

public final class Export
extends Command

Evaluates the 'export' command and saves the currently opened database to disk.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.core.Command
args, context, in, mprop, out, perf, prop
 
Fields inherited from class org.basex.core.Proc
listen, updating
 
Constructor Summary
Export(java.lang.String path)
          Default constructor, specifying a target path.
 
Method Summary
 void databases(LockResult lr)
          Adds the names of the databases that may be touched by the process.
 java.lang.String det()
          Returns short information on this process.
static void export(Data data, java.lang.String path, SerializerProp sp, Export e)
          Exports the current database to the specified path.
 double prog()
          Returns a progress value (0 - 1).
protected  boolean run()
          Executes the command and serializes the result (internal call).
 boolean stoppable()
          Returns true if this command can be stopped.
 boolean supportsProg()
          Returns true if this command returns a progress value.
 
Methods inherited from class org.basex.core.Command
build, close, databases, error, execute, execute, getOption, getOption, info, info, newData, result, run, run, setInput, setInput, toString, updated, updating
 
Methods inherited from class org.basex.core.Proc
abort, checkStop, detail, listen, proc, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Export

public Export(java.lang.String path)
Default constructor, specifying a target path.

Parameters:
path - export path
Method Detail

run

protected boolean run()
Description copied from class: Command
Executes the command and serializes the result (internal call).

Specified by:
run in class Command
Returns:
success of operation

databases

public void databases(LockResult lr)
Description copied from class: Proc
Adds the names of the databases that may be touched by the process.

Overrides:
databases in class Proc
Parameters:
lr - Container for lock result to pass around

export

public static void export(Data data,
                          java.lang.String path,
                          SerializerProp sp,
                          Export e)
                   throws java.io.IOException
Exports the current database to the specified path. Files and directories in path will be possibly overwritten.

Parameters:
data - data reference
path - directory
sp - serialization properties
e - calling instance
Throws:
java.io.IOException - I/O exception

prog

public double prog()
Description copied from class: Proc
Returns a progress value (0 - 1). Can be overwritten to give more detailed information.

Overrides:
prog in class Proc
Returns:
header information

stoppable

public boolean stoppable()
Description copied from class: Command
Returns true if this command can be stopped. This method is required by the progress dialog in the frontend.

Overrides:
stoppable in class Command
Returns:
result of check

supportsProg

public boolean supportsProg()
Description copied from class: Command
Returns true if this command returns a progress value. This method is required by the progress dialog in the frontend.

Overrides:
supportsProg in class Command
Returns:
result of check

det

public java.lang.String det()
Description copied from class: Proc
Returns short information on this process.

Overrides:
det in class Proc
Returns:
header information