com.unitesk.atp.tree.tool
Class Tool

java.lang.Object
  extended by com.unitesk.atp.tool.PluginManagerClass
      extended by com.unitesk.atp.tool.Tool
          extended by com.unitesk.atp.tree.tool.Tool
All Implemented Interfaces:
PluginManager

public abstract class Tool
extends Tool
implements PluginManager

The framework of an application that processes Attributed Tree (AT). The inheritor must implement abstract methods parse(File), Tool.initName() and define method

public static void main( String[] args )
 {
     new MyTool().run( args );
 }

Version:
$Id: Tool.java,v 1.6 2005/06/01 06:40:22 all-x Exp $
Author:
Alexey Demakov

Field Summary
protected  Tree tree
           
 
Fields inherited from class com.unitesk.atp.tool.Tool
default_mbox_class, default_plugins_file_name, default_properties_file_name, mbox_class_property_name, plugins_file_name, plugins_file_property_name, plugins_file_status, properties_file_name, properties_file_property_name, properties_file_status, version
 
Fields inherited from class com.unitesk.atp.tool.PluginManagerClass
config, mbox, name, table
 
Constructor Summary
Tool()
           
 
Method Summary
 Object get(String name, Tree tree, Node node)
          
 Tree getTree()
          
protected  void onActionFinish(String name, Action action)
          Invoked before start of the action.
protected  void onActionStart(String name, Action action)
          Invoked before start of the action.
protected  void onParserFinish(String inputFileName)
          Invoked before start of parsing.
protected  void onParserStart(String inputFileName)
          Invoked before start of parsing.
protected  void onToolFinish()
          Invoked at finish of the tool.
protected  void onToolStart()
          Invoked at start of the tool.
protected abstract  void parse(File inputFile)
          Parses the input file and sets tree root node.
 void process(String name, Tree tree)
          
protected  int run(String[] args)
          Processes command line arguments.
 void setTree(Tree tree)
          
 
Methods inherited from class com.unitesk.atp.tool.Tool
findFile, getVersion, initConfig, initMessageBox, initName, initPluginsTable, usage
 
Methods inherited from class com.unitesk.atp.tool.PluginManagerClass
createPluginsTable, getMessageBox, getName, getPlugin, getPluginProperty, getPluginProperty, getPluginPropertyName, getProperty, getProperty, help, loadPlugins
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.unitesk.atp.tool.PluginManager
getMessageBox, getName, getPlugin, getPluginProperty, getPluginProperty, getPluginPropertyName
 

Field Detail

tree

protected Tree tree
Constructor Detail

Tool

public Tool()
Method Detail

parse

protected abstract void parse(File inputFile)
Parses the input file and sets tree root node.

See Also:
setTree( Tree ), getTree()

run

protected int run(String[] args)
Processes command line arguments.

Parameters:
args - The array of command line parameters from main() method.

getTree

public Tree getTree()


setTree

public void setTree(Tree tree)


process

public void process(String name,
                    Tree tree)


get

public Object get(String name,
                  Tree tree,
                  Node node)


onToolStart

protected void onToolStart()
Invoked at start of the tool. Prints out a name and a version of the tool.


onToolFinish

protected void onToolFinish()
Invoked at finish of the tool. Prints out statistics.


onParserStart

protected void onParserStart(String inputFileName)
Invoked before start of parsing. Prints out a name of the input file.

Parameters:
inputFileName - The name of the input file.

onParserFinish

protected void onParserFinish(String inputFileName)
Invoked before start of parsing. Does nothing.

Parameters:
inputFileName - The name of the input file.

onActionStart

protected void onActionStart(String name,
                             Action action)
Invoked before start of the action. Prints out a name and a version of the action.

Parameters:
name - The name of the action.
action - The action.

onActionFinish

protected void onActionFinish(String name,
                              Action action)
Invoked before start of the action. Does nothing.

Parameters:
name - The name of the action.
action - The action.


Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.