Package net.sf.okapi.common.resource
Enum CodeMatchStrategy
- java.lang.Object
-
- java.lang.Enum<CodeMatchStrategy>
-
- net.sf.okapi.common.resource.CodeMatchStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<CodeMatchStrategy>
public enum CodeMatchStrategy extends Enum<CodeMatchStrategy>
Enums define various matching criteria between two lists of codes (normally source and target).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CodeMatchStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static CodeMatchStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LAX
public static final CodeMatchStrategy LAX
Use for leveraged targets. We assume Code id's will *not* match. Minimally match onCode.getTagType()
, but tryCode.getId()
andCode.getOriginalId()
andCode.getData()
first. With special logic for matching isolated codes.
-
STRICT
public static final CodeMatchStrategy STRICT
Use as default for filter merging. Must match Code.ID or Code.originalID TryCode.getId()
orCode.getOriginalId()
first, if no match then tryCode.getData()
andCode.getTagType()
. With special logic for matching isolated codes.
-
-
Method Detail
-
values
public static CodeMatchStrategy[] 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 (CodeMatchStrategy c : CodeMatchStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CodeMatchStrategy 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
-
-