Package org.apache.sis.internal.metadata
Enum Merger.Resolution
- All Implemented Interfaces:
Serializable
,Comparable<Merger.Resolution>
,java.lang.constant.Constable
- Enclosing class:
- Merger
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)
returnsMERGE
. - Value A may overwrite some values of C. This action is executed if
Merger.resolve(A, B)
returnsSEPARATE
, thenMerger.resolve(A, C)
returnsMERGE
. - Value A may be added as a new value after B and C.
This action is executed if
Merger.resolve(A, B)
andMerger.resolve(A, C)
returnSEPARATE
. - Value A may be discarded. This action is executed if
Merger.resolve(A, B)
orMerger.resolve(A, C)
returnIGNORE
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Merger.Resolution
Returns the enum constant of this type with the specified name.static Merger.Resolution[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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 themerge(…)
method will be invoked. -
SEPARATE
Indicates that source values should be written in another metadata element. -
IGNORE
Indicates that source values should be discarded.
-
-
Constructor Details
-
Resolution
private Resolution()
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-