public class CliMain
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARG__CALLED_PLUGIN
The argument name for the called plugin
|
static java.lang.String |
ARG__CALLED_PLUGIN_SHORT
The argument name for the called plugin (short)
|
static java.lang.String |
ARG__DEBUG_FLAG
The argument name for debugging output
|
static java.lang.String |
ARG__DEBUG_FLAG_SHORT
The argument name for debugging output (short)
|
static java.lang.String |
ARG__INPUT_FILES
The argument name for the input file(s)
|
static java.lang.String |
ARG__INPUT_FILES_SHORT
The argument name for the input file(s) (short)
|
static java.lang.String |
ARG__OUTPUT_FILE
The argument name for the output file
|
static java.lang.String |
ARG__OUTPUT_FILE_SHORT
The argument name for the output file (short)
|
static java.lang.String |
HELPTEXT |
private static java.io.File[] |
inputFiles
the list of input files
|
private static java.lang.String |
outputFile
the output file
|
private static java.lang.String |
plugin
the called plugin
|
static java.lang.String |
TWEETY_CLI_DEFAULT_CONFIG |
Constructor and Description |
---|
CliMain() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.String> |
configCLI()
This method is meant to load the tweety plugin pathes on startup
|
static java.util.ArrayList<CommandParameter> |
instantiateParameters(TweetyPlugin tp,
java.util.ArrayList<java.util.ArrayList<java.lang.String>> inparams)
instantiates each given input parameter within the called plugin - if
possible
|
static void |
main(java.lang.String[] args) |
void |
printConfiguration()
This function allows to print the content of the current configuration
file.
|
static void |
printHelpText()
prints help text if cli is called with parameter "--help" or empty
argument array
|
void |
setConfigurationFilePath(java.lang.String path) |
void |
setHelptextPath(java.lang.String path) |
public static final java.lang.String HELPTEXT
public static final java.lang.String TWEETY_CLI_DEFAULT_CONFIG
public static final java.lang.String ARG__CALLED_PLUGIN
public static final java.lang.String ARG__CALLED_PLUGIN_SHORT
public static final java.lang.String ARG__INPUT_FILES
public static final java.lang.String ARG__INPUT_FILES_SHORT
public static final java.lang.String ARG__OUTPUT_FILE
public static final java.lang.String ARG__OUTPUT_FILE_SHORT
public static final java.lang.String ARG__DEBUG_FLAG
public static final java.lang.String ARG__DEBUG_FLAG_SHORT
private static java.lang.String plugin
private static java.io.File[] inputFiles
private static java.lang.String outputFile
public static void printHelpText()
public static java.util.Map<java.lang.String,java.lang.String> configCLI() throws org.apache.commons.configuration.ConfigurationException, java.io.FileNotFoundException
org.apache.commons.configuration.ConfigurationException
java.io.FileNotFoundException
public void printConfiguration()
public void setConfigurationFilePath(java.lang.String path)
path
- public void setHelptextPath(java.lang.String path)
path
- public static java.util.ArrayList<CommandParameter> instantiateParameters(TweetyPlugin tp, java.util.ArrayList<java.util.ArrayList<java.lang.String>> inparams) throws java.lang.CloneNotSupportedException
tp
- the called Tweety-Plugin Implementationinparams
- the parameter given as inputjava.lang.CloneNotSupportedException
- if the CommandParameter does not implement Cloneablepublic static void main(java.lang.String[] args)