Xindice API
version 1.2m1

org.apache.xindice.tools
Class XMLTools

java.lang.Object
  extended byorg.apache.xindice.tools.XMLTools

public class XMLTools
extends Object

XMLTools parses command line arguments and executes corresponding command to give user Xindice management flexibility within the current Database.

Version:
$Revision: 593003 $, $Date: 2007-11-07 22:12:23 -0500 (Wed, 07 Nov 2007) $

Nested Class Summary
static class XMLTools.Action
           
static class XMLTools.Config
           
 
Field Summary
static String ACTION
           
static String COLLECTION
           
static String COMMAND_LIST
           
static String DB_CONFIG
           
static String EXTENSION
           
static String FILE_PATH
           
static String FILER
           
static String HELP
           
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 PATTERN
           
static String QUERY
           
static String TYPE
           
static String VERBOSE
           
 
Constructor Summary
XMLTools()
          Constructor for XMLTools, includes default variables for the command line.
XMLTools(XMLTools.Config config)
          Constructor for XMLTools based on existing Config.
 
Method Summary
 boolean execute()
          This method is to carry out execution, after instance variables being setup by process( args )
protected  List getCommands()
          Returns the elements from the Commands Document this tool can execute.
 void init()
          Carries out necessary initialization of this class.
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.
 
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
See Also:
Constant Field Values

FILER

public static final String FILER
See Also:
Constant Field Values

EXTENSION

public static final String EXTENSION
See Also:
Constant Field Values

FILE_PATH

public static final String FILE_PATH
See Also:
Constant Field Values

ACTION

public static final String ACTION
See Also:
Constant Field Values

NAME_OF

public static final String NAME_OF
See Also:
Constant Field Values

PATTERN

public static final String PATTERN
See Also:
Constant Field Values

QUERY

public static final String QUERY
See Also:
Constant Field Values

VERBOSE

public static final String VERBOSE
See Also:
Constant Field Values

HELP

public static final String HELP
See Also:
Constant Field Values

TYPE

public static final String TYPE
See Also:
Constant Field Values

PAGE_SIZE

public static final String PAGE_SIZE
See Also:
Constant Field Values

MAX_KEY_SIZE

public static final String MAX_KEY_SIZE
See Also:
Constant Field Values

LOCAL

public static final String LOCAL
See Also:
Constant Field Values

DB_CONFIG

public static final String DB_CONFIG
See Also:
Constant Field Values

NAMESPACES

public static final String NAMESPACES
See Also:
Constant Field Values

COMMAND_LIST

public static final String COMMAND_LIST
See Also:
Constant Field Values

PAGE_COUNT

public static final String PAGE_COUNT
See Also:
Constant Field Values
Constructor Detail

XMLTools

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


XMLTools

public XMLTools(XMLTools.Config config)
Constructor for XMLTools based on existing Config.

Method Detail

main

public static void main(String[] args)

init

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

Throws:
XindiceException
FileNotFoundException

getCommands

protected List 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.

Throws:
XindiceException

parseArguments

protected void parseArguments(String[] args)
                       throws IllegalArgumentException
Parses and validated the arguments of the command line. The arguments are stored into the Config object.

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 )

Throws:
Exception

Xindice API
version 1.2m1

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