Class Match<T extends EntityMatched>
- java.lang.Object
-
- org.gbif.api.model.collections.lookup.Match<T>
-
- Type Parameters:
T
- it can be parameterized. To be used mainly withCollection
orInstitution
public class Match<T extends EntityMatched> extends Object
Used in theLookupResult
to express how good an entity matches. It also adds some remarks to help understand how the match was done.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Match.MatchType
static class
Match.Reason
static class
Match.Status
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Match.MatchType>
MATCH_TYPE_COMPARATOR
-
Constructor Summary
Constructors Constructor Description Match()
-
Method Summary
-
-
-
Field Detail
-
MATCH_TYPE_COMPARATOR
public static final Comparator<Match.MatchType> MATCH_TYPE_COMPARATOR
-
-
Constructor Detail
-
Match
public Match()
-
-
Method Detail
-
exact
public static <T extends EntityMatched> Match<T> exact(T entity, Match.Reason... reasons)
-
exact
public static <T extends EntityMatched> Match<T> exact(T entity, Set<Match.Reason> reasons)
-
fuzzy
public static <T extends EntityMatched> Match<T> fuzzy(T entity, Match.Reason... reasons)
-
fuzzy
public static <T extends EntityMatched> Match<T> fuzzy(T entity, Set<Match.Reason> reasons)
-
none
public static <T extends EntityMatched> Match<T> none()
-
none
public static <T extends EntityMatched> Match<T> none(Match.Status status)
-
explicitMapping
public static <T extends EntityMatched> Match<T> explicitMapping(T entity, Match.Reason... reasons)
-
explicitMapping
public static <T extends EntityMatched> Match<T> explicitMapping(T entity, Set<Match.Reason> reasons)
-
getMatchType
public Match.MatchType getMatchType()
-
setMatchType
public void setMatchType(Match.MatchType matchType)
-
getStatus
public Match.Status getStatus()
-
setStatus
public void setStatus(Match.Status status)
-
getReasons
public Set<Match.Reason> getReasons()
-
setReasons
public void setReasons(Set<Match.Reason> reasons)
-
addReason
public Match<T> addReason(Match.Reason reason)
-
getEntityMatched
public T getEntityMatched()
-
setEntityMatched
public void setEntityMatched(T entityMatched)
-
-