Class SampleLoader
java.lang.Object
net.sf.basedb.util.overview.loader.AbstractNodeLoader<I>
net.sf.basedb.util.overview.loader.BasicItemNodeLoader<Sample>
net.sf.basedb.util.overview.loader.SampleLoader
- All Implemented Interfaces:
NodeLoader<Sample>
Node loader implementation for samples. The forward-loading
direction goes from
BioSource
:s -> Sample
:s ->
Extract
:s. The reverse-loading direction is the opposite
direction. In both cases we also need to consider pooled samples.- 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 TypeMethodDescriptionprivate Node
createForwardNode
(BioSource bioSource, DbControl dc, OverviewContext context, Node parentNode, boolean onlyPushAnnotationTypes) Create forward-loading sample nodes for the samples that has a given biosource as their parent.createForwardNode
(DbControl dc, OverviewContext context, Node parentNode) Create forward-loading sample nodes from a given parent biosource or sample.private Node
createForwardNode
(Sample parentSample, DbControl dc, OverviewContext context, Node parentNode, boolean onlyPushAnnotationTypes) Create forward-loading sample nodes for the (pooled) samples that has a given sample as their parent.private Node
createPooledReverseNode
(Sample product, DbControl dc, OverviewContext context, Node parentNode) Create reverse-loading samples nodes of a sample with other sample(s) as parent items.createPropertyNode
(DbControl dc, OverviewContext context, Node parentNode) A property node is created when moving in the reverse direction so that we can load child samples+extracts with theItemSubtype.getPushAnnotations()
flag set.createReverseNode
(DbControl dc, OverviewContext context, Node parentNode) Create reverse-loading sample nodes from an extract node or from a pooled sample.private Node
createSingleParentReverseNode
(MeasuredBioMaterial bioMaterial, DbControl dc, OverviewContext context, Node parentNode) Create a reverse-loading sample node from an extract or sample.protected void
loadForwardChildNodes
(DbControl dc, OverviewContext context, Node sampleNode) Loads the pooled samples and extracts that has been created from this sample.protected void
loadPropertyChildNodes
(DbControl dc, OverviewContext context, Node sampleNode) Loads property nodes of a sample.protected void
loadReverseChildNodes
(DbControl dc, OverviewContext context, Node sampleNode) If the sample is a pooled sample, loads the parent samples that it was pooled from.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
-
SampleLoader
public SampleLoader()
-
-
Method Details
-
createForwardNode
Create forward-loading sample nodes from a given parent biosource or sample. In both cases the returned node is a folder-type node that contains the child samples. It can also create all-loading node from a biomaterial list for the member samples.- Specified by:
createForwardNode
in interfaceNodeLoader<Sample>
- Overrides:
createForwardNode
in classAbstractNodeLoader<Sample>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- The folder node for the samples (or null if used with a list)
-
createReverseNode
Create reverse-loading sample nodes from an extract node or from a pooled sample. In the first case, the returned node is an item-type node with the parent sample. In the second case, the returned node is a folder-type node with the pooled samples.- Specified by:
createReverseNode
in interfaceNodeLoader<Sample>
- Overrides:
createReverseNode
in classAbstractNodeLoader<Sample>
- 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 samples+extracts with theItemSubtype.getPushAnnotations()
flag set. The parent node should be a biosource or sample node.- Specified by:
createPropertyNode
in interfaceNodeLoader<Sample>
- Overrides:
createPropertyNode
in classAbstractNodeLoader<Sample>
- 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 a sample.- 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)
- Overrides:
loadPropertyChildNodes
in classAbstractNodeLoader<Sample>
- Annotations:
-
loadForwardChildNodes
Loads the pooled samples and extracts that has been created from this sample. -
loadReverseChildNodes
If the sample is a pooled sample, loads the parent samples that it was pooled from. Otherwise load the parent biosource. Also load any child samples or extracts that have a subtype with theItemSubtype.getPushAnnotations()
flag set. -
createPooledReverseNode
private Node createPooledReverseNode(Sample product, DbControl dc, OverviewContext context, Node parentNode) Create reverse-loading samples nodes of a sample with other sample(s) as parent items. Eg. the child nodes are the source sample(s) that was used to create the given product. -
createSingleParentReverseNode
private Node createSingleParentReverseNode(MeasuredBioMaterial bioMaterial, DbControl dc, OverviewContext context, Node parentNode) Create a reverse-loading sample node from an extract or sample. Eg. the child node is the sample that is the parent of the (non-pooled) extract/sample. -
createForwardNode
private Node createForwardNode(BioSource bioSource, DbControl dc, OverviewContext context, Node parentNode, boolean onlyPushAnnotationTypes) Create forward-loading sample nodes for the samples that has a given biosource as their parent. -
createForwardNode
private Node createForwardNode(Sample parentSample, DbControl dc, OverviewContext context, Node parentNode, boolean onlyPushAnnotationTypes) Create forward-loading sample nodes for the (pooled) samples that has a given sample as their parent.
-