Package elki.application
Class AbstractApplication
- java.lang.Object
-
- elki.application.AbstractApplication
-
- Direct Known Subclasses:
AbstractDistanceBasedApplication
,CacheDoubleDistanceInOnDiskMatrix
,CacheDoubleDistanceKNNLists
,CacheDoubleDistanceRangeQueries
,CacheFloatDistanceInOnDiskMatrix
,ClassifierHoldoutEvaluationTask
,ConvertToBundleApplication
,EvaluateIntrinsicDimensionalityEstimators
,EvaluatePrecomputedOutlierScores
,GeneratorXMLSpec
,GreedyEnsembleExperiment
,KDDCLIApplication
,MiniGUI
,MultiStepGUI
,ORLibBenchmark
,PrecomputeDistancesAsciiApplication
,VisualizeGeodesicDistances
,VisualizePairwiseGainMatrix
public abstract class AbstractApplication extends java.lang.Object
AbstractApplication sets the values for flags verbose and help.Any Wrapper class that makes use of these flags may extend this class. Beware to make correct use of parameter settings via optionHandler as commented with constructor and methods.
- Since:
- 0.2
- Author:
- Elke Achtert, Erich Schubert
-
-
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.
-
Constructor Summary
Constructors Constructor Description AbstractApplication()
Constructor.
-
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 parameterprotected 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
-
-
-
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.
-
-
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.
-
-