Class AbstractApplication

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AbstractApplication.Par
      Parameterization class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Logging LOG
      We need a static logger in this class, for code used in "main" methods.
      private static java.lang.String NEWLINE
      The newline string according to system.
      static java.lang.String REFERENCE
      Information for citation and version.
      private static java.lang.String REFERENCE_VERSION
      Version number of the reference below.
      static java.lang.String VERSION
      Version information.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      private static void printDescription​(java.lang.Class<?> descriptionClass)
      Print the description for the given parameter
      protected static void printErrorMessage​(java.lang.Exception e)
      Print an error message for the given error.
      abstract void run()
      Runs the application.
      static void runCLIApplication​(java.lang.Class<?> cls, java.lang.String[] args)
      Generic command line invocation.
      static java.lang.String usage​(java.util.Collection<TrackedParameter> options)
      Returns a usage message, explaining all known options
      • Methods inherited from class java.lang.Object

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

      • LOG

        private static final Logging LOG
        We need a static logger in this class, for code used in "main" methods.
      • NEWLINE

        private static final java.lang.String NEWLINE
        The newline string according to system.
      • VERSION

        public static final java.lang.String VERSION
        Version information.
      • REFERENCE_VERSION

        private static final java.lang.String REFERENCE_VERSION
        Version number of the reference below.
        See Also:
        Constant Field Values
      • REFERENCE

        @Reference(authors="Erich Schubert",
                   title="Automatic Indexing for Similarity Search in ELKI",
                   booktitle="Int. Conf. Similarity Search and Applications",
                   url="https://doi.org/10.1007/978-3-031-17849-8_16",
                   bibkey="DBLP:conf/sisap/Schubert22")
        public static final java.lang.String REFERENCE
        Information for citation and version.
    • Constructor Detail

      • AbstractApplication

        public AbstractApplication()
        Constructor.
    • Method Detail

      • runCLIApplication

        public static void runCLIApplication​(java.lang.Class<?> cls,
                                             java.lang.String[] args)
        Generic command line invocation.

        Refactored to have a central place for outermost exception handling.

        Parameters:
        cls - Application class to run.
        args - the arguments to run this application with
      • usage

        public static java.lang.String usage​(java.util.Collection<TrackedParameter> options)
        Returns a usage message, explaining all known options
        Parameters:
        options - Options to show in usage.
        Returns:
        a usage message explaining all known options
      • printErrorMessage

        protected static void printErrorMessage​(java.lang.Exception e)
        Print an error message for the given error.
        Parameters:
        e - Error Exception.
      • printDescription

        private static void printDescription​(java.lang.Class<?> descriptionClass)
        Print the description for the given parameter
      • run

        public abstract void run()
        Runs the application.