]> gitweb.fperrin.net Git - DictionaryPC.git/blob - src/com/hughes/android/dictionary/parser/WikiWord.java
49806d2866853bffdf8a94740f5e8e5f97c52baf
[DictionaryPC.git] / src / com / hughes / android / dictionary / parser / WikiWord.java
1 package com.hughes.android.dictionary.parser;
2
3 import java.util.ArrayList;
4 import java.util.LinkedHashMap;
5 import java.util.List;
6 import java.util.Map;
7
8 public class WikiWord {
9   final int depth;
10   
11   String language;
12   String pronunciation;
13
14   boolean isLang1;
15   boolean isLang2;
16   
17   final List<PartOfSpeech> partsOfSpeech = new ArrayList<WikiWord.PartOfSpeech>();
18   
19   final Map<String, List<String>> otherSections = new LinkedHashMap<String, List<String>>();
20   
21   public WikiWord(int depth) {
22     this.depth = depth;
23   }
24
25   static class PartOfSpeech {
26     final int depth;
27
28     final List<Meaning> meaning = new ArrayList<WikiWord.Meaning>();
29     
30     final List<TranslationSection> translationSections = new ArrayList<WikiWord.TranslationSection>();
31         
32     final Map<String, String> otherSections = new LinkedHashMap<String, String>();
33
34     public PartOfSpeech(final int depth) {
35       this.depth = depth;
36     }
37   }
38   
39   static class TranslationSection {
40     String sense;
41     List<List<String>> translations = new ArrayList<List<String>>();
42     {
43       translations.add(new ArrayList<String>());
44       translations.add(new ArrayList<String>());
45     }
46   }
47   
48   static class Meaning {
49     String meaning;
50     Example example;
51   }
52   
53   static class Example {
54     String example;
55     String exampleInEnglish;
56   }
57
58 }