org.basex.core.proc
Class Proc

java.lang.Object
  extended by org.basex.core.Progress
      extended by org.basex.core.AbstractProcess
          extended by org.basex.core.proc.Proc
Direct Known Subclasses:
Cd, Check, Close, Copy, Create, CreateFS, CreateIndex, CreateXML, Delete, Drop, DropIndex, Export, Find, Fs, Help, Info, Insert, Link, List, Open, Optimize, PFinder, Ping, Prompt, Set, Update, XMark, XPath, XPathMV, XQEnv, XQuery

public abstract class Proc
extends AbstractProcess

This class provides the architecture for all internal command implementations. It evaluates queries that are sent by the GUI, the client or the standalone version.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.core.AbstractProcess
cmd
 
Constructor Summary
Proc()
           
 
Method Summary
 java.lang.String det()
          Returns detailed information on this progress.
 boolean execute()
          Processes a command.
static boolean execute(Commands comm, java.lang.String... arg)
          Executes the specified command.
static Proc get(Commands comm, java.lang.String... arg)
          Returns a process instance of the specified command.
 java.lang.String head()
          Returns short information on this process.
 java.lang.String info()
          Returns the query information as a string.
 void info(PrintOutput out)
          Returns process info.
 java.lang.String output()
          Returns all data generated during the last call of process in a single string.
 void output(PrintOutput out)
          Processes a command.
 double prog()
          Returns progress information.
 Result result()
          Returns the result set, generated by the last query.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.core.Progress
detail, header, progress, progress, stop, stopped
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Proc

public Proc()
Method Detail

det

public final java.lang.String det()
Description copied from class: Progress
Returns detailed information on this progress.

Returns:
information in detail

execute

public final boolean execute()
Description copied from class: AbstractProcess
Processes a command.

Specified by:
execute in class AbstractProcess
Returns:
success of operation

execute

public static boolean execute(Commands comm,
                              java.lang.String... arg)
Executes the specified command.

Parameters:
comm - command to be executed
arg - arguments
Returns:
success of operation

get

public static Proc get(Commands comm,
                       java.lang.String... arg)
Returns a process instance of the specified command.

Parameters:
comm - command to be executed
arg - arguments
Returns:
process instance

head

public final java.lang.String head()
Description copied from class: Progress
Returns short information on this process.

Returns:
header information

info

public final java.lang.String info()
Returns the query information as a string.

Returns:
info string

info

public final void info(PrintOutput out)
                throws java.io.IOException
Description copied from class: AbstractProcess
Returns process info.

Specified by:
info in class AbstractProcess
Parameters:
out - output stream
Throws:
java.io.IOException - I/O exception

output

public final java.lang.String output()
Returns all data generated during the last call of process in a single string. Only recommended for short results.

Returns:
result string

output

public final void output(PrintOutput out)
                  throws java.io.IOException
Description copied from class: AbstractProcess
Processes a command.

Specified by:
output in class AbstractProcess
Parameters:
out - output stream
Throws:
java.io.IOException - I/O exception

prog

public final double prog()
Description copied from class: Progress
Returns progress information.

Returns:
header information

result

public final Result result()
Returns the result set, generated by the last query.

Returns:
result set

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object