org.basex.core
Enum Commands

java.lang.Object
  extended by java.lang.Enum<Commands>
      extended by org.basex.core.Commands
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Commands>

public enum Commands
extends java.lang.Enum<Commands>

This enumeration contains definitions of all available internal commands. The find(java.lang.String) method maps a command string to the respective command. Adding a command should be done here; a how-to is included in the source.

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

Enum Constant Summary
CD
          Switch context set.
CHECK
          Make sure the specified document is in memory.
CLOSE
          Close database.
COPY
          Insert a document into the currently loaded.
CREATE
          Create main-memory mapping for specified XML document.
CREATEFS
          Convenience alias for creating a filesystem database.
CREATEINDEX
          Convenience alias for creating an index.
CREATEXML
          Convenience alias for creating an xml database.
DELETE
          Evaluate XPath query without showing result.
DROP
          Deletes database.
DROPINDEX
          Convenience alias for dropping an index.
DUMMYDATABASE
          Database separator.
DUMMYGENERAL
          General separator.
DUMMYQUERY
          Query separator.
DUMMYUPDATE
          Update separator.
EXIT
          Terminate client.
EXPORT
          Export XML file.
FIND
          Launch a simplified query.
FS
          Filesystem command.
GETINFO
          Internal 'get info' command.
GETRESULT
          Internal 'get result' command.
HELP
          Get command overview or detailed information on one command.
INFO
          Show some information on the XML and memory structure.
INSERT
          Insert a document, tag or text into the database.
LINK
          Evaluate XPath query, show result and create links.
LIST
          List available databases.
OPEN
          Open a database.
OPTIMIZE
          Open a database.
PF
          Evaluate XQuery via Pathfinder and show result.
PING
          test database connection.
PROMPT
          test database connection.
QUIT
          alias for 'exit'.
SET
          Toggle chopping of whitespaces.
STOP
          Stop server instance.
UPDATE
          Insert a document into the currently opened database.
XMARK
          launches XMark query.
XPATH
          Evaluate XPath query and show result.
XPATHMV
          Evaluate a MedioVis query.
XQENV
          Evaluate XQuery and show result.
XQUERY
          Evaluate XQuery and show result.
 
Method Summary
 boolean args(int n)
          Checks the number of arguments.
 boolean data()
          Returns if the current command needs a data reference for processing.
 java.lang.String help(boolean detail, boolean all)
          Returns a help string.
 boolean local()
          Returns if the current command is supposed to be processed locally.
 boolean printing()
          Returns if the current command yields some output.
 boolean server()
          Returns if the current command is a pure server command.
 boolean updating()
          Returns if the current command generates updates in the data structure.
static Commands valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Commands[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CD

public static final Commands CD
Switch context set.


CHECK

public static final Commands CHECK
Make sure the specified document is in memory.


CLOSE

public static final Commands CLOSE
Close database.


COPY

public static final Commands COPY
Insert a document into the currently loaded.


CREATE

public static final Commands CREATE
Create main-memory mapping for specified XML document.


CREATEFS

public static final Commands CREATEFS
Convenience alias for creating a filesystem database.


CREATEINDEX

public static final Commands CREATEINDEX
Convenience alias for creating an index.


CREATEXML

public static final Commands CREATEXML
Convenience alias for creating an xml database.


DELETE

public static final Commands DELETE
Evaluate XPath query without showing result.


DROP

public static final Commands DROP
Deletes database.


DROPINDEX

public static final Commands DROPINDEX
Convenience alias for dropping an index.


DUMMYDATABASE

public static final Commands DUMMYDATABASE
Database separator.


DUMMYGENERAL

public static final Commands DUMMYGENERAL
General separator.


DUMMYQUERY

public static final Commands DUMMYQUERY
Query separator.


DUMMYUPDATE

public static final Commands DUMMYUPDATE
Update separator.


EXIT

public static final Commands EXIT
Terminate client.


EXPORT

public static final Commands EXPORT
Export XML file.


FIND

public static final Commands FIND
Launch a simplified query.


FS

public static final Commands FS
Filesystem command.


GETINFO

public static final Commands GETINFO
Internal 'get info' command.


GETRESULT

public static final Commands GETRESULT
Internal 'get result' command.


HELP

public static final Commands HELP
Get command overview or detailed information on one command.


INFO

public static final Commands INFO
Show some information on the XML and memory structure.


INSERT

public static final Commands INSERT
Insert a document, tag or text into the database.


LINK

public static final Commands LINK
Evaluate XPath query, show result and create links.


LIST

public static final Commands LIST
List available databases.


OPEN

public static final Commands OPEN
Open a database.


OPTIMIZE

public static final Commands OPTIMIZE
Open a database.


PF

public static final Commands PF
Evaluate XQuery via Pathfinder and show result.


PING

public static final Commands PING
test database connection.


PROMPT

public static final Commands PROMPT
test database connection.


QUIT

public static final Commands QUIT
alias for 'exit'.


SET

public static final Commands SET
Toggle chopping of whitespaces.


STOP

public static final Commands STOP
Stop server instance.


UPDATE

public static final Commands UPDATE
Insert a document into the currently opened database.


XMARK

public static final Commands XMARK
launches XMark query.


XPATH

public static final Commands XPATH
Evaluate XPath query and show result.


XPATHMV

public static final Commands XPATHMV
Evaluate a MedioVis query.


XQENV

public static final Commands XQENV
Evaluate XQuery and show result.


XQUERY

public static final Commands XQUERY
Evaluate XQuery and show result.

Method Detail

args

public boolean args(int n)
Checks the number of arguments.

Parameters:
n - number of arguments
Returns:
true if number is correct

data

public boolean data()
Returns if the current command needs a data reference for processing.

Returns:
result of check

help

public java.lang.String help(boolean detail,
                             boolean all)
Returns a help string.

Parameters:
detail - show details
all - show all commands (also hidden ones)
Returns:
string

local

public boolean local()
Returns if the current command is supposed to be processed locally.

Returns:
result of check

printing

public boolean printing()
Returns if the current command yields some output.

Returns:
result of check

server

public boolean server()
Returns if the current command is a pure server command.

Returns:
result of check

updating

public boolean updating()
Returns if the current command generates updates in the data structure.

Returns:
result of check

valueOf

public static Commands valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

values

public static Commands[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Commands c : Commands.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared