Package fr.igred.omero.annotations
Interface Table
-
- All Known Implementing Classes:
TableWrapper
public interface TableInterface to create and handle a Table in OMERO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddRow(java.lang.Object... os)Adds a row to the table.default voidaddRows(Client client, ResultsTable results, java.lang.Long imageId, java.util.Collection<? extends Roi> ijRois)Adds rows from an ImageJResultsTable.voidaddRows(Client client, ResultsTable results, java.lang.Long imageId, java.util.Collection<? extends Roi> ijRois, java.lang.String roiProperty)Adds rows from an ImageJResultsTable.TableDatacreateTable()Creates the corresponding TableData object.intgetColumnCount()Returns the number of columns in the table.java.lang.StringgetColumnName(int column)Returns the name of the column.TableDataColumn[]getColumns()Gets theTableDataColumnwhich contains information on each column of the tablejava.lang.Class<?>getColumnType(int column)Returns the type of the column.java.lang.Object[][]getData()Gets the value contained in the tablejava.lang.ObjectgetData(int x, int y)Gets a certain value of the tablejava.lang.LonggetFileId()Returns the fileId of the table.java.lang.LonggetId()Returns the table ID.java.lang.StringgetName()Returns the name of the table.intgetRowCount()Returns the number of rows in the table.booleanisComplete()Checks if the table is completevoidsaveAs(java.lang.String path, char delimiter)Saves the current table as a character-delimited text file.voidsetColumn(int column, java.lang.String columnName, java.lang.Class<?> type)Sets the information about a certain column.voidsetFileId(java.lang.Long fileId)Sets the fileId of the table.voidsetId(java.lang.Long id)Sets the id of the table.voidsetName(java.lang.String name)Sets the name of the table.voidsetRowCount(int rowCount)Sets the number of row in the table.voidtruncateRow()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 ImageJResultsTable.- 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 ImageJResultsTable.- 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 toROI.IJ_PROPERTYif 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.
-
getColumns
TableDataColumn[] getColumns()
Gets theTableDataColumnwhich contains information on each column of the table- Returns:
- the
TableDataColumnwhich contains information on each column of the table.
-
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.UnsupportedEncodingExceptionSaves 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.
-
-