Class SlotVisitorBase<T>

java.lang.Object
org.incenp.obofoundry.sssom.slots.SlotVisitorBase<T>
Type Parameters:
T - The SSSOM object whose slots this visitor will visit.
All Implemented Interfaces:
ISlotVisitor<T>
Direct Known Subclasses:
SetMerger, SlotExtractor

public class SlotVisitorBase<T> extends Object implements ISlotVisitor<T>
A default implementation of the ISlotVisitor interface that does nothing for every slot type. Client code can extend this class and override only the method they need instead of implementing ISlotVisitor directly.
  • Constructor Details

    • SlotVisitorBase

      public SlotVisitorBase()
  • Method Details

    • visit

      public void visit(Slot<T> slot, T object, Object value)
      Description copied from interface: ISlotVisitor
      Visits 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:
      visit in interface ISlotVisitor<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

      public void visit(StringSlot<T> slot, T object, String value)
      Description copied from interface: ISlotVisitor
      Visits a string-typed slot.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(StringSlot<T> slot, T object, List<String> values)
      Description copied from interface: ISlotVisitor
      Visits a multi-valued string-typed slot.
      Specified by:
      visit in interface ISlotVisitor<T>
      Parameters:
      slot - The slot that is being visited.
      object - The object to which the slot is attached.
      values - The values of the slot.
    • visit

      public void visit(URISlot<T> slot, T object, String value)
      Description copied from interface: ISlotVisitor
      Visits a URI-typed slot.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(URISlot<T> slot, T object, List<String> values)
      Description copied from interface: ISlotVisitor
      Visits a multi-valued URI-typed slot.
      Specified by:
      visit in interface ISlotVisitor<T>
      Parameters:
      slot - The slot that is being visited.
      object - The object to which the slot is attached.
      values - The values of the slot.
    • visit

      public void visit(EntityReferenceSlot<T> slot, T object, String value)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds an entity reference.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(EntityReferenceSlot<T> slot, T object, List<String> values)
      Description copied from interface: ISlotVisitor
      Visits a multi-valued slot that holds entity references.
      Specified by:
      visit in interface ISlotVisitor<T>
      Parameters:
      slot - The slot that is being visited.
      object - The object to which the slot is attached.
      values - The values of the slot.
    • visit

      public void visit(DoubleSlot<T> slot, T object, Double value)
      Description copied from interface: ISlotVisitor
      Visits a double-typed slot.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(DateSlot<T> slot, T object, LocalDate value)
      Description copied from interface: ISlotVisitor
      Visits a date-typed slot.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(EntityTypeSlot<T> slot, T object, EntityType value)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds an entity type enumeration value.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(MappingCardinalitySlot<T> slot, T object, MappingCardinality value)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds a mapping cardinality enumeration value.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(PredicateModifierSlot<T> slot, T object, PredicateModifier value)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds a predicate modifier enumeration value.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(VersionSlot<T> slot, T object, Version value)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds a SSSOM version value.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(CurieMapSlot<T> slot, T object, Map<String,String> value)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds a curie map.
      Specified by:
      visit in interface ISlotVisitor<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

      public void visit(ExtensionDefinitionSlot<T> slot, T object, List<ExtensionDefinition> values)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds a list of extension definitions for non-standard metadata.
      Specified by:
      visit in interface ISlotVisitor<T>
      Parameters:
      slot - The slot that is being visited.
      object - The object to which the slot is attached.
      values - The values of the slot.
    • visit

      public void visit(ExtensionSlot<T> slot, T object, Map<String,ExtensionValue> value)
      Description copied from interface: ISlotVisitor
      Visits a slot that holds extension values (non-standard metadata).
      Specified by:
      visit in interface ISlotVisitor<T>
      Parameters:
      slot - The slot that is being visited.
      object - The object to which the slot is attached.
      value - The values of the slot.