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 the collectFromDerivedBioAssays(boolean) and collectFromRawBioAssays() methods to create transformers that can be inserted into the chain of SourceItemTransformerChain.
Since:
3.5
Author:
Nicklas
  • Field Details

    • collected

      private final Set<Integer> collected
    • parents

      private final Set<Integer> parents
    • children

      private final Set<Integer> children
    • needWrapper

      private boolean needWrapper
  • Constructor Details

    • CollectExtracts

      public CollectExtracts()
      Create a new derived bioassay to physical bioassay transformer.
  • Method Details

    • 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 by DerivedBioAssayToParentDerivedBioAssayTransformer).
    • 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 the getCollectedParents(). 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 the getCollectedParents(). 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 the getCollectedChildren(). 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 the getCollectedChildren(). If the 'includeSource' flag is set, the source extracts are included among the parents.
    • getCollected

      public Set<Integer> getCollected()
      Get all extracts that has been collected.
    • getCollectedParents

      public Set<Integer> getCollectedParents()
      Get parent extracts that was collected by the collectParentsOfSource(boolean) or collectParentsOfCollected(boolean) collector.
    • getCollectedChildren

      public Set<Integer> getCollectedChildren()
      Get child extracts that was collected by the collectChildrenOfCollected(boolean) and/or collectChildrenOfSource(boolean) collectors.