Package org.terrier.applications
Class CLITool
- java.lang.Object
-
- org.terrier.applications.CLITool
-
- Direct Known Subclasses:
CLITool.CLIParsedCLITool
,JForestsCommand
,StructureMerger.Command
,TrecEvalEvaluation.Command
public abstract class CLITool extends java.lang.Object
CLITool is an abstract class for all classes that are Terrier commands. These can generally be easily run through the bin/terrier command script. To advertise a new functionality, list the class in the resources/META-INF/services/org.terrier.applications.CLITool file corresponding to your package.- Since:
- 5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CLITool.CLIParsedCLITool
static class
CLITool.HelpAliasCLITool
static class
CLITool.HelpCLITool
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PLATFORM_MODULE
static java.lang.String[]
POPULAR_COMMANDS
-
Constructor Summary
Constructors Constructor Description CLITool()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
commandaliases()
What short commands aliases should this command respond tojava.lang.String
commandname()
What commandname should this command respond tojava.lang.String
help()
Return a long message about how to use this commandjava.lang.String
helpsummary()
Returns a short sentence about what this command is forstatic void
main(java.lang.String[] args)
static void
run(java.lang.Class<? extends CLITool> clz, java.lang.String[] args)
abstract int
run(java.lang.String[] args)
static void
run(CLITool tool, java.lang.String[] args)
void
setConfiguration(java.lang.Object o)
java.lang.String
sourcepackage()
-
-
-
Field Detail
-
PLATFORM_MODULE
public static final java.lang.String PLATFORM_MODULE
- See Also:
- Constant Field Values
-
POPULAR_COMMANDS
public static java.lang.String[] POPULAR_COMMANDS
-
-
Method Detail
-
setConfiguration
public void setConfiguration(java.lang.Object o)
-
commandaliases
public java.util.Set<java.lang.String> commandaliases()
What short commands aliases should this command respond to
-
run
public abstract int run(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
commandname
public java.lang.String commandname()
What commandname should this command respond to
-
sourcepackage
public java.lang.String sourcepackage()
-
help
public java.lang.String help()
Return a long message about how to use this command
-
helpsummary
public java.lang.String helpsummary()
Returns a short sentence about what this command is for
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
run
public static void run(java.lang.Class<? extends CLITool> clz, java.lang.String[] args)
-
run
public static void run(CLITool tool, java.lang.String[] args)
-
-