Class ReportHelper

java.lang.Object
ca.phon.query.db.ReportHelper

public class ReportHelper extends Object
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 Details

    • ReportHelper

      public ReportHelper()
  • Method Details

    • createResultString

      public static String createResultString(Result r)
      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

      public static String createResultSchemaString(Result r)
      Produces the schema for the given result (including all result values)
      Parameters:
      r -
      Returns:
    • createPrimaryResultString

      public static String createPrimaryResultString(Result r)
      Map the result to a string including only the primary result values.
      Parameters:
      result -
      Returns:
      s
    • getExtraResultValues

      public static List<ResultValue> getExtraResultValues(Result r)
      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

      public static String createReportString(String[] values, String resultType)
      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

      public static String createLinearReportString(String[] values)
    • createAlignedReportString

      public static String createAlignedReportString(String[] values)
    • createDetectorReportString

      public static String createDetectorReportString(String[] values)