2.17.2: 2011-06-17

net.sf.basedb.util.overview
Class ExperimentOverview

java.lang.Object
  extended by net.sf.basedb.util.overview.ExperimentOverview

Deprecated. (In 2.10) Use GenericOverview instead

public class ExperimentOverview
extends Object

Get a complete overview of an experiment including the raw data, biomaterials, array designs and more that have been used in it. The structure will also be validated to make sure the experiment makes sense. Validation rules include:

Use getValidators() to get all validators and getValidationOptions() to specify if a certain validation rule should be ignored, cause a warning or an error.

Version:
2.2
Author:
Nicklas
Last modified
$Date: 2010-08-13 10:50:27 +0200 (Fri, 13 Aug 2010) $

Field Summary
private  Map<String,Node> allNodes
          Deprecated.  
private  Map<Object,Set<Annotatable>> annotatableParents
          Deprecated.  
private  Experiment experiment
          Deprecated.  
private  List<Failure> failures
          Deprecated.  
private  Map<Item,Set<AnnotationType>> miameAnnotations
          Deprecated.  
private  Project project
          Deprecated.  
private  Node rootNode
          Deprecated.  
private  Map<String,Node> usedHybArrays
          Deprecated.  
private  ValidationOptions validationOptions
          Deprecated.  
 
Constructor Summary
private ExperimentOverview(Experiment experiment, Project project)
          Deprecated. Create a new overview for the experiment using defaults from the specified project.
 
Method Summary
private  Node addAnnotations(DbControl dc, Node parentNode)
          Deprecated. Add annotations child node to an annotatable item.
private  Node addArrayBatch(DbControl dc, Node slideNode)
          Deprecated. Add an array batch child node to an array slide.
private  Node addArrayDesign(DbControl dc, Node parentNode)
          Deprecated. Add an array design child node to a raw bioassay or array batch.
private  Node addArraySlide(DbControl dc, Node hybNode)
          Deprecated. Add an array slide child node to a hybridization.
private  Node addBioSource(DbControl dc, Node sampleNode)
          Deprecated. Add a biosource child node to a non-pooled sample.
private  Node addDataFiles(DbControl dc, Node parentNode)
          Deprecated. Add data files child node to a FileStoreEnabled item.
private  Node addExperimentalFactors(DbControl dc, Node rootNode)
          Deprecated. Add experimental factors child node to the experiment node.
private  Node addExtract(DbControl dc, Node parentNode, Extract extract)
          Deprecated. Add an extract child node to a non-pooled labeled extract.
