Package org.tweetyproject.cli.plugins
Class CliMain
java.lang.Object
org.tweetyproject.cli.plugins.CliMain
skeleton of the new main method of this CLI using plugins.
- Author:
- Bastian Wolf
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe argument name for the called pluginstatic final StringThe argument name for the called plugin (short)static final StringThe argument name for debugging outputstatic final StringThe argument name for debugging output (short)static final StringThe argument name for the input file(s)static final StringThe argument name for the input file(s) (short)static final StringThe argument name for the output filestatic final StringThe argument name for the output file (short)static final Stringstatic final String
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionThis method is meant to load the tweety plugin pathes on startupstatic ArrayList<CommandParameter>instantiateParameters(TweetyPlugin tp, ArrayList<ArrayList<String>> inparams) instantiates each given input parameter within the called plugin - if possiblestatic voidvoidThis function allows to print the content of the current configuration file.static voidprints help text if cli is called with parameter "--help" or empty argument arrayvoidvoidsetHelptextPath(String path) 
- 
Field Details- 
HELPTEXT- See Also:
 
- 
TWEETY_CLI_DEFAULT_CONFIG- See Also:
 
- 
ARG__CALLED_PLUGINThe argument name for the called plugin- See Also:
 
- 
ARG__CALLED_PLUGIN_SHORTThe argument name for the called plugin (short)- See Also:
 
- 
ARG__INPUT_FILESThe argument name for the input file(s)- See Also:
 
- 
ARG__INPUT_FILES_SHORTThe argument name for the input file(s) (short)- See Also:
 
- 
ARG__OUTPUT_FILEThe argument name for the output file- See Also:
 
- 
ARG__OUTPUT_FILE_SHORTThe argument name for the output file (short)- See Also:
 
- 
ARG__DEBUG_FLAGThe argument name for debugging output- See Also:
 
- 
ARG__DEBUG_FLAG_SHORTThe argument name for debugging output (short)- See Also:
 
 
- 
- 
Constructor Details- 
CliMainpublic CliMain()
 
- 
- 
Method Details- 
printHelpTextpublic static void printHelpText()prints help text if cli is called with parameter "--help" or empty argument array
- 
configCLIpublic static Map<String,String> configCLI() throws org.apache.commons.configuration.ConfigurationException, FileNotFoundExceptionThis method is meant to load the tweety plugin pathes on startup- Returns:
- an object with one or more pluginpathes
- Throws:
- org.apache.commons.configuration.ConfigurationException- if there is an issue with the configuration
- FileNotFoundException- if the file could not be found
 
- 
printConfigurationpublic void printConfiguration()This function allows to print the content of the current configuration file. It consists of pairs of each available plugin an its path.
- 
setConfigurationFilePath
- 
setHelptextPath
- 
instantiateParameterspublic static ArrayList<CommandParameter> instantiateParameters(TweetyPlugin tp, ArrayList<ArrayList<String>> inparams) throws CloneNotSupportedException instantiates each given input parameter within the called plugin - if possible- Parameters:
- tp- the called Tweety-Plugin Implementation
- inparams- the parameter given as input
- Returns:
- an ArrayList of instantiated CommandParameter
- Throws:
- CloneNotSupportedException- if the CommandParameter does not implement Cloneable
 
- 
main
 
-