org.basex.core.cmd
Class Store

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

public final class Store
extends ACreate

Evaluates the 'store' command and stores binary content into the database.

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
Store(java.lang.String path)
          Constructor, specifying a target path.
Store(java.lang.String path, java.lang.String input)
          Constructor, specifying a target path and an input.
 
Method Summary
 void build(CmdBuilder cb)
          Builds a string representation from the command.
protected  boolean run()
          Executes the command and serializes the result (internal call).
static void store(org.xml.sax.InputSource in, IOFile file)
          Stores the specified source to the specified file.
 
Methods inherited from class org.basex.core.cmd.ACreate
create, databases, drop, newData, sourceToIO, stoppable, supportsProg
 
Methods inherited from class org.basex.core.Command
close, databases, error, execute, execute, getOption, getOption, info, info, result, run, run, setInput, setInput, toString, updated, updating
 
Methods inherited from class org.basex.core.Proc
abort, checkStop, 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, wait, wait, wait
 

Constructor Detail

Store

public Store(java.lang.String path)
Constructor, specifying a target path. The input needs to be set via Command.setInput(InputStream).

Parameters:
path - target path

Store

public Store(java.lang.String path,
             java.lang.String input)
Constructor, specifying a target path and an input.

Parameters:
path - target path
input - input file
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

store

public static void store(org.xml.sax.InputSource in,
                         IOFile file)
                  throws java.io.IOException
Stores the specified source to the specified file.

Parameters:
in - input source
file - target file
Throws:
java.io.IOException - I/O exception

build

public void build(CmdBuilder cb)
Description copied from class: Command
Builds a string representation from the command. This string must be correctly built, as commands are sent to the server as strings.

Overrides:
build in class Command
Parameters:
cb - command builder