2.17.2: 2011-06-17

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 -> LabeledExtract: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: 2010-11-18 08:26:30 +0100 (Thu, 18 Nov 2010) $

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 of 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.
 Node createReverseNode(DbControl dc, OverviewContext context, Node parentNode)
          Create reverse-loading extract nodes from a labeled extract node or from a pooled extract.
private  Node createReverseNode(Extract product, DbControl dc, OverviewContext context, Node parentNode)
          Create reverse-loading extract nodes of a pooled extract.
private  Node createReverseNode(LabeledExtract labeledExtract, DbControl dc, OverviewContext context, Node parentNode)
          Create a reverse-loading extract node from a labeled extract.
protected  void loadForwardChildNodes(DbControl dc, OverviewContext context, Node extractNode)
          Loads the pooled extracts and labled extracts 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)
          If the extract is a pooled extract, loads the parent extracts that it was pooled from.
 
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 of 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)
Create reverse-loading extract nodes from a labeled extract node or from a pooled extract. In the first case, the returned node is an item-type node with the parent extract. In the second case, the returned node is a folder-type node with the pooled extracts.

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 pooled extracts and labled extracts that has been created from this extract.

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

loadReverseChildNodes

protected void loadReverseChildNodes(DbControl dc,
                                     OverviewContext context,
                                     Node extractNode)
If the extract is a pooled extract, loads the parent extracts that it was pooled from. Otherwise load the parent sample.

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

createReverseNode

private Node createReverseNode(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.


createReverseNode

private Node createReverseNode(LabeledExtract labeledExtract,
                               DbControl dc,
                               OverviewContext context,
                               Node parentNode)
Create a reverse-loading extract node from a labeled extract. Eg. the child node is the extract that is the parent of the (non-pooled) labeled extract.


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.


2.17.2: 2011-06-17