Class OutputWriter

java.lang.Object
dev.roanh.gmark.OutputWriter

public class OutputWriter extends Object
Class responsible for writing generated graphs and queries to files.
  • Constructor Details

    • OutputWriter

      public OutputWriter()
  • Method Details

    • writeGeneratedQueries

      public static void writeGeneratedQueries(QuerySet queries, Path folder, List<ConcreteSyntax> syntaxes, boolean overwrite) throws IOException
      Writes the given set of queries to the given folder.
      Parameters:
      queries - The queries to write.
      folder - The folder to write to, this folder has to exist.
      syntaxes - The concrete syntaxes to write.
      overwrite - True if existing files should be overwritten.
      Throws:
      IOException - When an IOException occurs.
    • write

      private static void write(Path file, String content, boolean overwrite) throws IOException
      Writes the given string to the given file.
      Parameters:
      file - The file to write to.
      content - The string to write to the file.
      overwrite - True if the file should be overwritten if it already exists.
      Throws:
      IOException - When an IOException occurs or when the given file already exists and overwriting is not enabled.