Module omix.api

Interface Table

All Known Subinterfaces:
HHeaderTable, HHeaderTable, HVHeadersTable, HVHeadersTable, Table, VHeaderTable, VHeaderTable

public interface Table
This interface represents a table in the data manager sidebar.
Since:
Omix 1.8.5
Author:
Dr. Peter Droste
  • Method Details

    • getIdentifier

      String getIdentifier()
      The identifier of the table. Each table has a unique identifier in a data source.
      Returns:
      identifier
      See Also:
      DataManager.getTable(String, String), DataManager.getTableIDs(String)
    • getSourceIdentifier

      String getSourceIdentifier()
      The identifier of the table's data source. Each data source has a unique identifier in the data manager.
      Returns:
      identifier
      See Also:
      DataManager.getTable(String, String), DataManager.getTableIDs(String)
    • rows

      int rows()
      returns the number of table rows.
      Returns:
      rows
    • columns

      int columns()
      returns the number of table columns.
      Returns:
      rows
    • getValue

      @IsVarType Object getValue​(int row, int column)
      returns the content of a cell accessed by column and row index if available, otherwise null.
      Parameters:
      row - index
      column - index
      Returns:
      cell content
    • getColumn

      List<@IsVarType Object> getColumn​(int column)
      returns the content of a column accessed by index if available, otherwise null.
      Parameters:
      column - index
      Returns:
      column content as list
    • getRow

      List<@IsVarType Object> getRow​(int row)
      returns the content of a row accessed by index if available, otherwise null.
      Parameters:
      row - index
      Returns:
      row content as list
    • getColumn

      List<@IsVarType Object> getColumn​(int column, int startRow, int lastRow)
      returns the content of a column accessed by index if available, otherwise null.
      Parameters:
      column - index
      startRow -
      lastRow -
      Returns:
      column content as list
    • getRow

      List<@IsVarType Object> getRow​(int row, int startColumn, int lastColumn)
      returns the content of a row accessed by index if available, otherwise null.
      Parameters:
      row - index
      startColumn -
      lastColumn -
      Returns:
      row content as list
    • transposed

      Table transposed()
      Returns the transposed table matrix of the current table. The returned table is a new object which does no longer represent the actual table representation in the data manager sidebar, i.e. getSelection() will always return an empty list.
      Returns:
      transposed table
    • toHorizontalHeaderTable

      HHeaderTable toHorizontalHeaderTable()
      Returns a table with a horizontal header.
      1. If the original table is already a HHeaderTable, the table itself is returned.
      2. If the table is a plain table the first data row is used as horizontal header, i.e. all original rows r must now be accessed by a decreased index r-1.
      3. If the table is a VHeaderTable the vertical header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1. The first data row is used as horizontal header, i.e. all original rows r must now be accessed by a decreased index r-1.
      4. If the table is a HVHeadersTable the vertical header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1.
      Except in case 1, the returned table is a new object which does no longer represent the actual table representation in the data manager sidebar, i.e. getSelection() will always return an empty list.
      Returns:
      HHeaderTable
    • toVerticalHeaderTable

      VHeaderTable toVerticalHeaderTable()
      Returns a table with a vertical header.
      1. If the original table is already a VHeaderTable, the table itself is returned.
      2. If the table is a plain table the first data column is used as vertical header, i.e. all original columns c must now be accessed by a decreased index c-1.
      3. If the table is a HVHeadersTable the horizontal header is inserted as first data row, i.e. all original rows r must now be accessed by an increased index r+1.
      4. If the table is a HHeaderTable the horizontal header is inserted as first data row, i.e. all original rows r must now be accessed by an increased index r+1. The first data column is used as vertical header, i.e. all original columns c must now be accessed by a decreased index c-1.
      Except in case 1, the returned table is a new object which does no longer represent the actual table representation in the data manager sidebar, i.e. getSelection() will always return an empty list.
      Returns:
      HHeaderTable
    • toHVHeadersTable

      HVHeadersTable toHVHeadersTable()
      Returns a table with horizontal and vertical header.
      1. If the original table is already a HVHeadersTable, the table itself is returned.
      2. If the table is a plain table the first data row is used as horizontal header and the first column as vertical header, i.e. all original rows r and columns c must now be accessed by decreased indexes [r-1, c-1]. The cell [0,0] of the original table is skipped at all.
      3. If the table is a HHeaderTable the first column is used as vertical header, i.e. all original columns c must now be accessed by a decreased index c-1. The first column label of the original table is skipped at all.
      Except in case 1, the returned table is a new object which does no longer represent the actual table representation in the data manager sidebar, i.e. getSelection() will always return an empty list.
      Returns:
      HVHeadersTable
    • toPlainTable

      Table toPlainTable()
      Returns a table without headers.
      1. If the original table is already plain, the table itself is returned.
      2. If the table is a HHeaderTable the horizontal header is inserted as first data row, i.e. all original rows r must now be accessed by an increased index r+1.
      3. If the table is a VHeaderTable the vertical header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1.
      4. If the table is a HVHeadersTable, additionally, the vertically header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1.
      Except in case 1, the returned table is a new object which does no longer represent the actual table representation in the data manager sidebar, i.e. getSelection() will always return an empty list.
      Returns:
      plain table
    • getSelection

      List<Table.SelectedContent> getSelection()
      Returns the current selection in the table.
      Returns:
      list of Table.SelectedContent objects.