public class ExtraValue extends ChildItem implements FileStoreEnabled
BioAssaySet
.
The type of extra values are defined by the ExtraValueType
.
The insertion of extra values is done using batchers, created by calling either BioAssaySet.getSpotExtraValueBatcher(Class, ExtraValueType, Job)
or BioAssaySet.getPositionExtraValueBatcher(Class, ExtraValueType, Job)
.
Only one set of extra values of the same ExtraValueType
are
allowed in a bioassayset.SpotExtraValueBatcher
,
PositionExtraValueBatcher
Modifier and Type | Class and Description |
---|---|
static class |
ExtraValue.CoordinateType
Defines which coordinates in the data cube the extra values are attached to.
|
Modifier and Type | Field and Description |
---|---|
static Item |
TYPE
The type of item represented by this class.
|
Constructor and Description |
---|
ExtraValue(ExtraValueData data)
Creates a new extra value item from the given data.
|
Modifier and Type | Method and Description |
---|---|
BioAssaySet |
getBioAssaySet()
Get the bioassayset this extra value belongs to.
|
static ExtraValue |
getById(DbControl dc,
int id)
Get an
ExtraValue item when you know the id. |
ExtraValue.CoordinateType |
getCoordinateType()
Get information about which coordinates in the data cube
the extra values are attached to.
|
(package private) ExtraValueData |
getData()
Get the
BasicData object that holds all data for this item. |
(package private) DataCube |
getDataCube() |
(package private) DataCubeExtraValue |
getDataCubeExtraValue() |
short |
getDataCubeNo()
Get the number of the data cube the extra values are stored in.
|
Experiment |
getExperiment()
Get the experiment this extra value belongs to.
|
short |
getExtraNo()
Get the number in the data cube of the extra values.
|
ExtraValueType |
getExtraValueType()
Get the type of the extra values.
|
FileSet |
getFileSet()
Get the file set that collects all files that holds data
for this item.
|
Job |
getJob()
Get the job that created the extra values.
|
(package private) String |
getJoinAlias()
The alias used when joining this extra value into a query.
|
(package private) static ExtraValue |
getNew(DbControl dc,
BioAssaySet bioAssaySet,
ExtraValueType extraValueType,
DataCubeExtraValue dcev,
Job job)
Create a new
ExtraValue item. |
int |
getNumFileValues()
Get the number of values that are stored in files.
|
int |
getNumValues()
Get the number of extra values inserted.
|
Collection<FileSet> |
getParentFileSets()
Get the file set from the parent bioassay set if it exists.
|
(package private) Permission |
getPermissionForWriteDeleteAndCreate()
USE permission is enough to be able to manage extra values.
|
Platform |
getPlatform()
Get the platform the item is related to.
|
static ItemQuery<ExtraValue> |
getQuery(BioAssaySet bioAssaySet)
Get a query configured to retrieve extra values in a given bioassayset.
|
RawDataType |
getRawDataType()
Get the raw data type the experiment uses for the raw data.
|
(package private) SharedData |
getSharedParent()
Get the experiment.
|
Item |
getType()
Get the type of item represented by the object.
|
DynamicExtraValueQuery |
getValues()
Get a query returning the extra values.
|
Type |
getValueType()
Get the type of values.
|
PlatformVariant |
getVariant()
Get the platform variant the item is related to.
|
VirtualColumn |
getVirtualColumn()
Get the virtual column object that represents the column where the
extra values are stored.
|
(package private) VirtualDb |
getVirtualDb() |
(package private) VirtualTable |
getVirtualTable() |
boolean |
hasFileSet()
Check if this item has a file set.
|
private void |
setBioAssaySet(BioAssaySet bioAssaySet)
Set the bioassayset.
|
private void |
setDataCubeExtraValue(DataCubeExtraValue dcev) |
private void |
setExtraValueType(ExtraValueType extraValueType)
Set the extra value type.
|
private void |
setJob(Job job)
Set the job that created the extra values.
|
void |
setNumFileValues(int numValues)
Set the number of extra values that are stored in files.
|
(package private) void |
setNumValues(int numValues)
Called from batcher when it is closed.
|
getPermissionForUse, getPluginPermissions, initPermissions
addAnnotatableParents, addUsingItems, addUsingItems, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getVersion
checkPermission, getPermissions, hasPermission
public static final Item TYPE
Item.EXTRAVALUE
,
getType()
ExtraValue(ExtraValueData data)
data
- the datastatic ExtraValue getNew(DbControl dc, BioAssaySet bioAssaySet, ExtraValueType extraValueType, DataCubeExtraValue dcev, Job job) throws PermissionDeniedException, InvalidDataException, BaseException
ExtraValue
item.dc
- The DbControl
which will be used for
permission checking and database access.bioAssaySet
- The bioassayset the extra value belongs toextraValueType
- The type of the extra valuedcev
- The data cube extra value used to store the extra valuesjob
- The job that calculated the extra values or nullExtraValue
itemPermissionDeniedException
- If the logged in user
doesn't have write permission for the experimentInvalidDataException
- If the bioassayset or extra value type is nullBaseException
- If there is an errorpublic static ExtraValue getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
ExtraValue
item when you know the id.dc
- The DbControl
which will be used for
permission checking and database access.id
- The id of the item to loadExtraValue
itemItemNotFoundException
- If an item with the specified id
is not foundPermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission to the itemBaseException
- If there is another errorpublic static ItemQuery<ExtraValue> getQuery(BioAssaySet bioAssaySet) throws InvalidDataException
bioAssaySet
- The bioassayset to retreive bioassays for, null
is not allowedItemQuery
objectInvalidDataException
- If the argument is null.getValues()
ExtraValueData getData()
BasicItem
BasicData
object that holds all data for this item.public Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public FileSet getFileSet()
FileStoreEnabled
DbControl.commit()
is called. To check if an item has files without creating a new
file set use the FileStoreEnabled.hasFileSet()
method.getFileSet
in interface FileStoreEnabled
public boolean hasFileSet()
FileStoreEnabled
FileStoreEnabled.getFileSet()
to avoid creating a new file set when there is
no need for it.hasFileSet
in interface FileStoreEnabled
public Platform getPlatform()
FileStoreEnabled
DataFileType
:s that can be added to the file set.getPlatform
in interface FileStoreEnabled
public PlatformVariant getVariant()
FileStoreEnabled
DataFileType
:s that can be added to the file set.getVariant
in interface FileStoreEnabled
public Collection<FileSet> getParentFileSets()
getParentFileSets
in interface FileStoreEnabled
FileSet
or nullSharedData getSharedParent()
getSharedParent
in class ChildItem
Permission getPermissionForWriteDeleteAndCreate()
getPermissionForWriteDeleteAndCreate
in class ChildItem
public Experiment getExperiment() throws PermissionDeniedException, BaseException
Experiment
objectPermissionDeniedException
- If the logged in user doesn't have
read permission to the experimentBaseException
- If there is another errorpublic BioAssaySet getBioAssaySet() throws PermissionDeniedException, BaseException
BioAssaySet
objectPermissionDeniedException
- If the logged in user doesn't have
read permission to the bioassaysetBaseException
- If there is another errorprivate void setBioAssaySet(BioAssaySet bioAssaySet) throws PermissionDeniedException, InvalidDataException
public ExtraValueType getExtraValueType() throws PermissionDeniedException, BaseException
ExtraValueType
objectPermissionDeniedException
- If the logged in user doesn't have
read permission to the extra value typeBaseException
- If there is another errorprivate void setExtraValueType(ExtraValueType extraValueType) throws PermissionDeniedException, InvalidDataException
public Job getJob() throws PermissionDeniedException, BaseException
Job
object, ot null if the extra values
wasn't created by a jobPermissionDeniedException
- If the logged in user doesn't have
read permission to the experimentBaseException
- If there is another errorprivate void setJob(Job job)
public RawDataType getRawDataType()
RawDataType
objectpublic int getNumValues()
void setNumValues(int numValues)
public int getNumFileValues()
public void setNumFileValues(int numValues)
numValues
- The number of spotspublic short getDataCubeNo()
public short getExtraNo()
public ExtraValue.CoordinateType getCoordinateType()
CoordinateType
objectDataCube
public Type getValueType()
getExtraValueType().getValueType()
.Type
objectpublic DynamicExtraValueQuery getValues()
// Example of default query for extra integer values attached to spots SELECT ex.column, ex.position, ex.value FROM Dynamic#SpotExtraInt AS ex WHERE ex.cube = <cube_no> AND ex.extra = <extra_no>
DynamicExtraValueQuery
objectDataCubeExtraValue getDataCubeExtraValue() throws PermissionDeniedException, BaseException
private void setDataCubeExtraValue(DataCubeExtraValue dcev)
VirtualDb getVirtualDb()
DataCube getDataCube()
VirtualTable getVirtualTable()
public VirtualColumn getVirtualColumn()
VirtualColumn
objectVirtualColumn.extraValue(Type)
String getJoinAlias()
VirtualTable.getAlias()
value, which we normally do, since the alias
must be unique if we join several extra values. We simply return a value based on the
id of this item. The ExtraValueJoin
and ExtraValueExpression
both uses this method to create their SQL.ExtraValueJoin
,
ExtraValueExpression