Class AbstractTweetyPlugin

  • All Implemented Interfaces:
    TweetyPlugin, net.xeoh.plugins.base.Plugin

    public abstract class AbstractTweetyPlugin
    extends Object
    implements TweetyPlugin
    This abstract class implements the TweetyPlugin interface and provides a base for plugin implementations in each project
    Author:
    Bastian Wolf
    • Constructor Detail

      • AbstractTweetyPlugin

        public AbstractTweetyPlugin()
    • Method Detail

      • getCommand

        public abstract String getCommand()
        returns the command this plugin is called with
        Specified by:
        getCommand in interface TweetyPlugin
        Returns:
        the keyword used in the cli to call this plugin
      • execute

        public abstract PluginOutput execute​(File[] input,
                                             CommandParameter[] params)
        executes the given input
        Specified by:
        execute in interface TweetyPlugin
        Parameters:
        input - files to be used within the plugin
        params - parameter handled in the plugin (e.g. desired output file, iterations...)
        Returns:
        the output resulted after the execution
      • addParameter

        public void addParameter​(CommandParameter cmdParameter)
        adds new command parameter to this plugin
        Parameters:
        cmdParameter - the command parameter to be added
      • validateParameter

        public CommandParameter validateParameter​(String s)
                                           throws CloneNotSupportedException
        checks, whether each command parameter given with the plugin call is valid within is this plugin
        Parameters:
        s - the given parameter string
        Returns:
        a newly instantiated command parameter with the given value
        Throws:
        CloneNotSupportedException - if cloning is not supported