|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.marklogic.shell.Shell
Shell Environment for Mark Logic. You can run the shell in batch mode or intercative mode. You can set configuration options by creating a file in your $HOME directory named ".cqshrc".
Field Summary | |
static java.lang.String |
VERSION
Shell version |
Fields inherited from interface com.marklogic.shell.Environment |
NEWLINE |
Constructor Summary | |
Shell()
Create a new Shell |
Method Summary | |
void |
checkConnection(java.lang.String user,
java.lang.String password,
java.lang.String host,
int port)
Tests the connection to Mark Logic. |
void |
exit()
Exit the shell cleanly. |
void |
exitWithError(java.lang.String message)
Exit the shell with an error message. |
jline.ConsoleReader |
getConsole()
The console reader used to read lines of input from the user. |
com.marklogic.xqrunner.XQDataSource |
getDataSource()
Returns an XQDataSource using the user, password, host, and port defined in the properties. |
java.io.File |
getHistoryFile()
The history file used to store command line history. |
org.apache.commons.cli.Options |
getOptions()
The command line options passed into the shell when it was first launched. |
org.apache.commons.configuration.PropertiesConfiguration |
getProperties()
The configuration properties for the shell environment. |
static void |
main(java.lang.String[] args)
|
void |
print(java.lang.String message)
Print a message to the console. |
void |
printError(java.lang.Exception e)
Print an error to the screen that was caused by an Exception. |
void |
printError(java.lang.String message)
Prints an error to the console. |
void |
printHelp()
Print the default help screen which will list all the command line options supported by the shell and a brief description of each. |
void |
printHelp(java.lang.String message)
Print a message along with the default help screen. |
void |
printLine(java.lang.String message)
Print a message to the console with a newline. |
void |
runXQuery(com.marklogic.xqrunner.XQuery xquery)
Runs an XQuery statement scrolling the result and displays the execution time in seconds for the query. |
void |
runXQuery(com.marklogic.xqrunner.XQuery xquery,
boolean scrollResult,
boolean showTime)
Runs an XQuery statement and optionally scrolls the result and optionally shows the execution time in seconds for the query. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String VERSION
Constructor Detail |
public Shell()
Method Detail |
public static void main(java.lang.String[] args)
public void runXQuery(com.marklogic.xqrunner.XQuery xquery)
runXQuery
in interface Environment
xquery
- public void runXQuery(com.marklogic.xqrunner.XQuery xquery, boolean scrollResult, boolean showTime)
xquery
- scrollResult
- showTime
- public com.marklogic.xqrunner.XQDataSource getDataSource() throws com.marklogic.xqrunner.XQException
getDataSource
in interface Environment
com.marklogic.xqrunner.XQException
public void checkConnection(java.lang.String user, java.lang.String password, java.lang.String host, int port) throws com.marklogic.xqrunner.XQException
user
- user namepassword
- passwordhost
- hostport
- port (defaults to 8004)
com.marklogic.xqrunner.XQException
public void printError(java.lang.String message)
printError
in interface Environment
message
- public void printError(java.lang.Exception e)
printError
in interface Environment
e
- public void printHelp()
printHelp
in interface Environment
public void printHelp(java.lang.String message)
printHelp
in interface Environment
message
- public void print(java.lang.String message)
print
in interface Environment
message
- public void printLine(java.lang.String message)
printLine
in interface Environment
message
- public void exitWithError(java.lang.String message)
exitWithError
in interface Environment
message
- public void exit()
exit
in interface Environment
public jline.ConsoleReader getConsole()
public java.io.File getHistoryFile()
public org.apache.commons.cli.Options getOptions()
public org.apache.commons.configuration.PropertiesConfiguration getProperties()
getProperties
in interface Environment
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |