Class ExtensionSlotHelper

java.lang.Object
org.incenp.obofoundry.sssom.util.ExtensionSlotHelper

public class ExtensionSlotHelper extends Object
Helper class to work with extension slots.

This class provides static method to convert extension slots to and from other slots, which were the original mechanism in SSSOM to store non-standard metadata. That mechanism is now deprecated in favour of extension slots, but since extension slots are not supported by all implementations, it can be useful to have a way to fallback to the old mechanism.

This should be considered experimental.

  • Method Details

    • toOther

      public static void toOther(MappingSet ms, boolean remove)
      Encodes extension slots into other values.
      Parameters:
      ms - The mapping set whose extension slots are to to converted to other values.
      remove - If true, the extension slots will be removed from the set after they have been converted.
    • fromOther

      public static void fromOther(MappingSet ms, boolean remove)
      Decodes the values of other slots into proper extension slots.
      Parameters:
      ms - The mapping set whose other slots are to be converted into extension slots.
      remove - If true, the other slots will be removed after the conversion.