]> gitweb.fperrin.net Git - Dictionary.git/blob - src/com/hughes/android/dictionary/engine/EntryTypeName.java
737ddbb4ee026728a17f25f65345e691adfe7f76
[Dictionary.git] / src / com / hughes / android / dictionary / engine / EntryTypeName.java
1 // Copyright 2011 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package com.hughes.android.dictionary.engine;
16
17
18 public enum EntryTypeName {
19
20   WIKTIONARY_TITLE_SINGLE_DETAIL(true, true, null),
21   WIKTIONARY_TITLE_SINGLE(true, true, null),
22   WIKTIONARY_INFLECTD_FORM_SINGLE(false, true, null),
23
24
25   ONE_WORD(true, true, null),
26   MULTIROW_HEAD_ONE_WORD(true, true, null),
27   MULTIROW_TAIL_ONE_WORD(false, true, null),
28
29   WIKTIONARY_TITLE_MULTI_DETAIL(false, true, WIKTIONARY_TITLE_SINGLE_DETAIL),
30   WIKTIONARY_TITLE_MULTI(false, true, WIKTIONARY_TITLE_SINGLE),
31   WIKTIONARY_TRANSLITERATION(),
32   WIKTIONARY_INFLECTED_FORM_MULTI(false, true, WIKTIONARY_INFLECTD_FORM_SINGLE),
33   WIKTIONARY_ENGLISH_DEF_WIKI_LINK(),
34   WIKTIONARY_ENGLISH_DEF_OTHER_LANG(),
35   WIKTIONARY_ENGLISH_DEF(),
36
37   TWO_WORDS(),
38   THREE_WORDS(),
39   FOUR_WORDS(),
40   FIVE_OR_MORE_WORDS(),
41   WIKTIONARY_TRANSLATION_WIKI_TEXT(),
42   WIKTIONARY_TRANSLATION_OTHER_TEXT(),
43
44   WIKTIONARY_IS_FORM_OF_SOMETHING_ELSE(false, true, null),
45
46   MULTIROW_HEAD_MANY_WORDS(),
47   MULTIROW_TAIL_MANY_WORDS(),
48   WIKTIONARY_EXAMPLE(),
49   WIKTIONARY_BASE_FORM_SINGLE(),  // These two should be eligible for removal if the links are otherwise present.
50   WIKTIONARY_BASE_FORM_MULTI(false, false, WIKTIONARY_BASE_FORM_SINGLE),
51   PART_OF_HYPHENATED(),
52   BRACKETED(),
53   PARENTHESIZED(),
54   WIKTIONARY_TRANSLATION_SENSE(),
55   SEE_ALSO(), 
56   ;
57
58   final boolean mainWord;
59   final boolean overridesStopList;
60   final EntryTypeName singleWordInstance;
61   
62   private EntryTypeName() {
63     this(false, false, null);
64   }
65
66   private EntryTypeName(final boolean mainWord, final boolean overridesStopList, final EntryTypeName singleWordInstance) {
67     this.mainWord = mainWord;
68     this.overridesStopList = overridesStopList;
69     this.singleWordInstance = singleWordInstance == null ? this : singleWordInstance;
70   }
71
72 }