1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.model.metadata;
|
10
|
|
11
|
import java.util.Set;
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.common.EnumeratedTermVoc;
|
15
|
import eu.etaxonomy.cdm.model.common.IEnumTerm;
|
16
|
import eu.etaxonomy.cdm.model.common.Language;
|
17
|
|
18
|
/**
|
19
|
* @author a.mueller
|
20
|
* @created 2013-09-09
|
21
|
*
|
22
|
*/
|
23
|
public enum PreferencePredicate implements IEnumTerm<PreferencePredicate>{
|
24
|
NomenclaturalCode(UUID.fromString("39c5cb91-9370-4803-abf7-fa01e7dbe4e2"), "Nomenclatural code", "name.NC"),
|
25
|
TaxonNodeOrder(UUID.fromString("ce06bd8e-4371-4ee5-8f57-cf23930cfd12"), "Taxon node order", "taxon.TNO"),
|
26
|
Test(UUID.fromString("b71214ab-2524-4b5d-8e2b-0581767ac839"), "Test", "Test"),
|
27
|
NameDetailsView(UUID.fromString("3c4ec5f5-feb5-44a8-8533-c3c3484a6869"), "NameDetailsView", "editor.NDV"),
|
28
|
IsRedList(UUID.fromString("aaf79c57-b2a9-48a6-b037-fc1b4a75a6e9"), "isRedList", "editor.RL"),
|
29
|
DeterminationOnlyForFieldUnits(UUID.fromString("91b9224b-6610-4cf1-b3da-d60d6f9d59b1"), "DeterminationOnlyForFieldUnit", "editor.DOFU"),
|
30
|
ShowCollectingAreasInGeneralSection(UUID.fromString("578a1195-64ce-4dfb-9be9-6f2823288678"), "ShowCollectingAreaInGeneralSection", "editor.SCAGS"),
|
31
|
ShowTaxonAssociations(UUID.fromString("849c24f9-b62b-4f70-b0a0-1b02182b3433"), "ShowTaxonAssociations", "editor.STA")
|
32
|
;
|
33
|
|
34
|
|
35
|
private static final String KEY_PREFIX = "model.";
|
36
|
|
37
|
private PreferencePredicate(UUID uuid, String defaultString, String key){
|
38
|
this(uuid, defaultString, key, null);
|
39
|
}
|
40
|
|
41
|
private PreferencePredicate(UUID uuid, String defaultString, String modelKey, PreferencePredicate parent){
|
42
|
|
43
|
delegateVocTerm = EnumeratedTermVoc.addTerm(getClass(), this, uuid, defaultString, KEY_PREFIX + modelKey, parent);
|
44
|
}
|
45
|
|
46
|
// *************************** DELEGATE **************************************/
|
47
|
|
48
|
private static EnumeratedTermVoc<PreferencePredicate> delegateVoc;
|
49
|
private IEnumTerm<PreferencePredicate> delegateVocTerm;
|
50
|
|
51
|
static {
|
52
|
delegateVoc = EnumeratedTermVoc.getVoc(PreferencePredicate.class);
|
53
|
}
|
54
|
|
55
|
@Override
|
56
|
public String getKey(){return delegateVocTerm.getKey();}
|
57
|
|
58
|
@Override
|
59
|
public String getMessage(){return delegateVocTerm.getMessage();}
|
60
|
|
61
|
@Override
|
62
|
public String getMessage(Language language){return delegateVocTerm.getMessage(language);}
|
63
|
|
64
|
|
65
|
@Override
|
66
|
public UUID getUuid() {return delegateVocTerm.getUuid();}
|
67
|
|
68
|
@Override
|
69
|
public PreferencePredicate getKindOf() {return delegateVocTerm.getKindOf();}
|
70
|
|
71
|
@Override
|
72
|
public Set<PreferencePredicate> getGeneralizationOf() {return delegateVocTerm.getGeneralizationOf();}
|
73
|
|
74
|
@Override
|
75
|
public boolean isKindOf(PreferencePredicate ancestor) {return delegateVocTerm.isKindOf(ancestor); }
|
76
|
|
77
|
@Override
|
78
|
public Set<PreferencePredicate> getGeneralizationOf(boolean recursive) {return delegateVocTerm.getGeneralizationOf(recursive);}
|
79
|
|
80
|
public static PreferencePredicate getByKey(String key){return delegateVoc.getByKey(key);}
|
81
|
public static PreferencePredicate getByUuid(UUID uuid) {return delegateVoc.getByUuid(uuid);}
|
82
|
}
|