Package org.gbif.api.model.common.search
Class SpellCheckResponse
- java.lang.Object
-
- org.gbif.api.model.common.search.SpellCheckResponse
-
public class SpellCheckResponse extends Object
Contains the response information of a spell check request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpellCheckResponse.SuggestionInformation about a suggestion made for possible correct spelled version of a search term.
-
Constructor Summary
Constructors Constructor Description SpellCheckResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)SpellCheckResponse.SuggestiongetSuggestion(String token)Map<String,SpellCheckResponse.Suggestion>getSuggestions()inthashCode()booleanisCorrectlySpelled()voidsetCorrectlySpelled(boolean correctlySpelled)Sets the misspelling flag.voidsetSuggestions(Map<String,SpellCheckResponse.Suggestion> suggestions)Sets the suggestion map.StringtoString()
-
-
-
Constructor Detail
-
SpellCheckResponse
public SpellCheckResponse()
-
-
Method Detail
-
isCorrectlySpelled
public boolean isCorrectlySpelled()
- Returns:
- false if the response contains misspellings
-
setCorrectlySpelled
public void setCorrectlySpelled(boolean correctlySpelled)
Sets the misspelling flag.
-
getSuggestions
public Map<String,SpellCheckResponse.Suggestion> getSuggestions()
- Returns:
- the suggestion map
-
getSuggestion
public SpellCheckResponse.Suggestion getSuggestion(String token)
- Parameters:
token- correction of a search term- Returns:
- the suggestion for a token
-
setSuggestions
public void setSuggestions(Map<String,SpellCheckResponse.Suggestion> suggestions)
Sets the suggestion map.
-
-