Last update: 2011-06-23

org.proteios.core
Class LabeledExtract

java.lang.Object
  extended by org.proteios.core.BasicItem<D>
      extended by org.proteios.core.OwnedItem<D>
          extended by org.proteios.core.SharedItem<D>
              extended by org.proteios.core.CommonItem<D>
                  extended by org.proteios.core.AnnotatedItem<D>
                      extended by org.proteios.core.BioMaterial<D>
                          extended by org.proteios.core.MeasuredBioMaterial<LabeledExtractData>
                              extended by org.proteios.core.LabeledExtract
All Implemented Interfaces:
AccessControlled, Annotatable, Identifiable, Nameable, Ownable, Removable, Shareable

public class LabeledExtract
extends MeasuredBioMaterial<LabeledExtractData>

This class is used to represent labeled extract items. A labeled extract is an Extract that has been marked with a Label. It is also possible to create a labled extract by combining other labeled extracts, or as a standalone item with no reference to an extract or other labeled extracts.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $

Field Summary
static Item TYPE
          The type of item represented by this class.
 
Fields inherited from class org.proteios.core.BioMaterial
MAX_EXTERNAL_ID_LENGTH, MAX_STORAGE_LOCATION_LENGTH
 
Fields inherited from interface org.proteios.core.Nameable
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
 
Method Summary
 Set<Annotatable> getAnnotatableParents()
          Get the extract or pooled labeled extracts.
 Extract getExtract()
          Get the Extract that is the parent of this labeled extract.
 Label getLabel()
          Get the Label compound used for labeling the extract.
static ItemQuery<LabeledExtract> getQuery()
          Get a query that returns labeled extracts.
 Item getType()
          Get the type of item represented by the object.
 boolean isUsed()
          Check that: no LabeledExtract:s has been created from this item
 void setExtract(Extract extract)
          Set the Extract item that is the the parent of this labeled extract.
 void setLabel(Label label)
          Set the Label that was used to label the extract.
 
Methods inherited from class org.proteios.core.MeasuredBioMaterial
getConcentrationInGramsPerLiter, getCreationEvent, getEventQuery, getEvents, getOriginalQuantityInMicroLiters, getRemainingQuantityInMicroLiters, isPooled, setConcentrationInGramsPerLiter, setCreationEvent, setOriginalQuantityInMicroLiters, setPooled, setRemainingQuantityInMicroLiters
 
Methods inherited from class org.proteios.core.BioMaterial
addFile, getExternalId, getFiles, getStorageLocation, setExternalId, setFiles, setStorageLocation
 
Methods inherited from class org.proteios.core.CommonItem
getDescription, getName, isRemoved, setDescription, setName, setRemoved
 
Methods inherited from class org.proteios.core.SharedItem
getItemKey, getProjectKey, isShared, setItemKey, setProjectKey
 
Methods inherited from class org.proteios.core.OwnedItem
getOwner, setOwner
 
Methods inherited from class org.proteios.core.BasicItem
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.proteios.core.Identifiable
getId, getVersion
 
Methods inherited from interface org.proteios.core.AccessControlled
checkPermission, hasPermission
 
Methods inherited from interface org.proteios.core.Ownable
getOwner, setOwner
 

Field Detail

TYPE

public static final Item TYPE
The type of item represented by this class.

See Also:
Item.LABELEDEXTRACT, getType()
Method Detail

getQuery

public static ItemQuery<LabeledExtract> getQuery()
Get a query that returns labeled extracts.

Returns:
An ItemQuery object.

getType

public 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 the Item enumeration.

Returns:
A value indicating the type of item

getAnnotatableParents

public Set<Annotatable> getAnnotatableParents()
                                       throws BaseException
Get the extract or pooled labeled extracts.

Throws:
BaseException

isUsed

public boolean isUsed()
               throws BaseException
Check that:

Overrides:
isUsed in class MeasuredBioMaterial<LabeledExtractData>
Returns:
TRUE if this item is used, FALSE otherwise
Throws:
BaseException

getLabel

public Label getLabel()
               throws PermissionDeniedException,
                      BaseException
Get the Label compound used for labeling the extract.

Returns:
A Label object
Throws:
PermissionDeniedException - If the logged in user doesn't have read permission for the label
BaseException - If there is another error

setLabel

public void setLabel(Label label)
              throws PermissionDeniedException,
                     InvalidDataException
Set the Label that was used to label the extract.

Parameters:
label - The new Label item
Throws:
PermissionDeniedException - If the logged in user doesn't have write permission for this labeled extract or use permission for the label
InvalidDataException - If the label is null
BaseException - If there is another error

getExtract

public Extract getExtract()
                   throws PermissionDeniedException,
                          BaseException
Get the Extract that is the parent of this labeled extract.

Returns:
An Extract object or null if this is a pooled or standalone labeled extract
Throws:
PermissionDeniedException - If the logged in user doesn't have read permission for the extract
BaseException - If there is another error

setExtract

public void setExtract(Extract extract)
                throws PermissionDeniedException,
                       InvalidDataException,
                       BaseException
Set the Extract item that is the the parent of this labeled extract.

Parameters:
extract - The new Extract item
Throws:
PermissionDeniedException - If the logged in user doesn't have write permission for this labeled extract or use permission for the extract
InvalidDataException - If this is a pooled labeled extract
BaseException - If there is another error

Last update: 2011-06-23