Class ExtractLoader
java.lang.Object
net.sf.basedb.util.overview.loader.AbstractNodeLoader<I>
net.sf.basedb.util.overview.loader.BasicItemNodeLoader<Extract>
net.sf.basedb.util.overview.loader.ExtractLoader
- All Implemented Interfaces:
NodeLoader<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: 2019-02-26 11:10:15 +0100 (tis, 26 feb. 2019) $
-
Field Summary
Fields inherited from class net.sf.basedb.util.overview.loader.BasicItemNodeLoader
ALLOW_ROOT_NODE, allowAsRootNode, DENY_ROOT_NODE, factoryKey, nameGenerator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateForwardNode
(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, boolean onlyPushAnnotationTypes) 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, boolean onlyPushAnnotationTypes) 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.createPropertyNode
(DbControl dc, OverviewContext context, Node parentNode) A property node is created when moving in the reverse direction so that we can load child extracts+physical bioassays with theItemSubtype.getPushAnnotations()
flag set.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 nodeprivate 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.getAllChildren
(DbControl dc, Set<Integer> parents) getExtractChain
(Node node) 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) and child extracts+physical bioassays with a subtype that hasItemSubtype.getPushAnnotations()
flag set.Methods inherited from class net.sf.basedb.util.overview.loader.BasicItemNodeLoader
createItemNode, createRootNode, getNodeFactory, getNodeFactory, getNodeLoader, getNodeLoaderFactory, getNodeNameGenerator, getNodeValidator, getNodeValidatorFactory, postValidateFolder
Methods inherited from class net.sf.basedb.util.overview.loader.AbstractNodeLoader
loadChildNodes, loadChildNodesOfFolderNode, loadChildNodesOfItemNode
-
Constructor Details
-
ExtractLoader
public ExtractLoader()
-
-
Method Details
-
createForwardNode
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. It can also create all-loading node from a biomaterial list for the member samples.- Specified by:
createForwardNode
in interfaceNodeLoader<Extract>
- Overrides:
createForwardNode
in classAbstractNodeLoader<Extract>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- The folder node for the extracts (or null if used with a list)
-
createReverseNode
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
- Specified by:
createReverseNode
in interfaceNodeLoader<Extract>
- Overrides:
createReverseNode
in classAbstractNodeLoader<Extract>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The child node- Returns:
- A folder-type or item-type node
-
createPropertyNode
A property node is created when moving in the reverse direction so that we can load child extracts+physical bioassays with theItemSubtype.getPushAnnotations()
flag set. The parent node should be a sample or extract node.- Specified by:
createPropertyNode
in interfaceNodeLoader<Extract>
- Overrides:
createPropertyNode
in classAbstractNodeLoader<Extract>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- A node (may be a folder-type node with many subnodes), or null
- Since:
- 3.1
-
loadPropertyChildNodes
Loads property nodes of an extract.- Annotations:
AnnotationLoader.createPropertyNode(DbControl, OverviewContext, Node)
- Bioplate/well:
BioPlateLoader.createPropertyNode(DbControl, OverviewContext, Node)
- Protocol:
ProtocolLoader.createPropertyNode(DbControl, OverviewContext, Node)
- Kit:
KitLoader.createPropertyNode(DbControl, OverviewContext, Node)
- Hardware:
HardwareLoader.createPropertyNode(DbControl, OverviewContext, Node)
- Tag:
TagLoader.createPropertyNode(DbControl, OverviewContext, Node)
- Overrides:
loadPropertyChildNodes
in classAbstractNodeLoader<Extract>
- Annotations:
-
loadForwardChildNodes
Loads the child extracts and physical bioassays that has been created from this extract. Derived and raw bioassays linking to this parent extract and doesn't have a parent derived bioassay are also loaded.- Overrides:
loadForwardChildNodes
in classAbstractNodeLoader<Extract>
- See Also:
-
loadReverseChildNodes
Load either the parent sample or extract(s) and child extracts+physical bioassays with a subtype that hasItemSubtype.getPushAnnotations()
flag set. -
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, boolean onlyPushAnnotationTypes) 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, boolean onlyPushAnnotationTypes) Create forward-loading extract nodes for the (pooled) extract that has a given extract among their parents. If the parent node is a forward-loading node all child nodes are loaded, otherwise only child nodes that have an item with a subtype that hasItemSubtype.getPushAnnotations()
set. -
getExtractChain
-
getAllChildren
-