Interface Table

  • All Known Implementing Classes:
    TableWrapper

    public interface Table
    Interface to create and handle a Table in OMERO.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void addRow​(java.lang.Object... os)
      Adds a row to the table.
      default void addRows​(Client client, ResultsTable results, java.lang.Long imageId, java.util.Collection<? extends Roi> ijRois)
      Adds rows from an ImageJ ResultsTable.
      void addRows​(Client client, ResultsTable results, java.lang.Long imageId, java.util.Collection<? extends Roi> ijRois, java.lang.String roiProperty)
      Adds rows from an ImageJ ResultsTable.
      TableData createTable()
      Creates the corresponding TableData object.
      int getColumnCount()
      Returns the number of columns in the table.
      java.lang.String getColumnName​(int column)
      Returns the name of the column.
      TableDataColumn[] getColumns()
      Gets the TableDataColumn which contains information on each column of the table
      java.lang.Class<?> getColumnType​(int column)
      Returns the type of the column.
      java.lang.Object[][] getData()
      Gets the value contained in the table
      java.lang.Object getData​(int x, int y)
      Gets a certain value of the table
      java.lang.Long getFileId()
      Returns the fileId of the table.
      java.lang.Long getId()
      Returns the table ID.
      java.lang.String getName()
      Returns the name of the table.
      int getRowCount()
      Returns the number of rows in the table.
      boolean isComplete()
      Checks if the table is complete
      void saveAs​(java.lang.String path, char delimiter)
      Saves the current table as a character-delimited text file.
      void setColumn​(int column, java.lang.String columnName, java.lang.Class<?> type)
      Sets the information about a certain column.
      void setFileId​(java.lang.Long fileId)
      Sets the fileId of the table.
      void setId​(java.lang.Long id)
      Sets the id of the table.
      void setName​(java.lang.String name)
      Sets the name of the table.
      void setRowCount​(int rowCount)
      Sets the number of row in the table.
      void truncateRow()
      Deletes all unused row in the table
    • Method Detail

      • addRows

        default void addRows​(Client client,
                             ResultsTable results,
                             java.lang.Long imageId,
                             java.util.Collection<? extends Roi> ijRois)
                      throws ServiceException,
                             AccessException,
                             java.util.concurrent.ExecutionException
        Adds rows from an ImageJ ResultsTable.
        Parameters:
        client - The client handling the connection.
        results - An ImageJ results table.
        imageId - An image ID.
        ijRois - A list of ImageJ Rois.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • addRows

        void addRows​(Client client,
                     ResultsTable results,
                     java.lang.Long imageId,
                     java.util.Collection<? extends Roi> ijRois,
                     java.lang.String roiProperty)
              throws ServiceException,
                     AccessException,
                     java.util.concurrent.ExecutionException
        Adds rows from an ImageJ ResultsTable.
        Parameters:
        client - The client handling the connection.
        results - An ImageJ results table.
        imageId - An image ID.
        ijRois - A list of ImageJ Rois.
        roiProperty - The Roi property storing the local ROI index/label. Defaults to ROI.IJ_PROPERTY if null or empty.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getData

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

        java.lang.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

        java.lang.Long getFileId()
        Returns the fileId of the table.
        Returns:
        See above.
      • setFileId

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

        java.lang.Long getId()
        Returns the table ID.
        Returns:
        See above.
      • setId

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

        java.lang.String getName()
        Returns the name of the table.
        Returns:
        See above.
      • setName

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

        int getColumnCount()
        Returns the number of columns in the table.
        Returns:
        See above.
      • getColumnName

        java.lang.String getColumnName​(int column)
        Returns the name of the column.
        Parameters:
        column - Column number.
        Returns:
        See above.
      • getColumnType

        java.lang.Class<?> getColumnType​(int column)
        Returns the type of the column.
        Parameters:
        column - Column number.
        Returns:
        See above.
      • getRowCount

        int getRowCount()
        Returns the number of rows in the table.
        Returns:
        See above.
      • setRowCount

        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

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

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

        void addRow​(java.lang.Object... os)
        Adds a row to the table.
        Parameters:
        os - Value for each column for the row.
        Throws:
        java.lang.IndexOutOfBoundsException - Table is not initialized or already full.
        java.lang.IllegalArgumentException - Incorrect argument number.
      • truncateRow

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

        TableData createTable()
        Creates the corresponding TableData object.
        Returns:
        See above.
      • saveAs

        void saveAs​(java.lang.String path,
                    char delimiter)
             throws java.io.FileNotFoundException,
                    java.io.UnsupportedEncodingException
        Saves the current table as a character-delimited text file.
        Parameters:
        path - The path to the file where the table will be saved.
        delimiter - The character used to specify the boundary between columns.
        Throws:
        java.io.FileNotFoundException - The requested file cannot be written.
        java.io.UnsupportedEncodingException - If the UTF8 charset is not supported.