private  Node addHardware(DbControl dc, Node parentNode, String hardwareType)
          Deprecated. Add a hardware child node to items with hardware (scanner, print robot, hyb.
private  Node addHybridization(DbControl dc, Node scanNode, Node rawBioAssayNode)
          Deprecated. Add a hybridization child node to a scan.
private  Node addImage(DbControl dc, Node imagesNode, Image image)
          Deprecated. Add an image child node to the images folder.
private  Node addImages(DbControl dc, Node scanNode)
          Deprecated. Add images child node to a scan node.
private  Node addLabeledExtract(DbControl dc, Node parentNode, LabeledExtract le)
          Deprecated. Add a labeled extract child node to the labeled extracts folder.
private  Node addLabeledExtracts(DbControl dc, Node hybNode, Node rawBioAssayNode)
          Deprecated. Add labeled extracts child node to a hybridization node.
private  Node addPlatform(DbControl dc, Node parentNode)
          Deprecated. Add a platform / variant child node to items with platform (raw bioassay and array design).
private  void addPooledExtracts(DbControl dc, Node parentNode)
          Deprecated. Add extract child nodes that are the source extracts of a pooled extract.
private  void addPooledLabeledExtracts(DbControl dc, Node parentNode)
          Deprecated. Add labeled extract child nodes that are the source labeled extracts of a pooled labeled extract
private  void addPooledSamples(DbControl dc, Node parentNode)
          Deprecated. Add sample child nodes that are the source samples of a pooled sample.
private  Node addProtocol(DbControl dc, Node parentNode, Project.Default defaultProtocol)
          Deprecated. Add a protocol child node to items with a protocol.
private  Node addProtocolParameters(DbControl dc, Node protocolNode)
          Deprecated. Add protocol parameters child node to a protocol.
private  Node addRawBioAssay(DbControl dc, Node rawBioAssaysNode, RawBioAssay rba)
          Deprecated. Add a raw bioassay child node to the rawbioassays folder.
private  Node addRawBioAssays(DbControl dc, Node rootNode)
          Deprecated. Add raw bioassays child node to the experiment node.
private  Node addSample(DbControl dc, Node parentNode, Sample sample)
          Deprecated. Add a sample child node to a non-pooled extract.
private  Node addScan(DbControl dc, Node rawBioAssayNode)
          Deprecated. Add a scan child node to a raw bioassay.
private  Node addSoftware(DbControl dc, Node parentNode)
          Deprecated. Add a software child node to a raw bioassay.
private  void cacheChildNodes(Node node)
          Deprecated.  
private  void generateOverview(DbControl dc)
          Deprecated. Generates the overview and validation.
 Set<Annotatable> getAnnotatableParents(Annotatable item)
          Deprecated. Get all annotatatable parents, including parents of parents, of the given annotatable item.
private  Set<Annotatable> getAnnotatableParents(Annotatable current, Annotatable root)
          Deprecated.  
 Experiment getExperiment()
          Deprecated. Get the experiment of this overview.
 List<Failure> getFailures()
          Deprecated. Get all failures generated by validation rules.
 Set<AnnotationType> getMiameAnnotationTypes(Item itemType)
          Deprecated. Get the annotation types that have the 'Required for MIAME' flag set to true and is enabled for the specified item type.
 Node getNode(String nodeId)
          Deprecated. Get the node with the given ID.
static ExperimentOverview getOverview(Experiment experiment, Project project)
          Deprecated. (In 2.10) Use OverviewUtil.getNewOrCurrentOverview(DbControl, BasicItem, Project) instead
 Project getProject()
          Deprecated. Get the project of this overview (may be null).
 Node getRootNode()
          Deprecated. Get the root node (ie. the experiment node).
 ValidationOptions getValidationOptions()
          Deprecated. Get the validation options currently in use.
static Presets getValidationPresets(SessionControl sc)
          Deprecated. (In 2.10) Use OverviewUtil.getValidationPresets(SessionControl) instead
static Map<String,List<Validator>> getValidators()
          Deprecated. (In 2.10) Use OverviewUtil.getValidators() instead
private
<T extends BasicItem>
ItemQuery<T>
initQuery(ItemQuery<T> query, String sortAlias, String sortProperty)
          Deprecated. Set include options and sorting order for a query.
 void reset(DbControl dc)
          Deprecated. Reset the overview, regenerate the entire structure and revalidate everything.
static void saveValidationPresets(SessionControl sc)
          Deprecated. In 2.10, use OverviewUtil.saveValidationPresets(SessionControl) instead
 void updateFailureCountOnNodes()
          Deprecated. Updates the failure count (warnings and errors) on all nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

experiment

private Experiment experiment
Deprecated. 

project

private Project project
Deprecated. 

rootNode

private Node rootNode
Deprecated. 

validationOptions

private ValidationOptions validationOptions
Deprecated. 

failures

private List<Failure> failures
Deprecated. 

allNodes

private Map<String,Node> allNodes
Deprecated. 

miameAnnotations

private Map<Item,Set<AnnotationType>> miameAnnotations
Deprecated. 

annotatableParents

private Map<Object,Set<Annotatable>> annotatableParents
Deprecated. 

usedHybArrays

private Map<String,Node> usedHybArrays
Deprecated. 
Constructor Detail

ExperimentOverview

private ExperimentOverview(Experiment experiment,
                           Project project)
Deprecated. 
Create a new overview for the experiment using defaults from the specified project.

Method Detail

getValidators

public static Map<String,List<Validator>> getValidators()
Deprecated. (In 2.10) Use OverviewUtil.getValidators() instead


getOverview

public static ExperimentOverview getOverview(Experiment experiment,
                                             Project project)
Deprecated. (In 2.10) Use OverviewUtil.getNewOrCurrentOverview(DbControl, BasicItem, Project) instead

Get the existing experiment overview for an experiment or create a new one if none exist yet. The returned object is cached in the SessionControl:s session settings.

Parameters:
experiment - The experiment to get the overview for
project - Default from this project will be used if new overview need to be created.
Returns:
An ExperimentOverview object

getValidationPresets

public static Presets getValidationPresets(SessionControl sc)
Deprecated. (In 2.10) Use OverviewUtil.getValidationPresets(SessionControl) instead


saveValidationPresets

public static void saveValidationPresets(SessionControl sc)
Deprecated. In 2.10, use OverviewUtil.saveValidationPresets(SessionControl) instead


reset

public void reset(DbControl dc)
Deprecated. 
Reset the overview, regenerate the entire structure and revalidate everything. Use this method only if the structure or information in the experiment has changed. Use the updateFailureCountOnNodes() method instead if only the validation options has changed. That method is a lot quicker and doesn't require any database access.

Parameters:
dc - The DbControl to use for database access

generateOverview

private void generateOverview(DbControl dc)
Deprecated. 
Generates the overview and validation.


getExperiment

public Experiment getExperiment()
Deprecated. 
Get the experiment of this overview.


getProject

public Project getProject()
Deprecated. 
Get the project of this overview (may be null).


getMiameAnnotationTypes

public Set<AnnotationType> getMiameAnnotationTypes(Item itemType)
Deprecated. 
Get the annotation types that have the 'Required for MIAME' flag set to true and is enabled for the specified item type.

Parameters:
itemType - The item type
Returns:
An set containing the annotation types or null if no annotation types exists

getAnnotatableParents

public Set<Annotatable> getAnnotatableParents(Annotatable item)
Deprecated. 
Get all annotatatable parents, including parents of parents, of the given annotatable item. This information is useful for checking that an item only inherits annotations from one of the parents.

Parameters:
item - The child item
Returns:
A set containing all annotatable parents.

getAnnotatableParents

private Set<Annotatable> getAnnotatableParents(Annotatable current,
                                               Annotatable root)
Deprecated. 

getValidationOptions

public ValidationOptions getValidationOptions()
Deprecated. 
Get the validation options currently in use.


getRootNode

public Node getRootNode()
Deprecated. 
Get the root node (ie. the experiment node).


updateFailureCountOnNodes

public void updateFailureCountOnNodes()
Deprecated. 
Updates the failure count (warnings and errors) on all nodes. This method should be called if the validation options has changed. If the struture or information of the experiment has changed use the reset(DbControl) method instead. That method rebuilds the entire overview.


cacheChildNodes

private void cacheChildNodes(Node node)
Deprecated. 

getNode

public Node getNode(String nodeId)
Deprecated. 
Get the node with the given ID.

Parameters:
nodeId - The ID of the node
Returns:
A node or null if no node with the ID exists

getFailures

public List<Failure> getFailures()
Deprecated. 
Get all failures generated by validation rules. The list includes all failures regardless of validation options. The calling code should check the validation options if a failure should be ignored, treated as a warning or treated as an error.

See Also:
ValidationOptions.getSeverity(Validator), Failure.getValidator()

addExperimentalFactors

private Node addExperimentalFactors(DbControl dc,
                                    Node rootNode)
Deprecated. 
Add experimental factors child node to the experiment node. Creates a folder-type child node with the name experimental.factors and inside it nodes with names experimental.factor.ID where ID is the ID of the AnnotationType used as experimental factor.

See Also:
Experiment.getExperimentalFactors()

addRawBioAssays

private Node addRawBioAssays(DbControl dc,
                             Node rootNode)
Deprecated. 
Add raw bioassays child node to the experiment node. Creates a folder-type child node with the name rawbioassays and calls addRawBioAssay(DbControl, Node, RawBioAssay) for each raw bioassay.

See Also:
Experiment.getRawBioAssays()

addRawBioAssay

private Node addRawBioAssay(DbControl dc,
                            Node rawBioAssaysNode,
                            RawBioAssay rba)
Deprecated. 
Add a raw bioassay child node to the rawbioassays folder. Creates an item-type subnode with the name rawbioassay.ID where ID is the ID of the RawBioAssay.


addArrayDesign

private Node addArrayDesign(DbControl dc,
                            Node parentNode)
Deprecated. 
Add an array design child node to a raw bioassay or array batch. Creates an item-type node with the name arraydesign.


addScan

private Node addScan(DbControl dc,
                     Node rawBioAssayNode)
Deprecated. 
Add a scan child node to a raw bioassay. Creates an item-type node with the name scan.


addHybridization

private Node addHybridization(DbControl dc,
                              Node scanNode,
                              Node rawBioAssayNode)
Deprecated. 
Add a hybridization child node to a scan. Creates an item-type node with the name hybridization.


addImages

private Node addImages(DbControl dc,
                       Node scanNode)
Deprecated. 
Add images child node to a scan node. Creates a folder-type child node with the name images and calls addImage(DbControl, Node, Image) for each image.


addImage

private Node addImage(DbControl dc,
                      Node imagesNode,
                      Image image)
Deprecated. 
Add an image child node to the images folder. Creates an item-type subnode with the name image.ID where ID is the ID of the Image.


addLabeledExtracts

private Node addLabeledExtracts(DbControl dc,
                                Node hybNode,
                                Node rawBioAssayNode)
Deprecated. 
Add labeled extracts child node to a hybridization node. Creates a folder-type child node with the name labeledextracts and calls addLabeledExtract(DbControl, Node, LabeledExtract) for each labeled extract.


addLabeledExtract

private Node addLabeledExtract(DbControl dc,
                               Node parentNode,
                               LabeledExtract le)
Deprecated. 
Add a labeled extract child node to the labeled extracts folder. Creates an item-type subnode with the name labeledextract.ID where ID is the ID of the LabeledExtract.


addPooledLabeledExtracts

private void addPooledLabeledExtracts(DbControl dc,
                                      Node parentNode)
Deprecated. 
Add labeled extract child nodes that are the source labeled extracts of a pooled labeled extract


addExtract

private Node addExtract(DbControl dc,
                        Node parentNode,
                        Extract extract)
Deprecated. 
Add an extract child node to a non-pooled labeled extract. Creates an item-type node with the name extract.


addPooledExtracts

private void addPooledExtracts(DbControl dc,
                               Node parentNode)
Deprecated. 
Add extract child nodes that are the source extracts of a pooled extract.


addSample

private Node addSample(DbControl dc,
                       Node parentNode,
                       Sample sample)
Deprecated. 
Add a sample child node to a non-pooled extract. Creates an item-type node with the name sample.


addPooledSamples

private void addPooledSamples(DbControl dc,
                              Node parentNode)
Deprecated. 
Add sample child nodes that are the source samples of a pooled sample.


addBioSource

private Node addBioSource(DbControl dc,
                          Node sampleNode)
Deprecated. 
Add a biosource child node to a non-pooled sample. Creates an item-type node with the name biosource.


addArraySlide

private Node addArraySlide(DbControl dc,
                           Node hybNode)
Deprecated. 
Add an array slide child node to a hybridization. Creates an item-type node with the name slide.


addArrayBatch

private Node addArrayBatch(DbControl dc,
                           Node slideNode)
Deprecated. 
Add an array batch child node to an array slide. Creates an item-type node with the name batch.


addPlatform

private Node addPlatform(DbControl dc,
                         Node parentNode)
Deprecated. 
Add a platform / variant child node to items with platform (raw bioassay and array design). Creates an item-type node with the name platform and a subnode variant if present.


addSoftware

private Node addSoftware(DbControl dc,
                         Node parentNode)
Deprecated. 
Add a software child node to a raw bioassay. Creates an item-type node with the name software.


addHardware

private Node addHardware(DbControl dc,
                         Node parentNode,
                         String hardwareType)
Deprecated. 
Add a hardware child node to items with hardware (scanner, print robot, hyb. station, etc.) Creates an item-type node with the name hardware.


addProtocol

private Node addProtocol(DbControl dc,
                         Node parentNode,
                         Project.Default defaultProtocol)
Deprecated. 
Add a protocol child node to items with a protocol. Creates an item-type node with the name protocol.


addProtocolParameters

private Node addProtocolParameters(DbControl dc,
                                   Node protocolNode)
Deprecated. 
Add protocol parameters child node to a protocol. Creates a folder-type child node with the name parameters and inside it item-type nodes with the name parameter.ID for each protocol parameter. ID is the ID of the annotation type.

See Also:
Protocol.getParameters()

addAnnotations

private Node addAnnotations(DbControl dc,
                            Node parentNode)
Deprecated. 
Add annotations child node to an annotatable item. Creates a folder-type child node with the name annotations and inside it item-type nodes with the name annotationtype.ID for each annotation (primary and inherited). ID is the ID of the annotation type. If the logged in user doesn't have read permission for a particular annotation type a node with the name annotation.ID is created instead. In this case the ID is the ID of the annotation.

See Also:
Protocol.getParameters()

addDataFiles

private Node addDataFiles(DbControl dc,
                          Node parentNode)
Deprecated. 
Add data files child node to a FileStoreEnabled item. Creates a folder-type child node with the name fileset and inside it item-type nodes with the name member.ID for each data file. ID is the ID of the file set member.


initQuery

private <T extends BasicItem> ItemQuery<T> initQuery(ItemQuery<T> query,
                                                     String sortAlias,
                                                     String sortProperty)
Deprecated. 
Set include options and sorting order for a query.


2.17.2: 2011-06-17