Class TableWrapper


  • public class TableWrapper
    extends Object
    Class containing the information to create a Table in OMERO.

    The TableData itself is not contained, only the elements to create it, because once created the TableData cannot be altered.

    To get the TableData corresponding to the elements contained use createTable.

    • Method Detail

      • toString

        public String toString()
        Overridden to return the name of the class and the object id.
        Overrides:
        toString in class Object
      • getData

        public Object[][] getData()
        Gets the value contained in the table
        Returns:
        the value contained in the table.
      • getData

        public Object getData​(int x,
                              int y)
        Gets a certain value of the table
        Parameters:
        x - Row position.
        y - Column position.
        Returns:
        the value at position data[y][x].
      • getFileId

        public Long getFileId()
        Returns:
        fileId of the table.
      • setFileId

        public void setFileId​(Long fileId)
        Sets the fileId of the table.
        Parameters:
        fileId - New fileId.
      • getId

        public Long getId()
        Returns:
        id of the table.
      • setId

        public void setId​(Long id)
        Sets the id of the table.
        Parameters:
        id - New id.
      • getName

        public String getName()
        Returns:
        name of the table.
      • setName

        public void setName​(String name)
        Sets the name of the table.
        Parameters:
        name - New name.
      • getColumnCount

        public int getColumnCount()
        Returns:
        number of column in the table.
      • getColumnName

        public String getColumnName​(int column)
        Parameters:
        column - Column number.
        Returns:
        The name of the column.
      • getColumnType

        public Class<?> getColumnType​(int column)
        Parameters:
        column - Column number.
        Returns:
        The type of the column.
      • getRowCount

        public int getRowCount()
        Returns:
        number of row in the table.
      • setRowCount

        public void setRowCount​(int rowCount)
        Sets the number of row in the table. Copies already existing data if some were already in the data
        Parameters:
        rowCount - New rowCount.
      • isComplete

        public boolean isComplete()
        Checks if the table is complete
        Returns:
        true if the table is completed, false if some rows are still empty.
      • setColumn

        public void setColumn​(int column,
                              String columnName,
                              Class<?> type)
        Sets the information about a certain column.
        Parameters:
        column - Column number.
        columnName - Name of the column.
        type - Type of the column.
        Throws:
        IndexOutOfBoundsException - Column number is bigger than actual number of column in the table.
      • truncateRow

        public void truncateRow()
        Deletes all unused row in the table
      • createTable

        public TableData createTable()