Class SVGReportOutput

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

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
    • getEnvironmentAsString

      default String getEnvironmentAsString(String name, String dflt)
    • getEnvironmentAsStringList

      default List<String> getEnvironmentAsStringList(String name, List<String> dflt)
    • getEnvironmentAsInt

      default Integer getEnvironmentAsInt(String name, Integer dflt)
    • getEnvironmentAsURL

      default URL2 getEnvironmentAsURL(String name, URL2 dflt)
    • getEnvironmentAsBoolean

      default Boolean getEnvironmentAsBoolean(String name, Boolean dflt)
    • getEnvironmentAsFloat

      default Float getEnvironmentAsFloat(String name, Float dflt)
    • getEnvironmentAsFloatOrInf

      default Float getEnvironmentAsFloatOrInf(String name, Float dflt)
    • getEnvironmentAsLength

      default org.faceless.publisher.type.Length getEnvironmentAsLength(String name, org.faceless.publisher.type.Length dflt)
    • getEnvironmentAsResolution

      default Float getEnvironmentAsResolution(String name, Float dflt)
    • getEnvironmentAsResolutionOrInf

      default Float getEnvironmentAsResolutionOrInf(String name, Float dflt)
    • getEnvironmentAsTime

      default Float getEnvironmentAsTime(String name, Float dflt)
    • getEnvironmentAsColor

      default org.faceless.publisher.type.CSSColor getEnvironmentAsColor(String name, org.faceless.publisher.type.CSSColor dflt)