Package net.sf.basedb.util.listable
Class PushToParentsTransformer
- java.lang.Object
-
- net.sf.basedb.util.listable.PushToParentsTransformer
-
- All Implemented Interfaces:
SourceItemTransformer
public class PushToParentsTransformer extends Object implements SourceItemTransformer
Transformer implementation that can be used to to find parent items to children that have a subtype with the "push annotations to parent" flag set. Example: The source list is extracts of a subtype with this flag. This transformer will find all parent items to source list. If any of the parent items also has a subtype with the "push annotations" flag to process is repeated. This implemntatation works with SAMPLE or EXTRACT types only. If starting with a SAMPLE list it will also move up to BIOSOURCE and then back down one step. If starting with a EXTRACT list it will move up to SAMPLE and BIOSOURCE (if all intermediate steps have the "push annotations" flag). If used in a chain, this transformation should be used first in the chain.- Since:
- 3.16
-
-
Constructor Summary
Constructors Constructor Description PushToParentsTransformer(Item itemType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Set<Integer>
getAllSamples(TransformContext context, Set<Integer> source)
Item
getSourceItemType()
Get the item type of the source items.Item
getTargetItemType()
Get the item type of the target items.Set<Integer>
transform(TransformContext context, Set<Integer> source)
Transform the given set of source item ID:s into a set of target item ID:s
-
-
-
Field Detail
-
itemType
private final Item itemType
-
-
Constructor Detail
-
PushToParentsTransformer
public PushToParentsTransformer(Item itemType)
-
-
Method Detail
-
getSourceItemType
public Item getSourceItemType()
Description copied from interface:SourceItemTransformer
Get the item type of the source items.- Specified by:
getSourceItemType
in interfaceSourceItemTransformer
-
getTargetItemType
public Item getTargetItemType()
Description copied from interface:SourceItemTransformer
Get the item type of the target items.- Specified by:
getTargetItemType
in interfaceSourceItemTransformer
-
transform
public Set<Integer> transform(TransformContext context, Set<Integer> source)
Description copied from interface:SourceItemTransformer
Transform the given set of source item ID:s into a set of target item ID:s- Specified by:
transform
in interfaceSourceItemTransformer
-
getAllSamples
private Set<Integer> getAllSamples(TransformContext context, Set<Integer> source)
-
-