Package ca.phon.query.db
Class ReportHelper
java.lang.Object
ca.phon.query.db.ReportHelper
Various methods aiding report generation. Results have a schema, the schema determines
the format of the output string. The result schema may be one of the following:
- 'LINEAR' - result values are listed in order, spearated by ';'
- 'ALIGNED' - result values are listed in order, separated by '→'. Empty values will be displayed using a 'null' character.
- 'DETECTOR' - pair of aligned results, separated by '…'. Empty values will be displayed using a 'null' character.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
createAlignedReportString
(String[] values) static String
createDetectorReportString
(String[] values) static String
createLinearReportString
(String[] values) static String
Map the result to a string including only the primary result values.static String
createReportString
(String[] values, String resultType) Creates a report string for the given values.static String
Produces the schema for the given result (including all result values)static String
Map result to a String.static List<ResultValue>
Return a map of extra result values for the given result.
-
Constructor Details
-
ReportHelper
public ReportHelper()
-
-
Method Details
-
createResultString
Map result to a String. This function will include all results values (including tiers added using the 'add aligned groups/word' query options.- Parameters:
r
-- Returns:
-
createResultSchemaString
Produces the schema for the given result (including all result values)- Parameters:
r
-- Returns:
-
createPrimaryResultString
Map the result to a string including only the primary result values.- Parameters:
result
-- Returns:
- s
-
getExtraResultValues
Return a map of extra result values for the given result.- Parameters:
result
-- Returns:
- map of non-primary result values contained in the result
-
createReportString
Creates a report string for the given values. If aligned, the first two values are assumed to be aligned, with the rest forming a context to the right of the ';'.- Parameters:
values
-aligned
-- Returns:
- the generated report string
-
createLinearReportString
-
createAlignedReportString
-
createDetectorReportString
-