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 class
SpellCheckResponse.Suggestion
Information 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 boolean
equals(Object o)
SpellCheckResponse.Suggestion
getSuggestion(String token)
Map<String,SpellCheckResponse.Suggestion>
getSuggestions()
int
hashCode()
boolean
isCorrectlySpelled()
void
setCorrectlySpelled(boolean correctlySpelled)
Sets the misspelling flag.void
setSuggestions(Map<String,SpellCheckResponse.Suggestion> suggestions)
Sets the suggestion map.String
toString()
-
-
-
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.
-
-