Project

General

Profile

Download (3.67 KB) Statistics
| Branch: | Tag: | Revision:
1 bc0bd9a4 Andreas Müller
/**
2
* Copyright (C) 2007 EDIT
3 69e00fde Andreas Müller
* European Distributed Institute of Taxonomy
4 bc0bd9a4 Andreas Müller
* http://www.e-taxonomy.eu
5 69e00fde Andreas Müller
*
6 bc0bd9a4 Andreas Müller
* 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 69e00fde Andreas Müller
	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 7cbe2b56 Katja Luther
	Test(UUID.fromString("b71214ab-2524-4b5d-8e2b-0581767ac839"), "Test", "Test"),
27 7f6cc57e Katja Luther
	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 2211afa4 Katja Luther
	ShowTaxonAssociations(UUID.fromString("849c24f9-b62b-4f70-b0a0-1b02182b3433"), "ShowTaxonAssociations", "editor.STA"),
32 d0184a74 Katja Luther
	ShowLifeForm(UUID.fromString("85870e7d-a6a3-4c9b-97d6-eb27e6516860"), "ShowLifeForm", "editor.SLF"),
33 2211afa4 Katja Luther
	AbcdImportConfig(UUID.fromString("65380375-d041-458c-8275-c36cdc1f34df"), "AbcdImportConfig", "import.ABCD"),
34 a693f6d7 Andreas Müller
	BioCaseProvider(UUID.fromString("bd22c85c-f4e8-4771-ae7b-5750868762c4"), "BioCaseProvider", "import.BP"),
35
	DistributionStatusVaadin(UUID.fromString(""), "Distribution Status Vaadin", "vaadin.distribution.statuslist")
36
    ;
37 69e00fde Andreas Müller
38
39
    private static final String KEY_PREFIX = "model.";
40
41 bc0bd9a4 Andreas Müller
	private PreferencePredicate(UUID uuid, String defaultString, String key){
42
		this(uuid, defaultString, key, null);
43
	}
44 69e00fde Andreas Müller
45
	private PreferencePredicate(UUID uuid, String defaultString, String modelKey, PreferencePredicate parent){
46
47
	    delegateVocTerm = EnumeratedTermVoc.addTerm(getClass(), this, uuid, defaultString, KEY_PREFIX + modelKey, parent);
48 bc0bd9a4 Andreas Müller
	}
49
50 69e00fde Andreas Müller
	// *************************** DELEGATE **************************************/
51
52 bc0bd9a4 Andreas Müller
	private static EnumeratedTermVoc<PreferencePredicate> delegateVoc;
53
	private IEnumTerm<PreferencePredicate> delegateVocTerm;
54
55
	static {
56
		delegateVoc = EnumeratedTermVoc.getVoc(PreferencePredicate.class);
57
	}
58 69e00fde Andreas Müller
59 bc0bd9a4 Andreas Müller
	@Override
60
	public String getKey(){return delegateVocTerm.getKey();}
61 69e00fde Andreas Müller
62 bc0bd9a4 Andreas Müller
	@Override
63
    public String getMessage(){return delegateVocTerm.getMessage();}
64
65
	@Override
66
    public String getMessage(Language language){return delegateVocTerm.getMessage(language);}
67
68 69e00fde Andreas Müller
69 bc0bd9a4 Andreas Müller
	@Override
70
    public UUID getUuid() {return delegateVocTerm.getUuid();}
71
72
	@Override
73
    public PreferencePredicate getKindOf() {return delegateVocTerm.getKindOf();}
74 69e00fde Andreas Müller
75 bc0bd9a4 Andreas Müller
	@Override
76
    public Set<PreferencePredicate> getGeneralizationOf() {return delegateVocTerm.getGeneralizationOf();}
77
78
	@Override
79
	public boolean isKindOf(PreferencePredicate ancestor) {return delegateVocTerm.isKindOf(ancestor);	}
80
81
	@Override
82
    public Set<PreferencePredicate> getGeneralizationOf(boolean recursive) {return delegateVocTerm.getGeneralizationOf(recursive);}
83
84
	public static PreferencePredicate getByKey(String key){return delegateVoc.getByKey(key);}
85
    public static PreferencePredicate getByUuid(UUID uuid) {return delegateVoc.getByUuid(uuid);}
86
}