Class SpreadsheetRow

  • Direct Known Subclasses:
    ExcelRow, GSRow

    public abstract class SpreadsheetRow
    extends Object
    This class represents a row of a worksheet. A row must always belong to a worksheet.
    Author:
    Martins Francis
    • Method Detail

      • getVisibleCellValue

        public abstract String getVisibleCellValue​(SpreadsheetColumn column)
        The purpose of this method is to return the visible value stored by the given cell. The 'visible value' means the value stored by the cell and observed when the row is viewed in the spreadsheet. This means any worksheet metadata shall be disregarded by this method.
        Parameters:
        column -
        Returns:
        the visible value of the cell
      • getAllVisibleCellValues

        public List<String> getAllVisibleCellValues​(SpreadsheetColumn column,
                                                    boolean trim)
        The purpose of this method is to return all visible values of the given cell. This means that cell multiplicity is accounted for when reading the cell however any other worksheet metadata information is disregarded. Whitespace around every cell value is removed before it is returned if specified to do so.
        Parameters:
        column -
        trim -
        Returns:
        all visible values stored in the cell
      • getAllVisibleCellValuesAsIs

        public List<String> getAllVisibleCellValuesAsIs​(SpreadsheetColumn column)
        This method returns a list of every value contained by the cell.
        Parameters:
        column -
        Returns:
        cell values
      • getAllVisibleCellValues

        public List<String> getAllVisibleCellValues​(SpreadsheetColumn column)
        This method returns a list of every value contained by the cell. Each value is trimmed before adding to the list.
        Parameters:
        column -
        Returns:
        cell values, trimmed
      • overwriteCellValue

        public abstract void overwriteCellValue​(SpreadsheetColumn column,
                                                String value)
        The purpose of this method is to overwrite the value of the cell.
        Parameters:
        column -
        value - the new value of the cell
      • writeVisibleCellValues

        public void writeVisibleCellValues​(SpreadsheetColumn column,
                                           List<String> valuesToWrite)
        The purpose of this method is to write the given values to the given cell. If the column may contain multiple values then each value from the list is separated by column's delimiter before writing to the cell. If the column may contain only one value then only the first value from the list is written. Data type conformity is enforced if specified to do so in metadata configuration.
        Parameters:
        column -
        valuesToWrite -
      • writeManyVisibleValues

        protected void writeManyVisibleValues​(SpreadsheetColumn column,
                                              List<String> valuesToWrite)
        This method writes the given values to the cell. Data type conformity is enforced for each value if applicable.
        Parameters:
        column -
        valuesToWrite -
      • writeOneVisibleValue

        protected void writeOneVisibleValue​(SpreadsheetColumn column,
                                            String valueToWrite)
        This method writes the given value to the cell. Data type conformity is enforced if applicable.
        Parameters:
        column -
        valueToWrite -