Add augmenter dictionary type

Julien LepillerThu Jun 11 04:20:22+0200 2020

f30e4fc

Add augmenter dictionary type

app/src/main/java/eu/lepiller/nani/dictionary/DictionaryFactory.java

220220
    }
221221
222222
    public static void augment(Result r) {
223+
        for(Dictionary d: dictionaries) {
224+
            if(d instanceof ResultAugmenterDictionary && d.isDownloaded()) {
225+
                ((ResultAugmenterDictionary) d).augment(r);
226+
            }
227+
        }
223228
    }
224229
225230
    public static Dictionary get(int position) {

app/src/main/java/eu/lepiller/nani/dictionary/ResultAugmenterDictionary.java unknown status 1

1+
package eu.lepiller.nani.dictionary;
2+
3+
import java.io.File;
4+
5+
import eu.lepiller.nani.result.Result;
6+
7+
public abstract class ResultAugmenterDictionary extends FileDictionary {
8+
    ResultAugmenterDictionary(String name, String description, String fullDescription, File cacheDir, String url, int fileSize, int entries, String hash) {
9+
        super(name, description, fullDescription, cacheDir, url, fileSize, entries, hash);
10+
    }
11+
12+
    void augment(Result r) {
13+
    }
14+
}