@Test public void shouldReturnKeyCellMetaMapGivenTempSheet(){ Map<String, CellMeta> cells = util.parseTemplateVariables(tempSheet); assertThat(cells.get("facilityName").getName(), is("facilityName")); assertThat(cells.get("facilityName").getColumn(), is(0)); assertThat(cells.get("facilityName").isVariable(), is(true)); assertThat(cells.get("TEXT").getDisplay(), is("TEXT")); assertThat(cells.get("TEXT").isVariable(), is(false)); }
public Map<String, CellMeta> parseTemplateVariables(Sheet tempSheet) { Row variablesTemplate = tempSheet.getRow(1); Map<String, CellMeta> tempDataColumns = new HashMap<>(); Iterator<Cell> variables = variablesTemplate.cellIterator(); while (variables.hasNext()) { Cell rowCell = variables.next(); CellMeta cellMeta = parseCellMeta(rowCell); tempDataColumns.put(cellMeta.getName(), cellMeta); } return tempDataColumns; }
SingleListSheetExcelHandler extends ExcelHandler { public Map<String, CellMeta> parseTemplateVariables(Sheet tempSheet) { Row variablesTemplate = tempSheet.getRow(1); Map<String, CellMeta> tempDataColumns = new HashMap<>(); Iterator<Cell> variables = variablesTemplate.cellIterator(); while (variables.hasNext()) { Cell rowCell = variables.next(); CellMeta cellMeta = parseCellMeta(rowCell); tempDataColumns.put(cellMeta.getName(), cellMeta); } return tempDataColumns; } }
SingleListSheetExcelHandler extends ExcelHandler { public Map<String, CellMeta> parseTemplateVariables(Sheet tempSheet) { Row variablesTemplate = tempSheet.getRow(1); Map<String, CellMeta> tempDataColumns = new HashMap<>(); Iterator<Cell> variables = variablesTemplate.cellIterator(); while (variables.hasNext()) { Cell rowCell = variables.next(); CellMeta cellMeta = parseCellMeta(rowCell); tempDataColumns.put(cellMeta.getName(), cellMeta); } return tempDataColumns; }  }
SingleListSheetExcelHandler extends ExcelHandler { public Map<String, CellMeta> parseTemplateVariables(Sheet tempSheet) { Row variablesTemplate = tempSheet.getRow(1); Map<String, CellMeta> tempDataColumns = new HashMap<>(); Iterator<Cell> variables = variablesTemplate.cellIterator(); while (variables.hasNext()) { Cell rowCell = variables.next(); CellMeta cellMeta = parseCellMeta(rowCell); tempDataColumns.put(cellMeta.getName(), cellMeta); } return tempDataColumns; }  void createDataRows(Sheet tempSheet, List<Map<String, String>> dataList); Map<String, CellMeta> parseTemplateVariables(Sheet tempSheet); Cell createRowCell(CellMeta cellMeta, Map<String, String> data, Row dataRow); }
SingleListSheetExcelHandler extends ExcelHandler { public Map<String, CellMeta> parseTemplateVariables(Sheet tempSheet) { Row variablesTemplate = tempSheet.getRow(1); Map<String, CellMeta> tempDataColumns = new HashMap<>(); Iterator<Cell> variables = variablesTemplate.cellIterator(); while (variables.hasNext()) { Cell rowCell = variables.next(); CellMeta cellMeta = parseCellMeta(rowCell); tempDataColumns.put(cellMeta.getName(), cellMeta); } return tempDataColumns; }  void createDataRows(Sheet tempSheet, List<Map<String, String>> dataList); Map<String, CellMeta> parseTemplateVariables(Sheet tempSheet); Cell createRowCell(CellMeta cellMeta, Map<String, String> data, Row dataRow);  }