Class ExcelRenderer

java.lang.Object
io.goobi.viewer.model.annotation.export.ExcelRenderer

public class ExcelRenderer extends Object
Renders CrowdsourcingAnnotation records into an XLSX workbook, grouping annotations by sheet name and writing one row per annotation with columns for ID, record, page, campaign, author, and body value.
  • Constructor Details

    • ExcelRenderer

      public ExcelRenderer(AnnotationConverter annotationConverter)
      Parameters:
      annotationConverter - converter used to deserialize annotations into typed objects
  • Method Details

    • render

      public org.apache.poi.xssf.usermodel.XSSFWorkbook render(Map<String,List<CrowdsourcingAnnotation>> annotationMap)
      Parameters:
      annotationMap - map of sheet names to their annotation lists
      Returns:
      XSSFWorkbook
    • createDataRows

      public void createDataRows(org.apache.poi.xssf.usermodel.XSSFSheet sheet, List<CrowdsourcingAnnotation> annotations)
      Parameters:
      sheet - the Excel sheet to append data rows to
      annotations - list of annotations to write as rows
    • createDataRow

      public void createDataRow(CrowdsourcingAnnotation annotation, org.apache.poi.xssf.usermodel.XSSFSheet sheet, int rowCounter) throws DAOException
      Parameters:
      annotation - the annotation whose data is written into the row
      sheet - the Excel sheet to create the row in
      rowCounter - 0-based index of the row to create
      Throws:
      DAOException
    • createHeaderRow

      public void createHeaderRow(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
      Parameters:
      sheet - the Excel sheet to create the header row in