Package net.sf.basedb.core
Interface Annotatable
- All Superinterfaces:
AccessControlled
,Identifiable
- All Known Subinterfaces:
AnnotatableProxy
- All Known Implementing Classes:
AnnotatedItem
,ArrayBatch
,ArrayDesign
,ArraySlide
,BioAssay
,BioAssaySet
,BioMaterial
,BioPlate
,BioSource
,DerivedBioAssay
,Experiment
,Extract
,File
,FileServer
,Hardware
,ItemList
,Kit
,MeasuredBioMaterial
,PhysicalBioAssay
,Plate
,PluginConfiguration
,PluginDefinition
,Project
,Protocol
,RawBioAssay
,RootRawBioAssay
,Sample
,Software
,Tag
,Well
This interface is implemented by all items which can be annotated.
Annotations are extra values attached to an item. Usually these values
are used in the analysis of an experiment.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2012-02-23 15:45:07 +0100 (to, 23 feb 2012) $
-
Method Summary
Modifier and TypeMethodDescriptionGet all parents objects which are annotatable and the logged in user has read permission to.Get the annotation set containing the annotations for this item.A protcol used in the creation of an item that is used to attach annotations for the protocol parameters.boolean
Check if this item has an annotation set.void
Remove all annotations from this item, by deleting the annotation set.Methods inherited from interface net.sf.basedb.core.AccessControlled
checkPermission, getPermissions, hasPermission
Methods inherited from interface net.sf.basedb.core.Identifiable
getId, getType, getVersion
-
Method Details
-
getAnnotationSet
Get the annotation set containing the annotations for this item. If the item doesn't have any annotations a new annotation set is created and automatically saved to the database whenDbControl.commit()
is called. To check if an item has annotations without creating a new annotation set use theisAnnotated()
method.- Returns:
- An
AnnotationSet
- Throws:
PermissionDeniedException
- If the logged in user doesn't have enough permissionsBaseException
- If there is another error
-
isAnnotated
boolean isAnnotated()Check if this item has an annotation set. The annotation set may be empty.- Returns:
- TRUE if an annotation set exists, FALSE otherwise
-
removeAnnotations
Remove all annotations from this item, by deleting the annotation set.- Throws:
PermissionDeniedException
- If the logged in user doesn't have write permissionBaseException
- If there is another error
-
getAnnotatableParents
Get all parents objects which are annotatable and the logged in user has read permission to. If the item doesn't have any annotatable parents, it may return null or an empty set. The method should only return the immediate parent(s), not parents to parents, etc. As of BASE 3.1 this method may also return child items if the child item is aSubtypable
item that has a subtype with theItemSubtype.getPushAnnotations()
flag set.- Returns:
- A set containing annotatable items, or null
- Throws:
BaseException
- If there is an error
-
getProtocol
Protocol getProtocol()A protcol used in the creation of an item that is used to attach annotations for the protocol parameters.- Returns:
- A protocol or null if the protocol is unknown
- Since:
- 2.2
-