Search in sources :

Example 1 with MeaningDetector

use of de.geeksfactory.opacclient.searchfields.MeaningDetector in project opacclient by opacapp.

the class BaseApi method getSearchFields.

@Override
public List<SearchField> getSearchFields() throws JSONException, OpacErrorException, IOException {
    List<SearchField> fields = parseSearchFields();
    if (shouldUseMeaningDetector()) {
        MeaningDetector md = new MeaningDetectorImpl(library);
        for (int i = 0; i < fields.size(); i++) {
            fields.set(i, md.detectMeaning(fields.get(i)));
        }
        Collections.sort(fields, new SearchField.OrderComparator());
    }
    return fields;
}
Also used : SearchField(de.geeksfactory.opacclient.searchfields.SearchField) MeaningDetectorImpl(de.geeksfactory.opacclient.searchfields.MeaningDetectorImpl) MeaningDetector(de.geeksfactory.opacclient.searchfields.MeaningDetector)

Aggregations

MeaningDetector (de.geeksfactory.opacclient.searchfields.MeaningDetector)1 MeaningDetectorImpl (de.geeksfactory.opacclient.searchfields.MeaningDetectorImpl)1 SearchField (de.geeksfactory.opacclient.searchfields.SearchField)1