Package org.incenp.obofoundry.sssom
Class SetMerger
- All Implemented Interfaces:
ISlotVisitor<MappingSet>
Helper object to merge one mapping set into another.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the options that define the behaviour of this object.voidmerge(MappingSet dst, MappingSet src) Merges one set into another, according to the current configuration.voidsetMergeOptions(EnumSet<MergeOption> options) Sets the options to configure the behaviour of this object.voidvisit(CurieMapSlot<MappingSet> slot, MappingSet src, Map<String, String> values) Visits a slot that holds a curie map.voidvisit(ExtensionDefinitionSlot<MappingSet> slot, MappingSet object, List<ExtensionDefinition> values) Visits a slot that holds a list of extension definitions for non-standard metadata.voidvisit(ExtensionSlot<MappingSet> slot, MappingSet src, Map<String, ExtensionValue> values) Visits a slot that holds extension values (non-standard metadata).voidvisit(Slot<MappingSet> slot, MappingSet src, Object value) Visits a generic slot.voidvisit(StringSlot<MappingSet> slot, MappingSet src, List<String> values) Visits a multi-valued string-typed slot.
-
Constructor Details
-
SetMerger
public SetMerger()
-
-
Method Details
-
setMergeOptions
Sets the options to configure the behaviour of this object. This replaces all pre-existing options.- Parameters:
options- The new set of options.
-
getMergeOptions
Gets the options that define the behaviour of this object. The returned set may be modified to change the behaviour.- Returns:
- The set of options currently used by this object.
-
merge
Merges one set into another, according to the current configuration.- Parameters:
dst- The destination set, in which the source set will be merged.src- The source set to merge into the destination set.
-
visit
Description copied from interface:ISlotVisitorVisits a generic slot.This method is normally not used as all slots in a SSSOM object have more precise types. But it can be used to implement behaviours that should be common to several slot types.
- Specified by:
visitin interfaceISlotVisitor<MappingSet>- Overrides:
visitin classSlotVisitorBase<MappingSet>- Parameters:
slot- The slot that is being visited.src- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a multi-valued string-typed slot.- Specified by:
visitin interfaceISlotVisitor<MappingSet>- Overrides:
visitin classSlotVisitorBase<MappingSet>- Parameters:
slot- The slot that is being visited.src- The object to which the slot is attached.values- The values of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds a curie map.- Specified by:
visitin interfaceISlotVisitor<MappingSet>- Overrides:
visitin classSlotVisitorBase<MappingSet>- Parameters:
slot- The slot that is being visited.src- The object to which the slot is attached.values- The value of the slot.
-
visit
public void visit(ExtensionSlot<MappingSet> slot, MappingSet src, Map<String, ExtensionValue> values) Description copied from interface:ISlotVisitorVisits a slot that holds extension values (non-standard metadata).- Specified by:
visitin interfaceISlotVisitor<MappingSet>- Overrides:
visitin classSlotVisitorBase<MappingSet>- Parameters:
slot- The slot that is being visited.src- The object to which the slot is attached.values- The values of the slot.
-
visit
public void visit(ExtensionDefinitionSlot<MappingSet> slot, MappingSet object, List<ExtensionDefinition> values) Description copied from interface:ISlotVisitorVisits a slot that holds a list of extension definitions for non-standard metadata.- Specified by:
visitin interfaceISlotVisitor<MappingSet>- Overrides:
visitin classSlotVisitorBase<MappingSet>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.values- The values of the slot.
-