Class SVGReportOutput

java.lang.Object
org.faceless.publisher.output.svg.SVGReportOutput
All Implemented Interfaces:
org.faceless.publisher.output.ReportCanvasContext, ReportOutput

public class SVGReportOutput extends Object
A ReportOutput that writes the output to one or more SVG files.
  • Constructor Details

    • SVGReportOutput

      public SVGReportOutput()
  • Method Details

    • addDataList

      public void addDataList(String id, List<String> data)
    • write

      public void write(OutputStream out) throws IOException

      Write the SVG output to the specified stream. If an OutputHandler has been set, that will be used instead and the OutputStream supplied to this method will be ignored.

      Otherwise, if the "pagination" method specifies individual pages, they will be written to the supplied OutputStream as as zip file. Other pagination methods will generate a single SVG file written to the supplied OutputStream.

      Parameters:
      out - the OutputStream to write to.
      Throws:
      IOException - if generated when writing.
    • setOutputHandler

      public void setOutputHandler(SVGReportOutput.OutputHandler handler)
      Set an SVGReportOutput.OutputHandler for this SVGOutputStream. An OutputHandler may be specified to customize the way the SVG is written, allowing individual pages to be written to individual OutputStreams.
      Parameters:
      handler - the OutputHandler to use, or null to use the default
      See Also:
    • getOutputHandler

      public SVGReportOutput.OutputHandler getOutputHandler()
      Returns:
      the OutputHandler, or null if the default is used.
      See Also:
    • getMediaType

      public MediaType getMediaType()
      Description copied from interface: ReportOutput
      Return the type of object that would be written by ReportOutput.write(java.io.OutputStream), or if that method doesn't apply, the type of Media generated by this ReportOutput.
    • isPageBlank

      public boolean isPageBlank()
      Description copied from interface: ReportOutput
      Return true if the current page is blank
      Specified by:
      isPageBlank in interface ReportOutput
    • markPage

      public void markPage()
      Description copied from interface: ReportOutput
      Record that this page is not blank
      Specified by:
      markPage in interface org.faceless.publisher.output.ReportCanvasContext
      Specified by:
      markPage in interface ReportOutput