Package dev.roanh.gmark
Class OutputWriter
java.lang.Object
dev.roanh.gmark.OutputWriter
Class responsible for writing generated graphs
and queries to files.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
Writes the given string to the given file.static void
writeGeneratedQueries
(QuerySet queries, Path folder, List<ConcreteSyntax> syntaxes, boolean overwrite) Writes the given set of queries to the given folder.
-
Constructor Details
-
OutputWriter
private OutputWriter()Prevent instantiation.
-
-
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
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.
-