package gw.rating.rtm.excel uses gw.api.locale.DisplayKey uses org.apache.poi.ss.usermodel.Cell uses org.apache.poi.xssf.usermodel.XSSFSheet uses gw.lang.Deprecated @ReadOnly enhancement RatingSheetEnhancement: XSSFSheet { property get RateTableColumnCount() : int { return this.getRow(ExcelHeader.RATE_TABLE_HEADER_END_ROW).LastCellNum } property get nonDisplayColumnCount() : int { var total = RateTableColumnCount for (cell in this.getRow(ExcelHeader.RATE_TABLE_HEADER_END_ROW).cellIterator()) { if (cell.CellComment.String.String != null and cell.CellComment.String.String.contains(DisplayKey.get("Web.Rating.Export.DisplayOnly"))) { total-- } } return total } property get IsRateBookOverview() : boolean { // not a rate book if : // the PolicyCenter version is not specified var pcVersionRow = this.getRow(ExcelHeader.RATE_BOOK_PC_VERSION_ROW) var pcVersionCell = pcVersionRow?.getCell(0) if (pcVersionCell?.CellType != Cell.CELL_TYPE_STRING or pcVersionCell.StringCellValue != DisplayKey.get("Web.Rating.RateBooks.PolicyCenterVersion") or pcVersionRow.getCell(1)?.RawValue == null) { return false } // the language code is different or not specified var localeRow = this.getRow(ExcelHeader.RATE_BOOK_LOCALE_ROW) if (localeRow?.getCell(0)?.StringCellValue != DisplayKey.get("Web.Rating.RateBooks.Locale") or localeRow.getCell(1)?.RawValue == null) { return false } // the section header rate book details is not defined if (this.getRow(ExcelHeader.RATE_BOOK_RBD_SECTION_HEADER_ROW)?.getCell(0)?.StringCellValue != DisplayKey.get("Web.Rating.Export.RateBookDetailWorksheetName")) { return false } return true } property get IsRateTable() : boolean { // not a rate table if : // the PolicyCenter version is not specified var pcVersionRow = this.getRow(ExcelHeader.RATE_TABLE_PC_VERSION_ROW) var pcVersionCell = pcVersionRow?.getCell(0) if (pcVersionCell?.CellType != Cell.CELL_TYPE_STRING or pcVersionCell.StringCellValue != DisplayKey.get("Web.Rating.RateBooks.PolicyCenterVersion") or pcVersionRow.getCell(1)?.RawValue == null) { return false } // the language code is different or not specified var localeRow = this.getRow(ExcelHeader.RATE_TABLE_LOCALE_ROW) if (localeRow?.getCell(0)?.StringCellValue != DisplayKey.get("Web.Rating.RateBooks.Locale") or localeRow.getCell(1)?.RawValue == null) { return false } // code is not in defined var codeRow = this.getRow(ExcelHeader.RATE_TABLE_CODE_ROW) if (codeRow?.getCell(0)?.StringCellValue != DisplayKey.get("Web.Rating.RateTables.Code") or codeRow.getCell(1)?.RawValue == null) { return false } return true } property get IsRateRoutine() : boolean { // not a rate routine if : // the PolicyCenter version is not specified var pcVersionRow = this.getRow(ExcelHeader.RATE_ROUTINE_PC_VERSION_ROW) var pcVersionCell = pcVersionRow?.getCell(1) if (pcVersionCell?.CellType != Cell.CELL_TYPE_STRING or pcVersionCell.StringCellValue != DisplayKey.get("Web.Rating.RateBooks.PolicyCenterVersion") or pcVersionRow.getCell(1)?.RawValue == null) { return false } // the language code is different or not specified var localeRow = this.getRow(ExcelHeader.RATE_ROUTINE_LOCALE_ROW) if (localeRow?.getCell(1)?.StringCellValue != DisplayKey.get("Web.Rating.RateBooks.Locale") or localeRow.getCell(2)?.RawValue == null) { return false } // the routine code is not defined var codeRow = this.getRow(ExcelHeader.RATE_ROUTINE_CODE_ROW) if (codeRow?.getCell(1)?.StringCellValue != DisplayKey.get("Web.Rating.RateRoutines.Code") or codeRow.getCell(2)?.RawValue == null) { return false } return true } @Deprecated(:value="ExcelHeader does not nbeed to be accessed with a getInstance method",:version="PC 9.0.0") property get ExcelHeader() : ExcelHeader { return ExcelHeader.getInstance() } }