Class TextReportFormatter

java.lang.Object
noaa.coastwatch.util.TextReportFormatter
All Implemented Interfaces:
ReportFormatter

public class TextReportFormatter extends Object implements ReportFormatter
The TextReportFormatter class formats report data to raw text.
Since:
3.7.1
Author:
Peter Hollemans
  • Constructor Details

    • TextReportFormatter

      protected TextReportFormatter()
  • Method Details

    • create

      public static TextReportFormatter create()
    • getContent

      public String getContent()
      Gets the text content.
      Returns:
      the text content.
    • start

      public void start()
      Description copied from interface: ReportFormatter
      Starts the report.
      Specified by:
      start in interface ReportFormatter
    • title

      public void title(String text)
      Description copied from interface: ReportFormatter
      Formats a report title.
      Specified by:
      title in interface ReportFormatter
      Parameters:
      text - the title of the report.
    • section

      public void section(String title)
      Description copied from interface: ReportFormatter
      Formats a section header.
      Specified by:
      section in interface ReportFormatter
      Parameters:
      title - the title of the section.
    • paragraph

      public void paragraph(String text)
      Description copied from interface: ReportFormatter
      Formats a paragraph.
      Specified by:
      paragraph in interface ReportFormatter
      Parameters:
      text - the text of the paragraph.
    • line

      public void line(String text)
      Description copied from interface: ReportFormatter
      Formats a single line.
      Specified by:
      line in interface ReportFormatter
      Parameters:
      text - the text of the line.
    • table

      public void table(String[] columns, List<String[]> rows)
      Description copied from interface: ReportFormatter
      Formats a table.
      Specified by:
      table in interface ReportFormatter
      Parameters:
      columns - the column names.
      rows - the list of row data values.
    • table

      public void table(String[] columns, Map<String,List<String[]>> rowMap)
      Description copied from interface: ReportFormatter
      Formats a table with multiple sections.
      Specified by:
      table in interface ReportFormatter
      Parameters:
      columns - the column names.
      rowMap - the map of section names to row data values.
    • map

      public void map(Map<String,String> map)
      Description copied from interface: ReportFormatter
      Formats a map of keys to values as a table with two columns.
      Specified by:
      map in interface ReportFormatter
      Parameters:
      map - the map of keys to values.
    • end

      public void end()
      Description copied from interface: ReportFormatter
      Ends the report.
      Specified by:
      end in interface ReportFormatter