Class ReportWriter

java.lang.Object
be.kuleuven.cs.distrinet.sparta.io.ReportWriter

public class ReportWriter extends Object
  • Constructor Details

    • ReportWriter

      public ReportWriter()
  • Method Details

    • setAird

      public void setAird(File aird)
      Optionally supply the Sirius .aird representations file so the System-description chapter can include the Data Flow Diagram, reusing the layout the user arranged. Headless: the file is read as plain XML (see AirdLayout), so this works in the standalone CLI as well as the RCP. When null or unreadable, the diagram is simply omitted.
    • performExport

      public void performExport(File path, ResourceSet model, List<? extends Threat> threats) throws IOException
      Generate the LaTeX report under path.
      Throws:
      IOException - if any part of the export fails. The export aborts on the first failure rather than writing to an already-failed stream, and the exception is propagated so callers can surface it to the user instead of producing a silently partial report.
    • writeDescriptionToFile

      public void writeDescriptionToFile(BufferedWriter fw) throws IOException
      Throws:
      IOException
    • writeThreatCatalogToFile

      public void writeThreatCatalogToFile(BufferedWriter fw) throws IOException
      Throws:
      IOException
    • output

      protected static void output(BufferedWriter fw, String format) throws IOException
      Throws:
      IOException