Class CliMain


  • public class CliMain
    extends Object
    skeleton of the new main method of this CLI using plugins.
    Author:
    Bastian Wolf
    • Constructor Detail

      • CliMain

        public CliMain()
    • Method Detail

      • printHelpText

        public static void printHelpText()
        prints help text if cli is called with parameter "--help" or empty argument array
      • configCLI

        public static Map<String,​String> configCLI()
                                                  throws org.apache.commons.configuration.ConfigurationException,
                                                         FileNotFoundException
        This 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
      • printConfiguration

        public 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

        public void setConfigurationFilePath​(String path)
      • setHelptextPath

        public void setHelptextPath​(String path)
      • instantiateParameters

        public static ArrayList<net.sf.tweety.plugin.parameter.CommandParameter> instantiateParameters​(net.sf.tweety.plugin.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

        public static void main​(String[] args)