3.0.2: 2012-01-25

net.sf.basedb.util.overview.loader
Class ExtractLoader

java.lang.Object
  extended by net.sf.basedb.util.overview.loader.AbstractNodeLoader<I>
      extended by net.sf.basedb.util.overview.loader.BasicItemNodeLoader<Extract>
          extended by net.sf.basedb.util.overview.loader.ExtractLoader
All Implemented Interfaces:
NodeLoader<Extract>

public class ExtractLoader
extends BasicItemNodeLoader<Extract>

Node loader implementation for extracts. The forward-loading direction goes from Sample:s -> Extract:s -> PhysicalBioAssay:s. The reverse-loading direction is the opposite direction. In both cases we also need to consider pooled extracts.

Version:
2.10
Author:
Nicklas
Last modified
$Date: 2011-10-14 15:08:23 +0200 (Fri, 14 Oct 2011) $

Field Summary
 
Fields inherited from class net.sf.basedb.util.overview.loader.BasicItemNodeLoader
ALLOW_ROOT_NODE, allowAsRootNode, DENY_ROOT_NODE, factoryKey, nameGenerator
 
Constructor Summary
ExtractLoader()
           
 
Method Summary
 Node createForwardNode(DbControl dc, OverviewContext context, Node parentNode)
          Create forward-loading extract nodes from a given parent sample or extract.
private  Node createForwardNode(Extract parentExtract, DbControl dc, OverviewContext context, Node parentNode)
          Create forward-loading extract nodes for the (pooled) extract that has a given extract among their parents.
private  Node createForwardNode(Sample sample, DbControl dc, OverviewContext context, Node parentNode)
          Create forward-loading extract nodes for the extracts that has a given sample as their parent.
private  Node createPooledReverseNode(Extract product, DbControl dc, OverviewContext context, Node parentNode)
          Create reverse-loading extract nodes of a pooled extract.
 Node createReverseNode(DbControl dc, OverviewContext context, Node parentNode)
          The parent node can be one of: Physical bioassay: Load the source extract(s) and return a folder-type node Extract: Load the parent extracts and return either a folder-type or item-type node depending on the number of parents Raw bioassay: Load the parent extract and return an item-type node Derived bioassay: Load the parent extract and return an item-type node
private  Node createReverseNode(DerivedBioAssay bioAssay, DbControl dc, OverviewContext context, Node bioAssayNode)
           
private  Node createReverseNode(PhysicalBioAssay bioAssay, DbControl dc, OverviewContext context, Node bioAssayNode)
          Create reverse-loading extract nodes from a physical bioassay.
private  Node createReverseNode(RawBioAssay raw, DbControl dc, OverviewContext context, Node rawNode)
           
private  Node createSingleParentReverseNode(Extract bioMaterial, DbControl dc, OverviewContext context, Node parentNode)
          Create a reverse-loading extract node from an extract.
protected  void loadForwardChildNodes(DbControl dc, OverviewContext context, Node extractNode)
          Loads the child extracts and physical bioassays that has been created from this extract.
protected  void loadPropertyChildNodes(DbControl dc, OverviewContext context, Node extractNode)
          Loads property nodes of an extract.
protected  void loadReverseChildNodes(DbControl dc, OverviewContext context, Node extractNode)
          Load either the parent sample or extract(s).
 
Methods inherited from class net.sf.basedb.util.overview.loader.BasicItemNodeLoader
createItemNode, createRootNode, getNodeFactory, getNodeFactory, getNodeLoader, getNodeLoaderFactory, getNodeValidator, getNodeValidatorFactory, postValidateFolder
 
Methods inherited from class net.sf.basedb.util.overview.loader.AbstractNodeLoader
createPropertyNode, loadChildNodes, loadChildNodesOfFolderNode, loadChildNodesOfItemNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractLoader

public ExtractLoader()
Method Detail

createForwardNode

public Node createForwardNode(DbControl dc,
                              OverviewContext context,
                              Node parentNode)
Create forward-loading extract nodes from a given parent sample or extract. In both cases the returned node is a folder-type node that contains the child extracts.

Specified by:
createForwardNode in interface NodeLoader<Extract>
Overrides:
createForwardNode in class AbstractNodeLoader<Extract>
Parameters:
dc - The DbControl to use for database access
context - The overview context
parentNode - The parent node
Returns:
The folder node for the extracts

createReverseNode

public Node createReverseNode(DbControl dc,
                              OverviewContext context,
                              Node parentNode)
The parent node can be one of:

Specified by:
createReverseNode in interface NodeLoader<Extract>
Overrides:
createReverseNode in class AbstractNodeLoader<Extract>
Parameters:
dc - The DbControl to use for database access
context - The overview context
parentNode - The child node
Returns:
A folder-type or item-type node

loadPropertyChildNodes

protected void loadPropertyChildNodes(DbControl dc,
                                      OverviewContext context,
                                      Node extractNode)
Loads property nodes of an extract.

Overrides:
loadPropertyChildNodes in class AbstractNodeLoader<Extract>

loadForwardChildNodes

protected void loadForwardChildNodes(DbControl dc,
                                     OverviewContext context,
                                     Node extractNode)
Loads the child extracts and physical bioassays that has been created from this extract. Raw bioassays linking to this parent extract and doesn't have a parent derived bioassay are alos loaded.

Overrides:
loadForwardChildNodes in class AbstractNodeLoader<Extract>
See Also:
createForwardNode(DbControl, OverviewContext, Node), PhysicalBioAssayLoader.createForwardNode(DbControl, OverviewContext, Node)

loadReverseChildNodes

protected void loadReverseChildNodes(DbControl dc,
                                     OverviewContext context,
                                     Node extractNode)
Load either the parent sample or extract(s).

Overrides:
loadReverseChildNodes in class AbstractNodeLoader<Extract>
See Also:
createReverseNode(DbControl, OverviewContext, Node), SampleLoader.createReverseNode(DbControl, OverviewContext, Node)

createPooledReverseNode

private Node createPooledReverseNode(Extract product,
                                     DbControl dc,
                                     OverviewContext context,
                                     Node parentNode)
Create reverse-loading extract nodes of a pooled extract. Eg. the child nodes are the source extracts that was pooled to create the given product.


createSingleParentReverseNode

private Node createSingleParentReverseNode(Extract bioMaterial,
                                           DbControl dc,
                                           OverviewContext context,
                                           Node parentNode)
Create a reverse-loading extract node from an extract. Eg. the child node is the extract that is the parent of the (non-pooled) extract.


createReverseNode

private Node createReverseNode(PhysicalBioAssay bioAssay,
                               DbControl dc,
                               OverviewContext context,
                               Node bioAssayNode)
Create reverse-loading extract nodes from a physical bioassay. Eg. the child nodes are the extracts that has been used on a bioassay.


createReverseNode

private Node createReverseNode(DerivedBioAssay bioAssay,
                               DbControl dc,
                               OverviewContext context,
                               Node bioAssayNode)

createReverseNode

private Node createReverseNode(RawBioAssay raw,
                               DbControl dc,
                               OverviewContext context,
                               Node rawNode)

createForwardNode

private Node createForwardNode(Sample sample,
                               DbControl dc,
                               OverviewContext context,
                               Node parentNode)
Create forward-loading extract nodes for the extracts that has a given sample as their parent.


createForwardNode

private Node createForwardNode(Extract parentExtract,
                               DbControl dc,
                               OverviewContext context,
                               Node parentNode)
Create forward-loading extract nodes for the (pooled) extract that has a given extract among their parents.


3.0.2: 2012-01-25