/** * If an autocompleter exists for the "journal" field, add all journal names in the journal * abbreviation list to this autocompleter. */ public void addJournalListToAutoCompleter() { AutoCompleter autoCompleter = get("journal"); if (autoCompleter != null) { for (Abbreviation abbreviation : Globals.journalAbbrev.getAbbreviations()) { autoCompleter.addWordToIndex(abbreviation.getName()); } } }
/** * For all fields with both autocompletion and content selector, add content selector values to * the autocompleter list: */ public void addContentSelectorValuesToAutoCompleters(MetaData metaData) { for (Map.Entry<String, AutoCompleter> entry : this.autoCompleters.entrySet()) { AutoCompleter ac = entry.getValue(); if (metaData.getData(Globals.SELECTOR_META_PREFIX + entry.getKey()) != null) { Vector<String> items = metaData.getData(Globals.SELECTOR_META_PREFIX + entry.getKey()); if (items != null) { for (String item : items) { ac.addWordToIndex(item); } } } } }