Enum Merger.Resolution

java.lang.Object
java.lang.Enum<Merger.Resolution>
org.apache.sis.internal.metadata.Merger.Resolution
All Implemented Interfaces:
Serializable, Comparable<Merger.Resolution>, java.lang.constant.Constable
Enclosing class:
Merger

public static enum Merger.Resolution extends Enum<Merger.Resolution>
The action to perform when a source metadata element is about to be written in an existing target element. Many metadata elements defined by ISO 19115 allows multi-occurrence, i.e. are stored in Collection. When a value A is about to be added in an existing collection which already contains values B and C, then different scenarios are possible.

For A ⟶ {B, C}:

  • Value A may overwrite some values of B. This action is executed if Merger.resolve(A, B) returns MERGE.
  • Value A may overwrite some values of C. This action is executed if Merger.resolve(A, B) returns SEPARATE, then Merger.resolve(A, C) returns MERGE.
  • Value A may be added as a new value after B and C. This action is executed if Merger.resolve(A, B) and Merger.resolve(A, C) return SEPARATE.
  • Value A may be discarded. This action is executed if Merger.resolve(A, B) or Merger.resolve(A, C) return IGNORE.
See Also:
  • Enum Constant Details

    • MERGE

      public static final Merger.Resolution MERGE
      Indicates that source values should be written in target attributes of existing metadata element. No new metadata object is created. If a value already exists in the target metadata, then the merge(…) method will be invoked.
    • SEPARATE

      public static final Merger.Resolution SEPARATE
      Indicates that source values should be written in another metadata element.
    • IGNORE

      public static final Merger.Resolution IGNORE
      Indicates that source values should be discarded.
  • Constructor Details

    • Resolution

      private Resolution()
  • Method Details

    • values

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

      public static Merger.Resolution valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null