Class 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
    • 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 to
      java.lang.String commandname()
      What commandname should this command respond to
      java.lang.String help()
      Return a long message about how to use this command
      java.lang.String helpsummary()
      Returns a short sentence about what this command is for
      static 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • POPULAR_COMMANDS

        public static java.lang.String[] POPULAR_COMMANDS
    • Constructor Detail

      • CLITool

        public CLITool()
    • 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)