Class AbstractDungWriter

  • Direct Known Subclasses:
    ApxWriter, CnfWriter, TgfWriter

    public abstract class AbstractDungWriter
    extends java.lang.Object
    Writes an abstract argumentation framework into a file of a specific format.
    Author:
    Matthias Thimm
    • Method Summary

      Modifier and Type Method Description
      static AbstractDungWriter getWriter​(FileFormat f)
      Retrieves the writer for the given file format.
      abstract void write​(DungTheory aaf, java.io.File f)
      Writes the given file into an abstract argumentation framework
      static java.lang.String writeArguments​(java.util.Collection<Argument> args)
      Writes the given collection of arguments into a string of the form [arg1,...,argn].
      static java.lang.String writeLabeling​(Labeling l)
      Writes a labeling in the form [[IN1,...,INM],[OUT1,...,OUTN],[UNDEC1,...,UNDECM]]
      • Methods inherited from class java.lang.Object

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

      • AbstractDungWriter

        public AbstractDungWriter()
    • Method Detail

      • getWriter

        public static AbstractDungWriter getWriter​(FileFormat f)
        Retrieves the writer for the given file format.
        Parameters:
        f - some file format
        Returns:
        a writer or null if the format is not supported.
      • writeArguments

        public static java.lang.String writeArguments​(java.util.Collection<Argument> args)
        Writes the given collection of arguments into a string of the form [arg1,...,argn].
        Parameters:
        args - some collection of arguments
        Returns:
        a string representation of the collection of arguments
      • writeLabeling

        public static java.lang.String writeLabeling​(Labeling l)
        Writes a labeling in the form [[IN1,...,INM],[OUT1,...,OUTN],[UNDEC1,...,UNDECM]]
        Parameters:
        l - some labeling
        Returns:
        a string representing the labeling.
      • write

        public abstract void write​(DungTheory aaf,
                                   java.io.File f)
                            throws java.io.IOException
        Writes the given file into an abstract argumentation framework
        Parameters:
        aaf - an abstract argumentation framework
        f - the file that will be overwritten.
        Throws:
        java.io.IOException - for all errors concerning file reading/writing.