Xindice API
version 1.1b3

org.apache.xindice.tools
Class XMLTools

java.lang.Object
  |
  +--org.apache.xindice.tools.XMLTools

public class XMLTools
extends java.lang.Object

XMLAdmin is designed to take command line arguments and give user Xindice management flexibility within the current Database.

Version:
CVS $Revision: 1.26 $, $Date: 2003/08/16 03:00:19 $

Field Summary
static java.lang.String ACTION
           
static java.lang.String AUTO_KEY
           
static java.lang.String COLLECTION
           
protected  org.w3c.dom.NodeList commandsList
           
static java.lang.String DB_CONFIG
           
static java.lang.String DB_SERVER
           
static java.lang.String EXTENSION
           
static java.lang.String FILE_PATH
           
static java.lang.String HOST
           
static java.lang.String IMPL_CLASS
           
static java.lang.String LOCAL
           
protected  java.lang.String location
           
static java.lang.String MAX_KEY_SIZE
           
static java.lang.String NAME_OF
           
static java.lang.String NAMESPACES
           
static java.lang.String PAGE_SIZE
           
static java.lang.String PASSWORD
           
static java.lang.String PATTERN
           
static java.lang.String PORT
           
static java.lang.String QUERY
           
static java.lang.String TYPE
           
static java.lang.String URI
           
static java.lang.String USER
           
static java.lang.String VERBOSE
           
 
Constructor Summary
XMLTools()
          Constructor for XMLTools, includes default variables for the command line
 
Method Summary
 boolean execute()
          This method is to carry out execution, after instance variables being setup by process( args )
 java.lang.String getAction()
          getAction returns the action type that will be passed to the command line tool.
 java.lang.String getCollectionName()
          getCollectionName returns the collection name that will be passed to the command line tool.
protected  org.w3c.dom.NodeList getCommands()
          Returns the elements from the Commands Document this tool can execute.
