1 // Copyright 2011 Google Inc. All Rights Reserved.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
15 package com.hughes.android.dictionary.engine;
18 public enum EntryTypeName {
20 WIKTIONARY_TITLE_SINGLE_DETAIL(true, true, null),
21 WIKTIONARY_TITLE_SINGLE(true, true, null),
22 WIKTIONARY_INFLECTD_FORM_SINGLE(false, true, null),
25 ONE_WORD(true, true, null),
26 MULTIROW_HEAD_ONE_WORD(true, true, null),
27 MULTIROW_TAIL_ONE_WORD(false, true, null),
29 SYNONYM_SINGLE(false, true, null),
30 ANTONYM_SINGLE(false, true, null),
32 WIKTIONARY_TITLE_MULTI_DETAIL(false, true, WIKTIONARY_TITLE_SINGLE_DETAIL),
33 WIKTIONARY_TITLE_MULTI(false, true, WIKTIONARY_TITLE_SINGLE),
34 WIKTIONARY_TRANSLITERATION(),
35 // How we file "casa {f}, case {pl}" under "case"
36 WIKTIONARY_INFLECTED_FORM_MULTI(false, true, WIKTIONARY_INFLECTD_FORM_SINGLE),
37 WIKTIONARY_ENGLISH_DEF_WIKI_LINK(),
38 WIKTIONARY_ENGLISH_DEF_OTHER_LANG(),
39 WIKTIONARY_ENGLISH_DEF(),
41 SYNONYM_MULTI(false, true, SYNONYM_SINGLE),
42 ANTONYM_MULTI(false, true, ANTONYM_SINGLE),
43 DERIVED_TERM(false, true, null),
49 WIKTIONARY_TRANSLATION_WIKI_TEXT(),
50 WIKTIONARY_TRANSLATION_OTHER_TEXT(),
52 // How we file entries like: "sono: {form of|essere}" under "sono.".
53 WIKTIONARY_IS_FORM_OF_SOMETHING_ELSE(false, true, null),
55 MULTIROW_HEAD_MANY_WORDS(),
56 MULTIROW_TAIL_MANY_WORDS(),
59 // The next two are how we file entries like: "sono: {form of|essere}" under "essere".
60 WIKTIONARY_BASE_FORM_SINGLE(), // These two should be eligible for removal if the links are otherwise present.
61 WIKTIONARY_BASE_FORM_MULTI(false, false, WIKTIONARY_BASE_FORM_SINGLE),
65 WIKTIONARY_TRANSLATION_SENSE(),
67 WIKTIONARY_MENTIONED(false, true, null),
70 final boolean mainWord;
71 final boolean overridesStopList;
72 final EntryTypeName singleWordInstance;
74 private EntryTypeName() {
75 this(false, false, null);
78 private EntryTypeName(final boolean mainWord, final boolean overridesStopList, final EntryTypeName singleWordInstance) {
79 this.mainWord = mainWord;
80 this.overridesStopList = overridesStopList;
81 this.singleWordInstance = singleWordInstance == null ? this : singleWordInstance;