public class TablesFacility extends Facility
Facility
to interact with OMERO.tablesModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_ROWS_TO_FETCH
Maximum number of rows to fetch if not specified otherwise
|
static String |
TABLES_MIMETYPE
The mimetype of an omero tables file
|
Modifier and Type | Method and Description |
---|---|
TableData |
addTable(SecurityContext ctx,
DataObject target,
String name,
TableData data)
Adds a new table with the provided data
|
Collection<FileAnnotationData> |
getAvailableTables(SecurityContext ctx,
DataObject parent)
Get all available tables for a the specified object
|
TableData |
getTable(SecurityContext ctx,
long fileId)
Load the data from a table (Note: limited to
DEFAULT_MAX_ROWS_TO_FETCH number of rows) |
TableData |
getTable(SecurityContext ctx,
long fileId,
List<Long> rows)
Load data from a table
|
TableData |
getTable(SecurityContext ctx,
long fileId,
long... rows)
Load data from a table
|
TableData |
getTable(SecurityContext ctx,
long fileId,
long rowFrom,
long rowTo,
int... columns)
Load data from a table
|
TableData |
getTable(SecurityContext ctx,
long fileId,
long rowFrom,
long rowTo,
long... columns)
Load data from a table
|
TableData |
getTableInfo(SecurityContext ctx,
long fileId)
Get basic information about a table.
|
long[] |
query(SecurityContext ctx,
long fileId,
String condition)
Perform a query on the table
|
long[] |
query(SecurityContext ctx,
long fileId,
String condition,
long start,
long stop,
long step)
Perform a query on the table
|
addPropertyChangeListener, clear, firePropertyChanged, firePropertyChanged, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
public static final String TABLES_MIMETYPE
public static final int DEFAULT_MAX_ROWS_TO_FETCH
public TableData addTable(SecurityContext ctx, DataObject target, String name, TableData data) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
target
- The object to attach the table toname
- A name for the table (can be null
)data
- The dataTableData
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public TableData getTableInfo(SecurityContext ctx, long fileId) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tableTableData
object without the actual table data
loaded; which only contains information about the columns and the
size of the table.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public TableData getTable(SecurityContext ctx, long fileId) throws DSOutOfServiceException, DSAccessException
DEFAULT_MAX_ROWS_TO_FETCH
number of rows)ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tableDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public TableData getTable(SecurityContext ctx, long fileId, long rowFrom, long rowTo, int... columns) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tablerowFrom
- The start row (inclusive)rowTo
- The end row (inclusive) (can be -1
in which case
DEFAULT_MAX_ROWS_TO_FETCH
rows will be
fetched)columns
- The columns to take into account (can be left unspecified, in
which case all columns will used)DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public long[] query(SecurityContext ctx, long fileId, String condition) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tablecondition
- The query stringDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public long[] query(SecurityContext ctx, long fileId, String condition, long start, long stop, long step) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tablecondition
- The query stringstart
- The index of the first row to consider (optional, default: 0)stop
- The index of the last+1 row to consider (optional, default:
number of rows of the table)step
- The stepping interval between the start and stop rows to
consider (optional, default: no stepping)DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public TableData getTable(SecurityContext ctx, long fileId, List<Long> rows) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tablerows
- The rows to getDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public TableData getTable(SecurityContext ctx, long fileId, long... rows) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tablerows
- The rows to getDSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public TableData getTable(SecurityContext ctx, long fileId, long rowFrom, long rowTo, long... columns) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
fileId
- The id of the OriginalFile
which stores the tablerowFrom
- The start row (inclusive)rowTo
- The end row (inclusive) (can be -1
in which case
DEFAULT_MAX_ROWS_TO_FETCH
rows will be
fetched)columns
- The columns to take into account (can be left unspecified, in
which case all columns will used)DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public Collection<FileAnnotationData> getAvailableTables(SecurityContext ctx, DataObject parent) throws DSOutOfServiceException, DSAccessException
ctx
- The SecurityContext
parent
- The DataObject
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.
Version: 5.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.