protected  org.w3c.dom.Document getCommandsDocument()
          Returns the Commands Document use for configuration.
 java.lang.String getDatabaseServer()
          getDatabaseServer returns the Database server that will be passed to the command line tool.
 java.lang.String getDocumentName()
          getDocumentName returns the document that will be passed to the command line tool.
 java.lang.String getFilePath()
          getFilePath returns the file path that will be passed to the command
 java.lang.String getHost()
          getPort returns the host that will be passed to the command line tool.
 java.lang.String getImplementClass()
          getImplementClass returns the implmented class path that will be passed to the command line tool.
 java.lang.String getName()
          getName returns the name for XMLObjects that will be passed to the command line tool.
 java.lang.String getPassword()
          getPassword returns the password that will be passed to the command line tool and will be used in conjunction with the userName value.
 java.lang.String getPort()
          getPort returns the port that will be passed to the command line tool.
 java.lang.String getQuery()
          getQuery returns the Query for Document passed to the command line tool.
 java.lang.String getURI()
          getURI gets returns the database URI (protocol://host:port/name) that will be passed to the command line tool
 java.lang.String getUser()
          getUser returns the user that will be passed to the command line tool and will be used in Security issues.
 boolean handleOption(java.lang.String option, ArgTokenizer at)
           
 void init()
          Carries out necessary initialization of this class.
protected  void initCommandsDocument()
          Carries out the initialization of the Commands Document.
protected  void initCommandsList()
           
 boolean isAdmin()
          Return true if this class has admin access
static void main(java.lang.String[] args)
           
protected  void parseArguments(java.lang.String[] args)
          Parses and validated the arguments of the command line.
 void printHelp()
           
 void process(java.lang.String[] args)
          The Process function is designed for the implementation of the command line tools, as well as, making the command line easier to use.
 void setAction(java.lang.String actionType)
          setAction sets the action type that will be passed to the command line.
 void setCollectionName(java.lang.String collectionName)
          setCollectionName sets the collection name that will be passed to the command line.
 void setDatabaseServer(java.lang.String appName)
          setDatabaseServer sets the Database server name that will be passed to the command line tool.
 void setDocumentName(java.lang.String documentName)
          setDocumentName sets the document that will be passed to the command line tool.
 void setFilePath(java.lang.String fPath)
          setFilePath sets the file path that will passed to the command line tool.
 void setHost(java.lang.String hostName)
          setHost sets the host that will passed to the command line tool.
 void setImplementClass(java.lang.String imClassName)
          setImplementClass sets the implemented class path that will be passed to the command line tool.
 void setName(java.lang.String name)
          setName sets the name for XMLObjects passed to the command line tool.
 void setPassword(java.lang.String pswd)
          setPassword sets the password that will be passed to the command line tool and will be used in conjunction with the userName value.
 void setPort(java.lang.String portName)
          setPort sets the port that will passed to the command line tool.
 void setQuery(java.lang.String query)
          setQuery sets the Query variable for Document Query from the command line.
 void setURI(java.lang.String URI)
          setURI sets the database URI (protocol://host:port/name) that will be passed to the command line
 void setUser(java.lang.String userName)
          setUser sets the user that will be passed to the command line tool and will be used in Security issues.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLLECTION

public static final java.lang.String COLLECTION

EXTENSION

public static final java.lang.String EXTENSION

FILE_PATH

public static final java.lang.String FILE_PATH

ACTION

public static final java.lang.String ACTION

NAME_OF

public static final java.lang.String NAME_OF

PATTERN

public static final java.lang.String PATTERN

QUERY

public static final java.lang.String QUERY

URI

public static final java.lang.String URI

VERBOSE

public static final java.lang.String VERBOSE

TYPE

public static final java.lang.String TYPE

PAGE_SIZE

public static final java.lang.String PAGE_SIZE

MAX_KEY_SIZE

public static final java.lang.String MAX_KEY_SIZE

DB_SERVER

public static final java.lang.String DB_SERVER

PORT

public static final java.lang.String PORT

HOST

public static final java.lang.String HOST

USER

public static final java.lang.String USER

LOCAL

public static final java.lang.String LOCAL

DB_CONFIG

public static final java.lang.String DB_CONFIG

PASSWORD

public static final java.lang.String PASSWORD

AUTO_KEY

public static final java.lang.String AUTO_KEY

NAMESPACES

public static final java.lang.String NAMESPACES

IMPL_CLASS

public static final java.lang.String IMPL_CLASS

location

protected java.lang.String location

commandsList

protected org.w3c.dom.NodeList commandsList
Constructor Detail

XMLTools

public XMLTools()
Constructor for XMLTools, includes default variables for the command line
Method Detail

main

public static void main(java.lang.String[] args)

initCommandsList

protected void initCommandsList()

isAdmin

public boolean isAdmin()
Return true if this class has admin access

init

public void init()
          throws XindiceException,
                 java.io.FileNotFoundException
Carries out necessary initialization of this class.

initCommandsDocument

protected void initCommandsDocument()
                             throws XindiceException,
                                    java.io.FileNotFoundException
Carries out the initialization of the Commands Document.

getCommandsDocument

protected org.w3c.dom.Document getCommandsDocument()
Returns the Commands Document use for configuration.

getCommands

protected org.w3c.dom.NodeList getCommands()
Returns the elements from the Commands Document this tool can execute.

process

public void process(java.lang.String[] args)
             throws XindiceException,
                    java.lang.Exception
The Process function is designed for the implementation of the command line tools, as well as, making the command line easier to use.

parseArguments

protected void parseArguments(java.lang.String[] args)
                       throws java.lang.IllegalArgumentException
Parses and validated the arguments of the command line. The arguments are stored into the table array.
Throws:
java.lang.IllegalArgumentException - if an error is found

execute

public boolean execute()
                throws java.lang.Exception
This method is to carry out execution, after instance variables being setup by process( args )

handleOption

public boolean handleOption(java.lang.String option,
                            ArgTokenizer at)

setAction

public void setAction(java.lang.String actionType)
setAction sets the action type that will be passed to the command line.
Parameters:
actionType - The action value

getAction

public java.lang.String getAction()
getAction returns the action type that will be passed to the command line tool.
Returns:
The action value

setCollectionName

public void setCollectionName(java.lang.String collectionName)
setCollectionName sets the collection name that will be passed to the command line.
Parameters:
collectionName - The collection value

getCollectionName

public java.lang.String getCollectionName()
getCollectionName returns the collection name that will be passed to the command line tool.
Returns:
The collection value

setDocumentName

public void setDocumentName(java.lang.String documentName)
setDocumentName sets the document that will be passed to the command line tool.
Parameters:
documentName - The docName value

getDocumentName

public java.lang.String getDocumentName()
getDocumentName returns the document that will be passed to the command line tool.
Returns:
The docName value

setQuery

public void setQuery(java.lang.String query)
setQuery sets the Query variable for Document Query from the command line.
Parameters:
query - - The query string

getQuery

public java.lang.String getQuery()
getQuery returns the Query for Document passed to the command line tool.

setName

public void setName(java.lang.String name)
setName sets the name for XMLObjects passed to the command line tool.
Parameters:
name - The docName value

getName

public java.lang.String getName()
getName returns the name for XMLObjects that will be passed to the command line tool.
Returns:
The nameOf value

setDatabaseServer

public void setDatabaseServer(java.lang.String appName)
setDatabaseServer sets the Database server name that will be passed to the command line tool.
Parameters:
appName - The dbServ value

getDatabaseServer

public java.lang.String getDatabaseServer()
getDatabaseServer returns the Database server that will be passed to the command line tool.
Returns:
The dbServ value

setPort

public void setPort(java.lang.String portName)
setPort sets the port that will passed to the command line tool.
Parameters:
portName - The port value

getPort

public java.lang.String getPort()
getPort returns the port that will be passed to the command line tool.
Returns:
The port value

setHost

public void setHost(java.lang.String hostName)
setHost sets the host that will passed to the command line tool.
Parameters:
hostName - The host value

getHost

public java.lang.String getHost()
getPort returns the host that will be passed to the command line tool.
Returns:
The host value

setFilePath

public void setFilePath(java.lang.String fPath)
setFilePath sets the file path that will passed to the command line tool.
Parameters:
fPath - The filePath value

getFilePath

public java.lang.String getFilePath()
getFilePath returns the file path that will be passed to the command
Returns:
The filePath value

setURI

public void setURI(java.lang.String URI)
setURI sets the database URI (protocol://host:port/name) that will be passed to the command line
Parameters:
URI - The URI for the database

getURI

public java.lang.String getURI()
getURI gets returns the database URI (protocol://host:port/name) that will be passed to the command line tool
Returns:
The URI for the database

setImplementClass

public void setImplementClass(java.lang.String imClassName)
setImplementClass sets the implemented class path that will be passed to the command line tool.
Parameters:
imClassName - The implClass value

getImplementClass

public java.lang.String getImplementClass()
getImplementClass returns the implmented class path that will be passed to the command line tool.
Returns:
The implClass value

setUser

public void setUser(java.lang.String userName)
setUser sets the user that will be passed to the command line tool and will be used in Security issues.
Parameters:
userName - The user value

getUser

public java.lang.String getUser()
getUser returns the user that will be passed to the command line tool and will be used in Security issues.
Returns:
The user value

setPassword

public void setPassword(java.lang.String pswd)
setPassword sets the password that will be passed to the command line tool and will be used in conjunction with the userName value.
Parameters:
pswd - The passwrd value

getPassword

public java.lang.String getPassword()
getPassword returns the password that will be passed to the command line tool and will be used in conjunction with the userName value.
Returns:
The password value

printHelp

public void printHelp()

Xindice API
version 1.1b3

Copyright (c) 1999-2003 The Apache Software Foundation. All Rights Reserved.