Package omero.grid
Interface _TableOperationsNC
-
- All Known Subinterfaces:
Table
- All Known Implementing Classes:
_TableDisp
,_TableTie
public interface _TableOperationsNC
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addColumn(Column col)
Adds a column and returns the position index of the new column.void
addData(Column[] cols)
void
close()
void
delete()
java.util.Map<java.lang.String,RType>
getAllMetadata()
Column[]
getHeaders()
Returns empty columns.RType
getMetadata(java.lang.String key)
long
getNumberOfRows()
Return the number of rows of a table.OriginalFile
getOriginalFile()
long[]
getWhereList(java.lang.String condition, java.util.Map<java.lang.String,RType> variables, long start, long stop, long step)
Run a query on a table.void
initialize(Column[] cols)
Initializes the structure based onData
read(long[] colNumbers, long start, long stop)
Read a subset of columns and consecutive rows from a table.Data
readCoordinates(long[] rowNumbers)
Read a set of entire rows in the table.void
setAllMetadata(java.util.Map<java.lang.String,RType> dict)
void
setMetadata(java.lang.String key, RType value)
Data
slice(long[] colNumbers, long[] rowNumbers)
Read a subset of columns and consecutive rows from a table.void
update(Data modifiedData)
Allows the user to modify a Data instance passed back from a query method and have the values modified.
-
-
-
Method Detail
-
getOriginalFile
OriginalFile getOriginalFile() throws ServerError
- Throws:
ServerError
-
getHeaders
Column[] getHeaders() throws ServerError
Returns empty columns.- Throws:
ServerError
-
getNumberOfRows
long getNumberOfRows() throws ServerError
Return the number of rows of a table.- Throws:
ServerError
-
getWhereList
long[] getWhereList(java.lang.String condition, java.util.Map<java.lang.String,RType> variables, long start, long stop, long step) throws ServerError
Run a query on a table. The meaning of the start and stop parameters are the same as in the built-in Python slices. Setting start, step and stop to 0 is interpreted as running the query against all rows.- Parameters:
condition
- A query string - see the tables query language for more details.variables
- A mapping of strings and variable values to be substituted into condition. This can often be left empty.start
- The start of the range of rows to consider.stop
- The end of the range of rows to consider.step
- The stepping interval of the range of rows to consider. Set to 0 to disable stepping.- Returns:
- A list of row indices matching the condition which can be passed as a
parameter of
readCoordinates(long[])
orslice(long[], long[])
. - Throws:
ServerError
-
readCoordinates
Data readCoordinates(long[] rowNumbers) throws ServerError
Read a set of entire rows in the table.- Parameters:
rowNumbers
- A list of row indices to be retrieved from the table. The indices may be non-consecutive and must contain at least one element or anApiUsageException
will be thrown.- Returns:
- The requested rows as a
Data
object. The results will be returned in the same order as the row indices. - Throws:
ServerError
-
read
Data read(long[] colNumbers, long start, long stop) throws ServerError
Read a subset of columns and consecutive rows from a table. The meaning of the start and stop parameters are the same as in the built-in Python slices. Setting both start and stop to 0 is interpreted as returning all rows.- Parameters:
colNumbers
- A list of column indices to be retrieved from the table. The indices may be non-consecutive and must contain at least one element or anApiUsageException
will be thrown.start
- The first element of the range of rows to retrieve. Must be non null.stop
- The stop of the range of rows to retrieve. Must be non null.- Returns:
- The requested columns and rows as a
Data
object. - Throws:
ServerError
-
slice
Data slice(long[] colNumbers, long[] rowNumbers) throws ServerError
Read a subset of columns and consecutive rows from a table.- Parameters:
colNumbers
- A list of column indices to be retrieved from the table. The indices may be non-consecutive. If set to empty or null, all columns will be returned.rowNumbers
- A list of row indices to be retrieved from the table. The indices may be non-consecutive. If set empty or null, all rows will be returned.- Returns:
- The requested columns and rows as a
Data
object. The results will be returned in the same order as the column and row indices. - Throws:
ServerError
-
addData
void addData(Column[] cols) throws ServerError
- Throws:
ServerError
-
update
void update(Data modifiedData) throws ServerError
Allows the user to modify a Data instance passed back from a query method and have the values modified. It is critical that theData.lastModification
and theData.rowNumbers
fields are properly set. An exception will be thrown if the data has since been modified.- Throws:
ServerError
-
getAllMetadata
java.util.Map<java.lang.String,RType> getAllMetadata() throws ServerError
- Throws:
ServerError
-
getMetadata
RType getMetadata(java.lang.String key) throws ServerError
- Throws:
ServerError
-
setAllMetadata
void setAllMetadata(java.util.Map<java.lang.String,RType> dict) throws ServerError
- Throws:
ServerError
-
setMetadata
void setMetadata(java.lang.String key, RType value) throws ServerError
- Throws:
ServerError
-
initialize
void initialize(Column[] cols) throws ServerError
Initializes the structure based on- Throws:
ServerError
-
addColumn
int addColumn(Column col) throws ServerError
Adds a column and returns the position index of the new column.- Throws:
ServerError
-
delete
void delete() throws ServerError
- Throws:
ServerError
-
close
void close() throws ServerError
- Throws:
ServerError
-
-