Class WorkbookLocation

  • All Implemented Interfaces:
    Location, Comparable<Location>

    public class WorkbookLocation
    extends AbstractLocation
    Implementation of Location dedicated to workbooks.

    It can be used to designate:

    • A workbook: (systemId),
    • A sheet: (systemId, sheetName),
    • A column: (systemId, sheetName, columnName),
    • A row: (systemId, sheetName, rowNumber) or (systemId, sheetName, rowId),
    • Or a cell: (systemId, sheetName, columnName, rowNumber) or (systemId, sheetName, columnName, rowId).
    Note: A row can either be designated using a number or a functional id, but not using both solutions.
    Note: A valid row number is > 0.
    Author:
    Damien Carbonne
    • Constructor Detail

      • WorkbookLocation

        protected WorkbookLocation​(String systemId,
                                   String sheetName,
                                   int rowNumber,
                                   String rowId,
                                   String columnName)
    • Method Detail

      • getTag

        public String getTag()
        Returns:
        The string used to identify the implementation of this interface. It is used in serialization.
        See Also:
        Locations
      • getPath

        public String getPath()
        Returns:
        The external part of the location, the path of the designated resource.
        It is typically a file name, an URI, a kind of 'absolute' identifier.
      • getAnchor

        public String getAnchor()
        Returns:
        The internal part of the location, inside the resource. It may be null.
      • getSystemId

        public String getSystemId()
        Returns:
        The system id of this location.
      • getSheetName

        public String getSheetName()
        Returns:
        The sheet name, possibly null, of this location.
      • getRowNumber

        public int getRowNumber()
        Returns:
        The row number, possibly <= 0, of this location.
      • getRowId

        public String getRowId()
        Returns:
        The row id, possibly null, of this location.
      • getColumnName

        public String getColumnName()
        Returns:
        The column name, possibly null, of this location.
      • hasSheetData

        public boolean hasSheetData()
        Returns:
        true if this location contains sheet data.
      • hasRowNumberData

        public boolean hasRowNumberData()
        Returns:
        true if this location contains row number data.
      • hasRowIdData

        public boolean hasRowIdData()
        Returns:
        true if this location contains row id data.
      • hasRowData

        public boolean hasRowData()
        Returns:
        true if this location contains row data.
      • hasColumnData

        public boolean hasColumnData()
        Returns:
        true if this location contains column data.
      • isWorkbookLocation

        public boolean isWorkbookLocation()
        Returns:
        true if this location designates a workbook.
      • isSheetLocation

        public boolean isSheetLocation()
        Returns:
        true if this location designates a sheet.
      • isColumnLocation

        public boolean isColumnLocation()
        Returns:
        true if this location designates a column.
      • isRowLocation

        public boolean isRowLocation()
        Returns:
        true if this location designates a row.
      • isCellLocation

        public boolean isCellLocation()
        Returns:
        true if this location designates a cell.