Enum Class SearchMatchType
- All Implemented Interfaces:
Serializable, Comparable<SearchMatchType>, Constable
SearchResult matched the query — the structured discriminant that a
double score cannot carry on its own.
The motivating case: MATCH_BY_OFFICIAL_SYMBOL_INEXACT_SCORE (0.9) and
MATCH_BY_ALIAS_SCORE (0.90) are numerically identical, so a client gating on
"score < 1.0" cannot tell a safe alias hit (commit) from a bare prefix look-alike
(reject). For example the query ANKA (a Plasmodium strain, not a gene) matches
Ankar only because ANKA is a prefix of that longer symbol; that hit is
SYMBOL_PREFIX and should not be auto-committed, whereas ALIAS and
EXACT_SYMBOL are safe. The score alone hides this; the match type surfaces it.
getWireName() tokens match the vocabulary the curation-UI / agent clients expect.
Only the kinds Gemma can actually produce are enumerated — there is no
edit_distance or substring value because the database gene path never
generates those (Levenshtein is a ranking tiebreaker, not a match generator, and a
leading-wildcard substring only fires on explicit user syntax).
- Author:
- poirigui
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionExact match on a registered gene alias/synonym.Matched a canonical identifier — numeric primary key, accession, NCBI/Ensembl gene id, dataset/platform short name.Exact match on an official gene symbol.Exact match on an official (long) name.Inexact match on an official name.Inexact prefix match on an official symbol (SQLLIKE 'foo%'). -
Method Summary
Modifier and TypeMethodDescriptionStable snake-case token for JSON wire contracts (matches the curation-UI / agent vocabulary).static SearchMatchTypeReturns the enum constant of this class with the specified name.static SearchMatchType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXACT_IDENTIFIER
Matched a canonical identifier — numeric primary key, accession, NCBI/Ensembl gene id, dataset/platform short name. High trust; resolves to at most one entity. Corresponds toSearchResult.isExactIdentifierMatch(). -
EXACT_SYMBOL
Exact match on an official gene symbol. High trust. -
SYMBOL_PREFIX
Inexact prefix match on an official symbol (SQLLIKE 'foo%'). LOW trust: a short query can be a prefix of an unrelated longer symbol (ANKA→Ankar). Treat as a candidate, not a commit, unless the query is itself a registered symbol/alias. -
ALIAS
Exact match on a registered gene alias/synonym. Safe to commit. -
OFFICIAL_NAME
Exact match on an official (long) name. Safe to commit. -
OFFICIAL_NAME_PREFIX
Inexact match on an official name. Lower trust, likeSYMBOL_PREFIX.
-
-
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
-
getWireName
Stable snake-case token for JSON wire contracts (matches the curation-UI / agent vocabulary).
-