Class AbstractEafWriter

java.lang.Object
org.tweetyproject.arg.eaf.writer.AbstractEafWriter
Direct Known Subclasses:
EafApxWriter, EafCnfWriter, EafTgfWriter

public abstract class AbstractEafWriter extends Object
Abstract base class for writing EpistemicArgumentationFramework (EAF) instances to different file formats. Subclasses must implement the write method for specific formats. This class also provides a static factory method to retrieve a suitable writer for a given file format. Supported formats include: - TGF - Trivial Graph Format - APX - Argumentation Interchange Format (used by ASPARTIX) - CNF - Conjunctive Normal Form (logic-based encoding) Author: Sandra Hoffmann
  • Constructor Details

    • AbstractEafWriter

      public AbstractEafWriter()
      Standard constructor.
  • Method Details

    • getWriter

      public static AbstractEafWriter getWriter(FileFormat f)
      Returns an AbstractEafWriter instance for the specified file format.
      Parameters:
      f - the desired file format
      Returns:
      a writer for the format, or null if the format is not supported
    • write

      public abstract void write(EpistemicArgumentationFramework eaf, File f) throws IOException
      Writes the given epistemic argumentation framework to the specified file. If the file already exists, it will be overwritten.
      Parameters:
      eaf - the epistemic argumentation framework to be written
      f - the file to write to
      Throws:
      IOException - if an error occurs during file writing