Package net.sf.basedb.util.listable
Class CollectExtracts
- java.lang.Object
-
- net.sf.basedb.util.listable.CollectExtracts
-
public class CollectExtracts extends Object
Collect extracts seen on derived bioassays and raw bioassays that has been loaded by other transformers. Use thecollectFromDerivedBioAssays(boolean)
andcollectFromRawBioAssays()
methods to create transformers that can be inserted into the chain ofSourceItemTransformerChain
.- Since:
- 3.5
- Author:
- Nicklas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
CollectExtracts.CollectChildren
Transformer implementation that collect the child extracts from the source or collected extracts.(package private) class
CollectExtracts.CollectFromDerivedBioAssays
Transformer implementation that given a set of derived bioassays load their linked extracts and store that in the parent class.(package private) class
CollectExtracts.CollectFromExtracts
Transformer implementation that store the given set of extracts in the parent class.(package private) class
CollectExtracts.CollectFromRawBioAssays
Transformer implementation that given a set of raw bioassays load their linked extracts and store that in the parent class.(package private) class
CollectExtracts.CollectParents
Transformer implementation that collect the parent extracts from the source or collected extracts.(package private) class
CollectExtracts.ResetCollected
Transformer implementation that reset the collected extracts before forwarding the call to the parent transformer.
-
Constructor Summary
Constructors Constructor Description CollectExtracts()
Create a new derived bioassay to physical bioassay transformer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceItemTransformer
collectChildrenOfCollected(boolean includeCollected)
The created transformer collect the ID:s of all child extracts to the already collected extracts and store them in thegetCollectedChildren()
.SourceItemTransformer
collectChildrenOfSource(boolean includeSource)
The created transformer collect the ID:s of all child extracts to the source extracts and store them in thegetCollectedChildren()
.SourceItemTransformer
collectFromDerivedBioAssays(boolean loadParents)
The created transformer collect the ID:s of all extracts linked from the source derived bioassays and then return the same set of derived bioassays again.SourceItemTransformer
collectFromExtracts()
The created transformer collect the ID:s of all extracts in the source collection and return same set of extracts again.SourceItemTransformer
collectFromRawBioAssays()
The created transformer collect the ID:s of all extracts linked from the source raw bioassays and then return the same set of raw bioassays again.SourceItemTransformer
collectParentsOfCollected(boolean includeCollected)
The created transformer collect the ID:s of all parent extracts to the already collected extracts and store them in thegetCollectedParents()
.SourceItemTransformer
collectParentsOfSource(boolean includeSource)
The created transformer collect the ID:s of all parent extracts to the source extracts and store them in thegetCollectedParents()
.Set<Integer>
getCollected()
Get all extracts that has been collected.Set<Integer>
getCollectedChildren()
Get child extracts that was collected by thecollectChildrenOfCollected(boolean)
and/orcollectChildrenOfSource(boolean)
collectors.Set<Integer>
getCollectedParents()
Get parent extracts that was collected by thecollectParentsOfSource(boolean)
orcollectParentsOfCollected(boolean)
collector.(package private) void
resetCollected()
Clear all collected extracts in order to prepare for a new collection.private SourceItemTransformer
wrapForReset(SourceItemTransformer transformer)
Wraps the parent transformer with a ResetCollected transformer the first time this method is called.
-
-
-
Method Detail
-
resetCollected
void resetCollected()
Clear all collected extracts in order to prepare for a new collection.- Since:
- 3.17
-
wrapForReset
private SourceItemTransformer wrapForReset(SourceItemTransformer transformer)
Wraps the parent transformer with a ResetCollected transformer the first time this method is called. If called more than once, the parent is return unwrapped.- Since:
- 3.17
-
collectFromDerivedBioAssays
public SourceItemTransformer collectFromDerivedBioAssays(boolean loadParents)
The created transformer collect the ID:s of all extracts linked from the source derived bioassays and then return the same set of derived bioassays again. If loadParents is set, extract ID:s will also be collected from all parent derived bioassays (as loaded byDerivedBioAssayToParentDerivedBioAssayTransformer
).
-
collectFromRawBioAssays
public SourceItemTransformer collectFromRawBioAssays()
The created transformer collect the ID:s of all extracts linked from the source raw bioassays and then return the same set of raw bioassays again.
-
collectFromExtracts
public SourceItemTransformer collectFromExtracts()
The created transformer collect the ID:s of all extracts in the source collection and return same set of extracts again.
-
collectParentsOfCollected
public SourceItemTransformer collectParentsOfCollected(boolean includeCollected)
The created transformer collect the ID:s of all parent extracts to the already collected extracts and store them in thegetCollectedParents()
. If the 'includeCollected' flag is set, the collected extracts are included among the parents.
-
collectParentsOfSource
public SourceItemTransformer collectParentsOfSource(boolean includeSource)
The created transformer collect the ID:s of all parent extracts to the source extracts and store them in thegetCollectedParents()
. If the 'includeSource' flag is set, the source extracts are included among the parents.
-
collectChildrenOfCollected
public SourceItemTransformer collectChildrenOfCollected(boolean includeCollected)
The created transformer collect the ID:s of all child extracts to the already collected extracts and store them in thegetCollectedChildren()
. If the 'includeCollected' flag is set, the collected extracts are included among the children.
-
collectChildrenOfSource
public SourceItemTransformer collectChildrenOfSource(boolean includeSource)
The created transformer collect the ID:s of all child extracts to the source extracts and store them in thegetCollectedChildren()
. If the 'includeSource' flag is set, the source extracts are included among the parents.
-
getCollectedParents
public Set<Integer> getCollectedParents()
Get parent extracts that was collected by thecollectParentsOfSource(boolean)
orcollectParentsOfCollected(boolean)
collector.
-
getCollectedChildren
public Set<Integer> getCollectedChildren()
Get child extracts that was collected by thecollectChildrenOfCollected(boolean)
and/orcollectChildrenOfSource(boolean)
collectors.
-
-