org.exist.client
Class InteractiveClient

java.lang.Object
  extended byorg.exist.client.InteractiveClient

public class InteractiveClient
extends java.lang.Object

Command-line client based on the XML:DB API.

Author:
wolf

Nested Class Summary
static class InteractiveClient.CollectionName
           
static class InteractiveClient.ProgressObserver
           
 
Field Summary
protected static int[] colSizes
           
protected  java.util.TreeSet completitions
           
protected static java.lang.String configuration
           
protected  Collection current
           
protected static java.util.Properties defaultProps
           
protected static java.lang.String driver
           
protected static java.lang.String EDIT_CMD
           
protected static java.lang.String ENCODING
           
protected  int filesCount
           
protected  ClientFrame frame
           
protected  int maxResults
           
protected  int nextInSet
           
protected static int PARALLEL_THREADS
           
protected static java.lang.String PASS
           
protected  java.lang.String path
           
protected  java.util.Properties properties
           
protected  boolean quiet
           
protected  boolean recurseDirs
           
protected  java.lang.String[] resources
           
protected  ResourceSet result
           
protected  boolean startGUI
           
protected  java.io.Writer traceWriter
           
protected static java.lang.String URI
           
protected static java.lang.String USER
           
protected  boolean verbose
           
 
Constructor Summary
InteractiveClient()
           
 
Method Summary
protected  void connect()
          Register XML:DB driver and retrieve root collection.
protected  void displayHelp()
          Display help on commands
protected  Collection getCollection()
          Returns the current collection.
protected  void getResources()
          Get list of resources contained in collection.
static void main(java.lang.String[] args)
          The main program for the InteractiveClient class.
protected  void more(java.lang.String str)
          Display document on screen.
protected  boolean parse(java.io.File[] files, org.exist.client.UploadDialog upload)
           
protected  boolean parse(java.lang.String fileName)
           
 void printNotice()
           
protected  boolean process(java.lang.String line)
          In interactive mode, process a line entered by the user.
 void readlineInputLoop(java.lang.String home, java.io.File history)
           
protected  XMLResource retrieve(java.lang.String resource)
           
protected  XMLResource retrieve(java.lang.String resource, java.lang.String indent)
           
 void run(java.lang.String[] args)
          Main processing method for the InteractiveClient object
protected  void shutdown(boolean force)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDIT_CMD

protected static java.lang.String EDIT_CMD

ENCODING

protected static java.lang.String ENCODING

PASS

protected static java.lang.String PASS

URI

protected static java.lang.String URI

USER

protected static java.lang.String USER

PARALLEL_THREADS

protected static int PARALLEL_THREADS

defaultProps

protected static java.util.Properties defaultProps

colSizes

protected static final int[] colSizes

driver

protected static java.lang.String driver

configuration

protected static java.lang.String configuration

completitions

protected java.util.TreeSet completitions

current

protected Collection current

nextInSet

protected int nextInSet

maxResults

protected int maxResults

path

protected java.lang.String path

properties

protected java.util.Properties properties

resources

protected java.lang.String[] resources

result

protected ResourceSet result

filesCount

protected int filesCount

quiet

protected boolean quiet

verbose

protected boolean verbose

recurseDirs

protected boolean recurseDirs

startGUI

protected boolean startGUI

traceWriter

protected java.io.Writer traceWriter

frame

protected ClientFrame frame
Constructor Detail

InteractiveClient

public InteractiveClient()
Method Detail

displayHelp

protected void displayHelp()
Display help on commands


main

public static void main(java.lang.String[] args)
The main program for the InteractiveClient class.

Parameters:
args - The command line arguments

connect

protected void connect()
                throws java.lang.Exception
Register XML:DB driver and retrieve root collection.

Throws:
java.lang.Exception - Description of the Exception

getCollection

protected Collection getCollection()
Returns the current collection.

Returns:
the current collection

getResources

protected void getResources()
                     throws XMLDBException
Get list of resources contained in collection.

Throws:
XMLDBException - Description of the Exception

more

protected void more(java.lang.String str)
Display document on screen.

Parameters:
str - Description of the Parameter

process

protected boolean process(java.lang.String line)
In interactive mode, process a line entered by the user.

Parameters:
line - the line entered
Returns:
true if command != quit

retrieve

protected final XMLResource retrieve(java.lang.String resource)
                              throws XMLDBException
Throws:
XMLDBException

retrieve

protected final XMLResource retrieve(java.lang.String resource,
                                     java.lang.String indent)
                              throws XMLDBException
Throws:
XMLDBException

parse

protected final boolean parse(java.lang.String fileName)
                       throws XMLDBException
Throws:
XMLDBException

parse

protected final boolean parse(java.io.File[] files,
                              org.exist.client.UploadDialog upload)
                       throws XMLDBException
Throws:
XMLDBException

run

public void run(java.lang.String[] args)
Main processing method for the InteractiveClient object

Parameters:
args - Description of the Parameter

readlineInputLoop

public void readlineInputLoop(java.lang.String home,
                              java.io.File history)

shutdown

protected final void shutdown(boolean force)

printNotice

public void printNotice()


Copyright (C) Wolfgang Meier. All rights reserved.