Enum Class MergeOption

java.lang.Object
java.lang.Enum<MergeOption>
org.incenp.obofoundry.sssom.MergeOption
All Implemented Interfaces:
Serializable, Comparable<MergeOption>, Constable

public enum MergeOption extends Enum<MergeOption>
Represents various possible behaviours when merging a mapping set into another.

This is used to control the behaviour of the SetMerger object.

  • Enum Constant Details

    • MERGE_MAPPINGS

      public static final MergeOption MERGE_MAPPINGS
      Add mappings of the source set to the mappings of the destination set.
    • MERGE_SCALARS

      public static final MergeOption MERGE_SCALARS
      Fill the scalar (single-valued) slots of the destination set with the values from the source set (overwriting any existing value).
    • MERGE_LISTS

      public static final MergeOption MERGE_LISTS
      Merge the multi-valued slots of the source set into the corresponding slots of the destination set.
    • MERGE_EXTENSIONS

      public static final MergeOption MERGE_EXTENSIONS
      Merge extension slots from the source set into the destination set. If both sets have an extension slot with the same property, the value from the source set takes precedence.
    • MERGE_CURIE_MAP

      public static final MergeOption MERGE_CURIE_MAP
      Merge the curie map from the source set into the destination set. If both maps define the same prefix name, the definition from the source set takes precedence.
  • Field Details

    • MERGE_METADATA

      public static final EnumSet<MergeOption> MERGE_METADATA
      Merge all metadata from the source set into the destination set.

      This is equivalent to MERGE_SCALARS | MERGE_LISTS | MERGE_EXTENSIONS | MERGE_CURIE_MAP.

    • DEFAULT

      public static final EnumSet<MergeOption> DEFAULT
      Merge all mappings and all metadata from the source set into the destination set, except the scalar (single-valued) slots.

      This is the default behaviour of the SetMerger object, for compatibility with established behaviour of the sssom-cli command.

  • Method Details

    • values

      public static MergeOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MergeOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null