Class CSVReportBuilder
java.lang.Object
ca.phon.query.report.ReportBuilder
ca.phon.query.report.csv.CSVReportBuilder
CSV report builder implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCSV line termstatic final StringCSV quote charstatic final StringCSV separator charstatic final StringFile Encodingstatic final StringProperty for indenting content at sections (default:false)static final StringProperty for printing section names (default:true)Fields inherited from class ca.phon.query.report.ReportBuilder
CANCEL_BUILD, TEMP_PROJECT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildReport(ReportDesign design, Project project, Query query, ResultSet[] resultSets, OutputStream stream) TODO Datasources should be given as indirect dependencies since we can re-use them for other report builders.Get the display name for the builder.Get the default extension for the reportGet the mimetype created by this report builder.Class<?> getPropertyClass(String propName) Returns the value type for the given property name.getPropertyDefault(String propName) Get the default value for the given property name.getPropertyMessage(String propName) Returns the UI message associated with a property name returned by getPropertyNames()String[]Returns a list of property names used for configuring the builder.booleanShould we indent contentbooleanMethods inherited from class ca.phon.query.report.ReportBuilder
buildReport, getProperty, isBuildCanceled, putProperty
-
Field Details
-
INDENT_CONTENT
Property for indenting content at sections (default:false)- See Also:
-
PRINT_SECTION_NAMES
Property for printing section names (default:true)- See Also:
-
CSV_SEP_CHAR
-
CSV_QUOTE_CHAR
-
CSV_LINE_TERM
-
FILE_ENCODING
-
-
Constructor Details
-
CSVReportBuilder
public CSVReportBuilder()
-
-
Method Details
-
getPropertyNames
Description copied from class:ReportBuilderReturns a list of property names used for configuring the builder. The properties are presented as options in the report wizard.- Overrides:
getPropertyNamesin classReportBuilder- Returns:
- propNames
-
getPropertyClass
Description copied from class:ReportBuilderReturns the value type for the given property name. NOTE: Only Boolean and String values are supported by the report wizard.- Overrides:
getPropertyClassin classReportBuilder- Parameters:
propName-- Returns:
- the class of the property value
-
getPropertyMessage
Description copied from class:ReportBuilderReturns the UI message associated with a property name returned by getPropertyNames()- Overrides:
getPropertyMessagein classReportBuilder- Parameters:
propName-- Returns:
- the UI message
-
getPropertyDefault
Description copied from class:ReportBuilderGet the default value for the given property name.- Overrides:
getPropertyDefaultin classReportBuilder- Parameters:
propName-- 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:
buildReportin classReportBuilder- Parameters:
design- the report designproject- the phon projectresultSets- the selected searches to report onstream- the output file- Throws:
ReportBuilderException
-
isIndentContent
public boolean isIndentContent()Should we indent content -
isPrintSectionNames
public boolean isPrintSectionNames() -
getMimetype
Description copied from class:ReportBuilderGet the mimetype created by this report builder.- Specified by:
getMimetypein classReportBuilder- Returns:
- report mimetype
-
getFileExtension
Description copied from class:ReportBuilderGet the default extension for the report- Specified by:
getFileExtensionin classReportBuilder- Returns:
- default extension
-
getDisplayName
Description copied from class:ReportBuilderGet the display name for the builder.- Specified by:
getDisplayNamein classReportBuilder- Returns:
- display name
-