Class CSVReportBuilder

java.lang.Object
ca.phon.query.report.ReportBuilder
ca.phon.query.report.csv.CSVReportBuilder

public class CSVReportBuilder extends ReportBuilder
CSV report builder implementation.
  • Field Details

  • Constructor Details

    • CSVReportBuilder

      public CSVReportBuilder()
  • Method Details

    • getPropertyNames

      public String[] getPropertyNames()
      Description copied from class: ReportBuilder
      Returns a list of property names used for configuring the builder. The properties are presented as options in the report wizard.
      Overrides:
      getPropertyNames in class ReportBuilder
      Returns:
      propNames
    • getPropertyClass

      public Class<?> getPropertyClass(String propName)
      Description copied from class: ReportBuilder
      Returns the value type for the given property name. NOTE: Only Boolean and String values are supported by the report wizard.
      Overrides:
      getPropertyClass in class ReportBuilder
      Returns:
      the class of the property value
    • getPropertyMessage

      public String getPropertyMessage(String propName)
      Description copied from class: ReportBuilder
      Returns the UI message associated with a property name returned by getPropertyNames()
      Overrides:
      getPropertyMessage in class ReportBuilder
      Returns:
      the UI message
    • getPropertyDefault

      public Object getPropertyDefault(String propName)
      Description copied from class: ReportBuilder
      Get the default value for the given property name.
      Overrides:
      getPropertyDefault in class ReportBuilder
      Returns:
      the default property value. This MUST be of the type returned by getPropertyClass(propName)
    • buildReport

      public void buildReport(ReportDesign design, Project project, Query query, ResultSet[] resultSets, OutputStream stream) throws ReportBuilderException
      TODO Datasources should be given as indirect dependencies since we can re-use them for other report builders. Perhaps a global object can be created to keep track of created datasources so they can still be lazilly generated.
      Specified by:
      buildReport in class ReportBuilder
      Parameters:
      design - the report design
      project - the phon project
      resultSets - the selected searches to report on
      stream - the output file
      Throws:
      ReportBuilderException
    • isIndentContent

      public boolean isIndentContent()
      Should we indent content
    • isPrintSectionNames

      public boolean isPrintSectionNames()
    • getMimetype

      public String getMimetype()
      Description copied from class: ReportBuilder
      Get the mimetype created by this report builder.
      Specified by:
      getMimetype in class ReportBuilder
      Returns:
      report mimetype
    • getFileExtension

      public String getFileExtension()
      Description copied from class: ReportBuilder
      Get the default extension for the report
      Specified by:
      getFileExtension in class ReportBuilder
      Returns:
      default extension
    • getDisplayName

      public String getDisplayName()
      Description copied from class: ReportBuilder
      Get the display name for the builder.
      Specified by:
      getDisplayName in class ReportBuilder
      Returns:
      display name