]> gitweb.fperrin.net Git - Dictionary.git/blob - src/com/hughes/android/dictionary/engine/EntryTypeName.java
6e03a9ba04d79fff4ab8adc600c5d585b5aff84a
[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(true, null),
21   WIKTIONARY_INFLECTD_FORM_SINGLE(true, null),
22
23
24   ONE_WORD(true, null),
25   MULTIROW_HEAD_ONE_WORD(true, null),
26   MULTIROW_TAIL_ONE_WORD(true, null),
27
28   WIKTIONARY_TITLE_MULTI(true, WIKTIONARY_TITLE_SINGLE),
29   WIKTIONARY_TRANSLITERATION(),
30   WIKTIONARY_INFLECTED_FORM_MULTI(true, WIKTIONARY_INFLECTD_FORM_SINGLE),
31   WIKTIONARY_ENGLISH_DEF_WIKI_LINK(),
32   WIKTIONARY_ENGLISH_DEF_OTHER_LANG(),
33   WIKTIONARY_ENGLISH_DEF(),
34
35   TWO_WORDS(),
36   THREE_WORDS(),
37   FOUR_WORDS(),
38   FIVE_OR_MORE_WORDS(),
39   WIKTIONARY_TRANSLATION_WIKI_TEXT(),
40   WIKTIONARY_TRANSLATION_OTHER_TEXT(),
41
42   WIKTIONARY_IS_FORM_OF_SOMETHING_ELSE(true, null),
43
44   MULTIROW_HEAD_MANY_WORDS(),
45   MULTIROW_TAIL_MANY_WORDS(),
46   WIKTIONARY_EXAMPLE(),
47   WIKTIONARY_BASE_FORM_SINGLE(),  // These two should be eligible for removal if the links are otherwise present.
48   WIKTIONARY_BASE_FORM_MULTI(false, WIKTIONARY_BASE_FORM_SINGLE),
49   PART_OF_HYPHENATED(),
50   BRACKETED(),
51   PARENTHESIZED(),
52   WIKTIONARY_TRANSLATION_SENSE(),
53   SEE_ALSO(), 
54   ;
55
56   final boolean overridesStopList;
57   final EntryTypeName singleWordInstance;
58   
59   private EntryTypeName() {
60     this(false, null);
61   }
62
63   private EntryTypeName(final boolean overridesStopList, final EntryTypeName singleWordInstance) {
64     this.overridesStopList = overridesStopList;
65     this.singleWordInstance = singleWordInstance == null ? this : singleWordInstance;
66   }
67
68 }