| Line 40... |
Line 40... |
| 40 |
private void initialize() {
|
40 |
private void initialize() {
|
| 41 |
log.info("Starting instance of Autosuggest service");
|
41 |
log.info("Starting instance of Autosuggest service");
|
| 42 |
try {
|
42 |
try {
|
| 43 |
Gson g = new Gson();
|
43 |
Gson g = new Gson();
|
| 44 |
java.lang.reflect.Type typeOfT = new TypeToken<Map<String, List<String>>>(){}.getType();
|
44 |
java.lang.reflect.Type typeOfT = new TypeToken<Map<String, List<String>>>(){}.getType();
|
| 45 |
Map<String, List<String>> synonyms = g.fromJson(FileUtils.readFileToString(new File(EXPORT_JAVASCRIPT_CONTENT_PATH + "autosuggest.json")), typeOfT);
|
45 |
Map<String, List<String>> synonyms = g.fromJson(FileUtils.readFileToString(new File(EXPORT_JAVASCRIPT_CONTENT_PATH + "autosuggesthotspot.json")), typeOfT);
|
| 46 |
if(synonyms != null){
|
46 |
if(synonyms != null){
|
| 47 |
for(Entry<String, List<String>> entry : synonyms.entrySet()){
|
47 |
for(Entry<String, List<String>> entry : synonyms.entrySet()){
|
| 48 |
for(String title : entry.getValue()){
|
48 |
for(String title : entry.getValue()){
|
| 49 |
addItemName(title, entry.getKey());
|
49 |
addItemName(title, entry.getKey());
|
| 50 |
}
|
50 |
}
|