Package net.sf.basedb.core
Class DataCubeFilter
java.lang.Object
net.sf.basedb.core.BasicItem
net.sf.basedb.core.ChildItem
net.sf.basedb.core.DataCubeFilter
- All Implemented Interfaces:
AccessControlled
,Identifiable
This represents a filter in a datacube. A filter simply contains a
set of column/position coordinates of spots that has passed som filtering
criteria. In theory a filter can be used on any layer in the data cube, but
in practice filters are not reused among bioassaysets with different layers.
This item keeps track of two important things. The filter number
and the number of bytes the data in this layer occupies on disk.
The number of bytes is reported up to the
Experiment
which is the
item that handles user quota.- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2015-04-17 14:02:22 +0200 (fr, 17 apr 2015) $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new data cube item from the given data. -
Method Summary
Modifier and TypeMethodDescription(package private) void
addBytes
(long bytes) static DataCubeFilter
Get aDataCubeFilter
item when you know the id.long
getBytes()
Get the number of bytes the data stored in this filter occupies on disk.(package private) DataCubeFilterData
getData()
Get theBasicData
object that holds all data for this item.Get the data cube this filter belongs to.short
Get the number of the data cube this filter belongs to.short
Get the number of this filter.(package private) static DataCubeFilter
Create a newDataCubeFilter
item.(package private) Permission
USE permission is enough to be able to manage data cubes.(package private) SharedData
Get the experiment.getType()
Get the type of item represented by the object.(package private) VirtualDb
Get the virtual database this filter belongs to.(package private) void
onBeforeCommit
(Transactional.Action action) Delete data and update disk usage information on the experiment if action == Action.DELETEprivate void
setDataCube
(DataCube cube) Set the data cube.private void
setFilterNo
(short filterNo) Methods inherited from class net.sf.basedb.core.ChildItem
getPermissionForUse, getPluginPermissions, initPermissions
Methods inherited from class net.sf.basedb.core.BasicItem
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, validate
-
Field Details
-
TYPE
The type of item represented by this class.- See Also:
-
-
Constructor Details
-
DataCubeFilter
DataCubeFilter(DataCubeFilterData data) Creates a new data cube item from the given data.- Parameters:
data
- the data
-
-
Method Details
-
getNew
Create a newDataCubeFilter
item.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access.cube
- The cube the new filter is located in- Returns:
- The new
DataCubeFilter
item - Throws:
BaseException
- If there is an error
-
getById
public static DataCubeFilter getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException Get aDataCubeFilter
item when you know the id.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access.id
- The id of the item to load- Returns:
- The
DataCubeFilter
item - Throws:
ItemNotFoundException
- If an item with the specified id is not foundPermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission to the itemBaseException
- If there is another error
-
getData
DataCubeFilterData getData()Description copied from class:BasicItem
Get theBasicData
object that holds all data for this item. -
getType
Description copied from interface:Identifiable
Get the type of item represented by the object. The returned value is one of the values defined in theItem
enumeration.- Returns:
- A value indicating the type of item
-
onBeforeCommit
Delete data and update disk usage information on the experiment if action == Action.DELETE- Overrides:
onBeforeCommit
in classBasicItem
- Throws:
BaseException
- If there is an error- See Also:
-
getPermissionForWriteDeleteAndCreate
Permission getPermissionForWriteDeleteAndCreate()USE permission is enough to be able to manage data cubes.- Overrides:
getPermissionForWriteDeleteAndCreate
in classChildItem
-
getDataCube
Get the data cube this filter belongs to.- Returns:
- A
DataCube
object - Throws:
PermissionDeniedException
- If the logged in user doesn't have read permission to the itemBaseException
- If there is another error
-
setDataCube
Set the data cube. This cannot be changed after the filter has been created. -
getDataCubeNo
public short getDataCubeNo()Get the number of the data cube this filter belongs to. -
getFilterNo
public short getFilterNo()Get the number of this filter. -
setFilterNo
private void setFilterNo(short filterNo) -
getBytes
public long getBytes()Get the number of bytes the data stored in this filter occupies on disk. -
addBytes
void addBytes(long bytes) -
getVirtualDb
VirtualDb getVirtualDb()Get the virtual database this filter belongs to.
-