Enum Class CommonPredicate
- All Implemented Interfaces:
Serializable
,Comparable<CommonPredicate>
,Constable
Represents some "well-known" mapping predicates for which we have built-in
knowledge on how to invert them.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic CommonPredicate
fromString
(String v) Parses a string into a common predicate.Gets the inverse predicate for this predicate.static Mapping
Deprecated.boolean
isExact()
Indicates whether the predicate is “exact”.boolean
Indicates whether a predicate can be inverted.toString()
static CommonPredicate
Returns the enum constant of this class with the specified name.static CommonPredicate[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SKOS_EXACT_MATCH
-
SKOS_NARROW_MATCH
-
SKOS_BROAD_MATCH
-
OWL_EQUIVALENT_CLASS
-
SEMAPV_CROSS_SPECIES_EXACT_MATCH
-
SEMAPV_CROSS_SPECIES_NARROW_MATCH
-
SEMAPV_CROSS_SPECIES_BROAD_MATCH
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
isExact
public boolean isExact()Indicates whether the predicate is “exact”. A mapping with an exact predicate can be inverted without changing the predicate.- Returns:
true
if the predicate is exact,false
otherwise.
-
getInverse
Gets the inverse predicate for this predicate. When a predicate has a known inverse predicate, the inverse predicate should be used when inverting a mapping.- Returns:
- The inverse predicate, if known; otherwise
null
.
-
isInvertible
public boolean isInvertible()Indicates whether a predicate can be inverted. A predicate can be inverted if it is an exact predicate or if it has a known inverse predicate.- Returns:
true
if the predicate can be inverted, otherwisefalse
.
-
toString
- Overrides:
toString
in classEnum<CommonPredicate>
-
fromString
Parses a string into a common predicate.- Parameters:
v
- The string to parse.- Returns:
- The corresponding predicate, or
null
if the provided string does not match any of the common predicates.
-
invert
Deprecated.UseMapping.invert()
instead.Try inverting a mapping according to standard inversion rules.- Parameters:
mapping
- The mapping to invert.- Returns:
- A new mapping that is an inversion of the provided one, or
null
if the mapping could not be inverted.
-
Mapping.invert()
instead.