added enSynonyms
This commit is contained in:
parent
517d11686e
commit
600a0f6faa
2 changed files with 7 additions and 6 deletions
|
@ -19,6 +19,7 @@ public abstract class AbstractPoiType {
|
|||
private String poiAdditionalCategory;
|
||||
private List<String> excludedPoiAdditionalCategories;
|
||||
private String synonyms;
|
||||
private String enSynonyms;
|
||||
private String enTranslation;
|
||||
private String translation;
|
||||
|
||||
|
@ -84,10 +85,10 @@ public abstract class AbstractPoiType {
|
|||
}
|
||||
|
||||
public String getEnSynonyms() {
|
||||
if(synonyms == null) {
|
||||
synonyms = registry.getEnSynonyms(this);
|
||||
if(enSynonyms == null) {
|
||||
enSynonyms = registry.getEnSynonyms(this);
|
||||
}
|
||||
return synonyms;
|
||||
return enSynonyms;
|
||||
}
|
||||
|
||||
public String getEnTranslation() {
|
||||
|
|
|
@ -369,16 +369,16 @@ public class QuickSearchListAdapter extends ArrayAdapter<QuickSearchListItem> {
|
|||
|
||||
String desc = listItem.getTypeName();
|
||||
if (listItem.getSearchResult().object instanceof AbstractPoiType) {
|
||||
AbstractPoiType abstractPoiType = (AbstractPoiType) listItem.getSearchResult().object;
|
||||
String synonyms = abstractPoiType.getSynonyms();
|
||||
String enSynonyms = abstractPoiType.getEnSynonyms();
|
||||
QuickSearchHelper searchHelper = app.getSearchUICore();
|
||||
SearchUICore searchUICore = searchHelper.getCore();
|
||||
String searchPhrase = searchUICore.getPhrase().getText(true);
|
||||
if (!searchPhrase.isEmpty()) {
|
||||
AbstractPoiType abstractPoiType = (AbstractPoiType) listItem.getSearchResult().object;
|
||||
SearchPhrase.NameStringMatcher nm = new SearchPhrase.NameStringMatcher(searchPhrase,
|
||||
CollatorStringMatcher.StringMatcherMode.CHECK_STARTS_FROM_SPACE);
|
||||
String[] syn = new String[0];
|
||||
String synonyms = abstractPoiType.getSynonyms();
|
||||
String enSynonyms = abstractPoiType.getEnSynonyms();
|
||||
if (app.getLanguage().equals("en")) {
|
||||
syn = enSynonyms.split(";");
|
||||
|
||||
|
|
Loading…
Reference in a new issue