Class ExcelRenderer
java.lang.Object
io.goobi.viewer.model.annotation.export.ExcelRenderer
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateDataRow(CrowdsourcingAnnotation annotation, org.apache.poi.xssf.usermodel.XSSFSheet sheet, int rowCounter) voidcreateDataRows(org.apache.poi.xssf.usermodel.XSSFSheet sheet, List<CrowdsourcingAnnotation> annotations) voidcreateHeaderRow(org.apache.poi.xssf.usermodel.XSSFSheet sheet) org.apache.poi.xssf.usermodel.XSSFWorkbookrender(Map<String, List<CrowdsourcingAnnotation>> annotationMap)
-
Constructor Details
-
ExcelRenderer
- 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 toannotations- 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 rowsheet- the Excel sheet to create the row inrowCounter- 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
-