Package org.incenp.obofoundry.sssom
Enum MergeOption
- java.lang.Object
-
- java.lang.Enum<MergeOption>
-
- org.incenp.obofoundry.sssom.MergeOption
-
- All Implemented Interfaces:
Serializable,Comparable<MergeOption>
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
SetMergerobject.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MERGE_CURIE_MAPMerge the curie map from the source set into the destination set.MERGE_EXTENSIONSMerge extension slots from the source set into the destination set.MERGE_LISTSMerge the multi-valued slots of the source set into the corresponding slots of the destination set.MERGE_MAPPINGSAdd mappings of the source set to the mappings of the destination set.MERGE_SCALARSFill the scalar (single-valued) slots of the destination set with the values from the source set (overwriting any existing value).
-
Field Summary
Fields Modifier and Type Field Description static EnumSet<MergeOption>DEFAULTMerge all mappings and all metadata from the source set into the destination set, except the scalar (single-valued) slots.static EnumSet<MergeOption>MERGE_METADATAMerge all metadata from the source set into the destination set.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MergeOptionvalueOf(String name)Returns the enum constant of this type with the specified name.static MergeOption[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
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
SetMergerobject, for compatibility with established behaviour of thesssom-clicommand.
-
-
Method Detail
-
values
public static MergeOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MergeOption c : MergeOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MergeOption 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 nameNullPointerException- if the argument is null
-
-