|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Main
public abstract class Main
This is the abstract main class for the starter classes.
Field Summary | |
---|---|
protected boolean |
console
Console mode. |
Context |
context
Database context. |
protected boolean |
newline
Separate serialized items with newlines. |
protected java.io.OutputStream |
out
Output file for queries. |
protected Session |
session
Session. |
protected boolean |
verbose
Verbose mode. |
Constructor Summary | |
---|---|
protected |
Main(java.lang.String[] args)
Constructor. |
protected |
Main(java.lang.String[] args,
Context ctx)
Constructor. |
Method Summary | |
---|---|
protected void |
console()
Launches the console mode, which reads and executes user input. |
protected void |
execute(Command cmd,
boolean info)
Executes the specified command and optionally prints some information. |
protected void |
execute(java.lang.String in)
Parses and executes the input string. |
protected abstract void |
parseArguments(java.lang.String... args)
Parses the command-line arguments, specified by the user. |
protected void |
quit()
Quits the console mode. |
protected abstract Session |
session()
Returns the session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Context context
protected java.io.OutputStream out
protected boolean console
false
during execution.
protected Session session
protected boolean verbose
protected boolean newline
Constructor Detail |
---|
protected Main(java.lang.String[] args) throws java.io.IOException
args
- command-line arguments
java.io.IOException
- I/O exceptionprotected Main(java.lang.String[] args, Context ctx) throws java.io.IOException
args
- command-line argumentsctx
- database context, or null
java.io.IOException
- I/O exceptionMethod Detail |
---|
protected final void console()
protected void quit() throws java.io.IOException
java.io.IOException
- I/O exceptionprotected final void execute(java.lang.String in) throws java.io.IOException
in
- input commands
java.io.IOException
- database exceptionprotected final void execute(Command cmd, boolean info) throws java.io.IOException
cmd
- command to be runinfo
- verbose flag
java.io.IOException
- I/O exceptionprotected abstract Session session() throws java.io.IOException
java.io.IOException
- I/O exceptionprotected abstract void parseArguments(java.lang.String... args) throws java.io.IOException
args
- command-line arguments
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |