Class AbstractTweetyPlugin

    • Method Summary

      Modifier and Type Method Description
      void addParameter​(CommandParameter cmdParameter)
      adds new command parameter to this plugin
      abstract PluginOutput execute​(java.io.File[] input, CommandParameter[] params)
      executes the given input
      abstract java.lang.String getCommand()
      returns the command this plugin is called with
      java.util.List<CommandParameter> getParameters()
      returns all possible parameters
      CommandParameter validateParameter​(java.lang.String s)
      checks, whether each command parameter given with the plugin call is valid within is this plugin
      java.util.ArrayList<CommandParameter> validateParameter​(java.util.ArrayList<java.lang.String> s)
      This method handels instantiations with array-lists instead of a simple string (e.g.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractTweetyPlugin

        public AbstractTweetyPlugin()
    • Method Detail

      • getCommand

        public abstract java.lang.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​(java.io.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
      • getParameters

        public java.util.List<CommandParameter> getParameters()
        returns all possible parameters
        Specified by:
        getParameters in interface TweetyPlugin
        Returns:
        parameters allowed with plugin calls
      • validateParameter

        public CommandParameter validateParameter​(java.lang.String s)
                                           throws java.lang.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:
        java.lang.CloneNotSupportedException - if cloning is not supported
      • validateParameter

        public java.util.ArrayList<CommandParameter> validateParameter​(java.util.ArrayList<java.lang.String> s)
                                                                throws java.lang.CloneNotSupportedException
        This method handels instantiations with array-lists instead of a simple string (e.g. for multi-argument parameter)
        Parameters:
        s - the ArrayList<String> containing the input parameter
        Returns:
        the newly instantiated command parameter with the given value
        Throws:
        java.lang.CloneNotSupportedException - if cloning is not supported