public class DerivedBioAssay extends AnnotatedItem<DerivedBioAssayData> implements Registered, FileStoreEnabled, Subtypable
Modifier and Type | Class and Description |
---|---|
(package private) static class |
DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction
Whenever we modify the parent items to a derived bioassay,
we must make sure that the physical bioassays for all
child items are synchronized with the same changes.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARRANGEMENT
The id for the
DerivedBioAssayType item representing
sequenced data that has been aligned to a reference database. |
private boolean |
extractHasBeenSet |
private boolean |
hardwareHasBeenSet |
private boolean |
protocolHasBeenSet |
static java.lang.String |
SCAN
The id for the
DerivedBioAssayType item representing a
scanned hybridization. |
static java.lang.String |
SEQUENCES
The id for the
DerivedBioAssayType item representing
original sequenced data. |
private boolean |
softwareHasBeenSet |
static Item |
TYPE
The type of item represented by this class.
|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
DerivedBioAssay(DerivedBioAssayData data) |
Modifier and Type | Method and Description |
---|---|
void |
addParent(DerivedBioAssay bioAssay)
Add a derived bioassay as a parent to this derived bioassay.
|
void |
addPhysicalBioAssay(PhysicalBioAssay bioAssay)
Add a physical bioassay as a parent to this derived bioassay.
|
long |
countRawBioAssays()
Counts all raw bioassays that have been created from this bioassay.
|
java.util.Set<Annotatable> |
getAnnotatableParents()
Get the extract and parent bioassays or physical bioassays.
|
ArrayDesign |
getArrayDesign()
Get the array design connected to this derived bioassay by
following the path from the physical bioassay to the array slide to
the array batch to the array design.
|
static DerivedBioAssay |
getById(DbControl dc,
int id)
Get a
DerivedBioAssay item when you know the id. |
ItemQuery<DerivedBioAssay> |
getChildren()
Get all child derived bioassays.
|
java.util.Date |
getEntryDate()
Get the date that the item was registered in the database.
|
Extract |
getExtract()
Get the extract that is the parent of the data in this
derived bioassay.
|
FileSet |
getFileSet()
Get the file set that collects all files that holds data
for this item.
|
Hardware |
getHardware()
Get the
Hardware that was used when
creating this bioassay set. |
ItemSubtype |
getItemSubtype()
Get the subtype of the item.
|
Job |
getJob()
Get the job that created this bioassay.
|
static DerivedBioAssay |
getNew(DbControl dc,
boolean isRoot,
Job job)
Create a new parent-less derived bioassay.
|
static DerivedBioAssay |
getNew(DbControl dc,
DerivedBioAssay parent,
Job job)
Create a new child derived bioassay from a parent derived bioassay.
|
static DerivedBioAssay |
getNew(DbControl dc,
PhysicalBioAssay bioAssay,
Job job)
Create a new (root) derived bioassay from a physical bioassay.
|
DerivedBioAssay |
getParent()
Deprecated.
In 3.2, replaced with
getParents() |
java.util.Collection<FileSet> |
getParentFileSets()
Get the file sets of parent item(s) that are related to the current item.
|
ItemQuery<DerivedBioAssay> |
getParents()
Get all parent derived bioassays.
|
PhysicalBioAssay |
getPhysicalBioAssay()
Deprecated.
In 3.2, replaced with
getPhysicalBioAssays() . |
ItemQuery<PhysicalBioAssay> |
getPhysicalBioAssays()
Get a query that returns the physical bioassays used to create
this derived bioassay.
|
Platform |
getPlatform()
Get the platform the item is related to.
|
Protocol |
getProtocol()
Default implementation returns null.
|
static ItemQuery<DerivedBioAssay> |
getQuery()
Get a query that returns derived bioassay.
|
ItemQuery<RawBioAssay> |
getRawBioAssays() |
Software |
getSoftware()
Get the
Software that was used when
creating this bioassay set. |
Item |
getType()
Get the type of item represented by the object.
|
java.util.Set<ItemProxy> |
getUsingItems()
Get all:
Child derived bioassays
Child raw bioassays
|
PlatformVariant |
getVariant()
Get the platform variant the item is related to.
|
boolean |
hasFileSet()
Check if this item has a file set.
|
boolean |
isRoot()
Check if this bioassay set is derived from one or more physical bioassays or
from derived bioassays.
|
boolean |
isUsed()
Check if this item is used by some other item.
|
(package private) void |
onBeforeCommit(Transactional.Action action)
Automatically try to assign an extract from parent items at
creation time.
|
void |
removeParent(DerivedBioAssay bioAssay)
Remove a derived bioassay as a parent item for this derived
bioassay.
|
void |
removePhysicalBioAssay(PhysicalBioAssay bioAssay)
Remove a physical bioassay as a parent item for this derived
bioassay.
|
void |
setExtract(Extract extract)
Set the extract that is the parent of data in this bioassay.
|
void |
setHardware(Hardware hardware)
Set the
Hardware that was used when
creating this bioassay set. |
void |
setItemSubtype(ItemSubtype subtype)
Set the subtype on the item.
|
(package private) void |
setProjectDefaults(Project activeProject)
Set protocol, hardware and software from project default settings.
|
void |
setProtocol(Protocol protocol)
Set the
Protocol that describes the procedure used when
creating this bioassay set. |
void |
setSoftware(Software software)
Set the
Software that was used when
creating this bioassay set. |
void |
testFixChildren() |
getAnnotationSet, isAnnotated, removeAnnotations, toTransferable
getDescription, getName, isRemoved, setDescription, setName, setRemoved, toTransferable
getItemKey, getProjectKey, initPermissions, isShared, setItemKey, setProjectKey, toTransferable
getOwner, isOwner, setOwner, takeOwnership, toTransferable
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onRollback, setDbControl, toString, toTransferable, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getVersion
checkPermission, getPermissions, hasPermission
getOwner, isOwner, setOwner, takeOwnership
public static final Item TYPE
Item.DERIVEDBIOASSAY
,
getType()
public static final java.lang.String SCAN
DerivedBioAssayType
item representing a
scanned hybridization.public static final java.lang.String SEQUENCES
DerivedBioAssayType
item representing
original sequenced data.public static final java.lang.String ARRANGEMENT
DerivedBioAssayType
item representing
sequenced data that has been aligned to a reference database.private boolean extractHasBeenSet
private boolean protocolHasBeenSet
private boolean hardwareHasBeenSet
private boolean softwareHasBeenSet
DerivedBioAssay(DerivedBioAssayData data)
public static DerivedBioAssay getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
DerivedBioAssay
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 loadDerivedBioAssay
itemItemNotFoundException
- If an item with the specified
id is not foundPermissionDeniedException
- If the logged in user doesn't
have read permission to the itemBaseException
- If there is another errorpublic static DerivedBioAssay getNew(DbControl dc, boolean isRoot, Job job)
addPhysicalBioAssay(PhysicalBioAssay)
or
addParent(DerivedBioAssay)
.dc
- The DbControl
which will be used for
permission checking and database accessisRoot
- TRUE if the new item is a root derived bioassay
(eg. it have physical bioassays as parent items)job
- The job that created the new bioassaypublic static DerivedBioAssay getNew(DbControl dc, PhysicalBioAssay bioAssay, Job job)
dc
- The DbControl
which will be used for
permission checking and database accessbioAssay
- The parent physical bioassayjob
- The job that created the new bioassaypublic static DerivedBioAssay getNew(DbControl dc, DerivedBioAssay parent, Job job)
dc
- The DbControl
which will be used for
permission checking and database accessparent
- The parent bioassayjob
- The job that created the new bioassaypublic static ItemQuery<DerivedBioAssay> getQuery()
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public java.util.Set<ItemProxy> getUsingItems()
getUsingItems
in class BasicItem<DerivedBioAssayData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public boolean isUsed() throws BaseException
BasicItem
super.isUsed()
, unless it has decided
that the item is used by some other means.isUsed
in class BasicItem<DerivedBioAssayData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
void onBeforeCommit(Transactional.Action action)
void setProjectDefaults(Project activeProject) throws BaseException
setProjectDefaults
in class BasicItem<DerivedBioAssayData>
activeProject
- The currently active projectBaseException
public java.util.Set<Annotatable> getAnnotatableParents() throws BaseException
getAnnotatableParents
in interface Annotatable
BaseException
- If there is an errorpublic Protocol getProtocol()
AnnotatedItem
getProtocol
in interface Annotatable
getProtocol
in class AnnotatedItem<DerivedBioAssayData>
@SubtypableRelatedItems(value={PHYSICALBIOASSAY,DERIVEDBIOASSAY,EXTRACT,SOFTWARE,HARDWARE,PROTOCOL}) public ItemSubtype getItemSubtype()
Subtypable
getItemSubtype
in interface Subtypable
SubtypableRelatedItems
public void setItemSubtype(ItemSubtype subtype)
Subtypable
setItemSubtype
in interface Subtypable
subtype
- A subtype or nullItemSubtype.setOnItem(Subtypable)
public java.util.Date getEntryDate()
Registered
getEntryDate
in interface Registered
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 java.util.Collection<FileSet> getParentFileSets()
FileStoreEnabled
getParentFileSets
in interface FileStoreEnabled
FileSet
or null@Deprecated public PhysicalBioAssay getPhysicalBioAssay()
getPhysicalBioAssays()
.public void testFixChildren()
public void addPhysicalBioAssay(PhysicalBioAssay bioAssay) throws PermissionDeniedException, InvalidDataException
bioAssay
- The parent bioassay to addPermissionDeniedException
InvalidDataException
public void removePhysicalBioAssay(PhysicalBioAssay bioAssay) throws PermissionDeniedException, InvalidDataException
bioAssay
- The parent bioassay to remove from this bioassayPermissionDeniedException
InvalidDataException
public ItemQuery<PhysicalBioAssay> getPhysicalBioAssays()
ItemQuery
object@Deprecated public DerivedBioAssay getParent()
getParents()
public void addParent(DerivedBioAssay bioAssay) throws PermissionDeniedException, InvalidDataException
bioAssay
- The parent bioassay to addPermissionDeniedException
InvalidDataException
public void removeParent(DerivedBioAssay bioAssay) throws PermissionDeniedException, InvalidDataException
bioAssay
- The parent bioassay to remove from this bioassayPermissionDeniedException
InvalidDataException
public ItemQuery<DerivedBioAssay> getParents()
public boolean isRoot()
public Extract getExtract()
public void setExtract(Extract extract)
extract
- The extract or nullpublic ItemQuery<DerivedBioAssay> getChildren()
public Job getJob()
public void setProtocol(Protocol protocol) throws PermissionDeniedException
Protocol
that describes the procedure used when
creating this bioassay set.protocol
- A Protocol
item, or null if not knownPermissionDeniedException
- If the logged in user doesn't have
write permission on this event or use permission for the protocolpublic Hardware getHardware()
Hardware
that was used when
creating this bioassay set.Hardware
item, or null if not knownpublic void setHardware(Hardware hardware) throws PermissionDeniedException
Hardware
that was used when
creating this bioassay set.hardware
- A Hardware
item, or null if not knownPermissionDeniedException
- If the logged in user doesn't have
write permission on this event or use permission for the hardwarepublic Software getSoftware()
Software
that was used when
creating this bioassay set.Software
item, or null if not knownpublic void setSoftware(Software software) throws PermissionDeniedException
Software
that was used when
creating this bioassay set.software
- A Software
item, or null if not knownPermissionDeniedException
- If the logged in user doesn't have
write permission on this event or use permission for the softwarepublic ItemQuery<RawBioAssay> getRawBioAssays()
public ArrayDesign getArrayDesign() throws PermissionDeniedException, BaseException
PermissionDeniedException
- If the logged in user doesn't have
read permission for the array designBaseException
- If there is another error.public long countRawBioAssays() throws BaseException
BaseException
- If the raw bioassays couldn't be counted.