Xindice API
version 1.1

org.apache.xindice.tools
Class XMLTools

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

public class XMLTools
extends Object

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

Version:
$Revision: 533255 $, $Date: 2007-04-27 19:27:10 -0400 (Fri, 27 Apr 2007) $

Field Summary
static String ACTION
           
static String AUTO_KEY
           
static String COLLECTION
           
static String COMMAND_LIST
           
static String DB_CONFIG
           
static String DB_SERVER
           
static String EXTENSION
           
static String FILE_PATH
           
static String FILER
           
static String HOST
           
static String IMPL_CLASS
           
static String LOCAL
           
static String MAX_KEY_SIZE
           
static String NAME_OF
           
static String NAMESPACES
           
static String PAGE_COUNT
           
static String PAGE_SIZE
           
static String PASSWORD
           
static String PATTERN
           
static String PORT
           
static String QUERY
           
static String TYPE
           
static String URI
           
static String USER
           
static 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 )
 String getAction()
          getAction returns the action type that will be passed to the command line tool.
 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.
 String getDatabaseServer()
          getDatabaseServer returns the Database server that will be passed to the command line tool.
 String getDocumentName()
          getDocumentName returns the document that will be passed to the command line tool.
 String getFilePath()
          getFilePath returns the file path that will be passed to the command
 String getHost()
          getPort returns the host that will be passed to the command line tool.
 String getImplementClass()
          getImplementClass returns the implmented class path that will be passed to the command line tool.
 String getName()
          getName returns the name for XMLObjects that will be passed to the command line tool.
 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.
 String getPort()
          getPort returns the port that will be passed to the command line tool.
 String getQuery()
          getQuery returns the Query for Document passed to the command line tool.
 String getURI()
          getURI gets returns the database URI (protocol://host:port/name) that will be passed to the command line tool
 String getUser()
          getUser returns the user that will be passed to the command line tool and will be used in Security issues.
 boolean handleOption(String option, ArgTokenizer at)
           
 void init()
          Carries out necessary initialization of this class.
 boolean isVerbose()
           
static void main(String[] args)
           
protected  void parseArguments(String[] args)
          Parses and validated the arguments of the command line.
 void process(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(String actionType)
          setAction sets the action type that will be passed to the command line.
 void setCollectionName(String collectionName)
          setCollectionName sets the collection name that will be passed to the command line.
 void setDatabaseServer(String appName)
          setDatabaseServer sets the Database server name that will be passed to the command line tool.
 void setDocumentName(String documentName)
          setDocumentName sets the document that will be passed to the command line tool.
 void setFilePath(String fPath)
          setFilePath sets the file path that will passed to the command line tool.
 void setHost(String hostName)
          setHost sets the host that will passed to the command line tool.
 void setImplementClass(String imClassName)
          setImplementClass sets the implemented class path that will be passed to the command line tool.
 void setName(String name)
          setName sets the name for XMLObjects passed to the command line tool.
 void setPassword(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(String portName)
          setPort sets the port that will passed to the command line tool.
 void setQuery(String query)
          setQuery sets the Query variable for Document Query from the command line.
 void setURI(String URI)
          setURI sets the database URI (protocol://host:port/name) that will be passed to the command line
 void setUser(String userName)
          setUser sets the user that will be passed to the command line tool and will be used in Security issues.
 void setVerbose(boolean verbose)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLLECTION

public static final String COLLECTION

FILER

public static final String FILER

EXTENSION

public static final String EXTENSION

FILE_PATH

public static final String FILE_PATH

ACTION

public static final String ACTION

NAME_OF

public static final String NAME_OF

PATTERN

public static final String PATTERN

QUERY

public static final String QUERY

URI

public static final String URI

VERBOSE

public static final String VERBOSE

TYPE

public static final String TYPE

PAGE_SIZE

public static final String PAGE_SIZE

MAX_KEY_SIZE

public static final String MAX_KEY_SIZE

DB_SERVER

public static final String DB_SERVER

PORT

public static final String PORT

HOST

public static final String HOST

USER

public static final String USER

LOCAL

public static final String LOCAL

DB_CONFIG

public static final String DB_CONFIG

PASSWORD

public static final String PASSWORD

AUTO_KEY

public static final String AUTO_KEY

NAMESPACES

public static final String NAMESPACES

IMPL_CLASS

public static final String IMPL_CLASS

COMMAND_LIST

public static final String COMMAND_LIST

PAGE_COUNT

public static final String PAGE_COUNT
Constructor Detail

XMLTools

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

main

public static void main(String[] args)

init

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

getCommands

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

process

public void process(String[] args)
             throws XindiceException
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(String[] args)
                       throws IllegalArgumentException
Parses and validated the arguments of the command line. The arguments are stored into the table array.
Throws:
IllegalArgumentException - if an error is found

execute

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

handleOption

public boolean handleOption(String option,
                            ArgTokenizer at)

setVerbose

public void setVerbose(boolean verbose)
Parameters:
verbose - new value of verbose mode

isVerbose

public boolean isVerbose()
Returns:
true if operating in verbose mode

setAction

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

getAction

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

setCollectionName

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

getCollectionName

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

setDocumentName

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

getDocumentName

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

setQuery

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

getQuery

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

setName

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

getName

public 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(String appName)
setDatabaseServer sets the Database server name that will be passed to the command line tool.
Parameters:
appName - The dbServ value

getDatabaseServer

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

setPort

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

getPort

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

setHost

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

getHost

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

setFilePath

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

getFilePath

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

setURI

public void setURI(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 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(String imClassName)
setImplementClass sets the implemented class path that will be passed to the command line tool.
Parameters:
imClassName - The implClass value

getImplementClass

public 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(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 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(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 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

Xindice API
version 1.1

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