Package org.incenp.obofoundry.sssom
Class VersionEnforcerVisitor<T>
java.lang.Object
org.incenp.obofoundry.sssom.slots.SlotVisitorBase<T>
org.incenp.obofoundry.sssom.VersionEnforcerVisitor<T>
- Type Parameters:
T-
- All Implemented Interfaces:
ISlotVisitor<T>
Helper object to forcibly remove from a set or a mapping all slots or slot
values that are incompatible with a given version of the SSSOM specification.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvisit(EntityTypeSlot<T> slot, T object, EntityType value) Visits a slot that holds an entity type enumeration value.voidvisit(MappingCardinalitySlot<T> slot, T object, MappingCardinality value) Visits a slot that holds a mapping cardinality enumeration value.voidVisits a generic slot.
-
Constructor Details
-
VersionEnforcerVisitor
Creates a new instance.- Parameters:
version- The version of the SSSOM specification to be enforced.
-
-
Method Details
-
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<T>- Overrides:
visitin classSlotVisitorBase<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.unused- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds an entity type enumeration value.- Specified by:
visitin interfaceISlotVisitor<T>- Overrides:
visitin classSlotVisitorBase<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds a mapping cardinality enumeration value.- Specified by:
visitin interfaceISlotVisitor<T>- Overrides:
visitin classSlotVisitorBase<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-