opennlp.tools.cmdline
Class CmdLineTool

java.lang.Object
  extended by opennlp.tools.cmdline.CmdLineTool
Direct Known Subclasses:
BasicCmdLineTool, TypedCmdLineTool

public abstract class CmdLineTool
extends Object

Base class for all command line tools.


Constructor Summary
protected CmdLineTool()
           
 
Method Summary
protected
<T> String
getBasicHelp(Class<T>... argProxyInterfaces)
           
protected
<T> String
getBasicHelp(Class<T> argProxyInterface)
           
abstract  String getHelp()
          Retrieves a description on how to use the tool.
 String getName()
          Retrieves the name of the training data tool.
 String getShortDescription()
          Retrieves a short description of what the tool does.
 boolean hasParams()
          Returns whether the tool has any command line params.
protected
<T> T
validateAndParseParams(String[] args, Class<T> argProxyInterface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmdLineTool

protected CmdLineTool()
Method Detail

getName

public String getName()
Retrieves the name of the training data tool. The name (used as command) must not contain white spaces.

Returns:
the name of the command line tool

hasParams

public boolean hasParams()
Returns whether the tool has any command line params.

Returns:
whether the tool has any command line params

getBasicHelp

protected <T> String getBasicHelp(Class<T> argProxyInterface)

getBasicHelp

protected <T> String getBasicHelp(Class<T>... argProxyInterfaces)

getHelp

public abstract String getHelp()
Retrieves a description on how to use the tool.

Returns:
a description on how to use the tool

validateAndParseParams

protected <T> T validateAndParseParams(String[] args,
                                       Class<T> argProxyInterface)

getShortDescription

public String getShortDescription()
Retrieves a short description of what the tool does.

Returns:
a short description of what the tool does


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.