Add augmenter dictionary type
app/src/main/java/eu/lepiller/nani/dictionary/DictionaryFactory.java
220 | 220 | } | |
221 | 221 | ||
222 | 222 | 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 | + | } | |
223 | 228 | } | |
224 | 229 | ||
225 | 230 | 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 | + | } |