Project

General

Profile

« Previous | Next » 

Revision 9b8d1a1c

Added by Katja Luther about 5 years ago

ref #8078: move editorPreferencePredicates to cdmlib

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/EditorPreferencePredicate.java
15 15
import eu.etaxonomy.cdm.model.common.IEnumTerm;
16 16
import eu.etaxonomy.cdm.model.common.Language;
17 17
import eu.etaxonomy.cdm.model.metadata.IPreferencePredicate;
18
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
19
import eu.etaxonomy.cdm.model.metadata.TermDisplayEnum;
20 18

  
21 19
/**
22 20
 * @author k.luther
......
26 24
public enum EditorPreferencePredicate implements IEnumTerm<EditorPreferencePredicate>, IPreferencePredicate {
27 25

  
28 26

  
29

  
30
    TaxonNodeOrder(UUID.fromString("ce06bd8e-4371-4ee5-8f57-cf23930cfd12"), "Taxon node order", "model.taxon.TNO", NavigatorOrderEnum.RankAndNameOrder),  //default alphabet + rank
31
    NameDetailsView(UUID.fromString("3c4ec5f5-feb5-44a8-8533-c3c3484a6869"), "NameDetailsView", "model.editor.NDV", null),
32
    DeterminationOnlyForFieldUnits(UUID.fromString("91b9224b-6610-4cf1-b3da-d60d6f9d59b1"), "DeterminationOnlyForFieldUnit", "model.editor.DOFU", Boolean.FALSE),
33

  
34
    //taxeditor UI
35
    ShowMediaView(UUID.fromString("ba7ba1bb-47e3-4b68-bc44-c5ac45775db4"), "Show media view", "views.showMediaView", Boolean.TRUE),
36
    ShowTaxonNodeWizard(UUID.fromString("af06fbec-635b-4676-8b60-0b98aefda6aa"), "Show TaxonNode wizard", "views.showTaxonNodeWizard", Boolean.TRUE),
37
    DisableMultiClassification(UUID.fromString("abdf7e40-afe6-4131-9af3-c6b6779ee6be"), "Disable multi-classification functionality", "menu.disableMultiClassification", Boolean.FALSE),
38
    ShowChecklistPerspective(UUID.fromString("6058762b-893c-4330-bfe7-45d5717d02b2"), "Show checklist perspective as default", "perspective.checklist", Boolean.FALSE),
39

  
40

  
41
    //sources
42
    ShowIdInSource(UUID.fromString("de291d1b-d89e-42ee-a7b5-15f306f50785"), "Source Details: Show ID in Source", "sourceDetails.IdInSource", Boolean.TRUE),
43
    //I did rename this "Name"-> "Namespace" (later we should adapt the modelKey similarly
44
    ShowNamespaceInSource(UUID.fromString("f2e881bb-03a1-4bf9-aff1-7bfd4d355a7c"), "Source Details: Show Namespace in Source", "sourceDetails.NameInSource", Boolean.TRUE),
45

  
46
    //name details view
47
    SimpleDetailsViewActivated(UUID.fromString("78666fde-9ee5-4c09-923b-be98604aace6"), "Name Details: Activated", "editor.nameDetails.activated", Boolean.FALSE),
48
    ShowTaxon(UUID.fromString("0853e47a-68a8-49af-94d6-505a0479cb28"), "Name Details: Show Taxon", "editor.nameDetails.taxon", Boolean.TRUE),
49
    ShowLSID(UUID.fromString("fa26eba7-43ed-4498-83a5-8f306a3ef6b3"), "Name Details: Show LSID", "editor.nameDetails.LSID", Boolean.TRUE),
50
    ShowNomenclaturalCode(UUID.fromString("b54c7670-a4eb-4d41-b847-2c1a48efdd25"), "Name Details: Show Nomenclatural Code", "editor.nameDetails.NC", Boolean.TRUE),
51
    ShowNameCache(UUID.fromString("d2e74b5b-90ca-4f5a-8979-d3c065512d63"), "Name Details: Show Namecache", "editor.nameDetails.nameCache", Boolean.TRUE),
52
    ShowNameEpithets(UUID.fromString("816b7edd-0e1e-4277-9931-f73f1970dfe2"), "Name Details: Show Name Epithets", "editor.nameDetails.NE", Boolean.TRUE),
53
    ShowAppendedPhrase(UUID.fromString("ca0b3d02-09f0-458f-af88-9c9d281f029d"), "Name Details: Show Appended Phrase", "editor.nameDetails.AP", Boolean.TRUE),
54
    ShowRankInNameDetails(UUID.fromString("b1181426-e87a-4cd2-80bb-40224182efda"), "Name Details: Show Rank", "editor.nameDetails.rank", Boolean.TRUE),
55
    ShowAuthorship(UUID.fromString("ce6e1a79-f0c3-4542-a93c-2dbd0023220e"), "Name Details: Show Authorship", "editor.nameDetails.AS", Boolean.TRUE),
56
    ShowAuthorshipCache(UUID.fromString("dbc95c3c-b984-406c-b060-67bde64bb968"), "Name Details: Show AuthorshipCache", "editor.nameDetails.ASC", Boolean.TRUE),
57
    ShowNomenclaturalReference(UUID.fromString("5b318525-8830-4dbd-8f31-df93bbc69800"), "Name Details: Show Nomenclatural Reference", "editor.nameDetails.NR", Boolean.TRUE),
58
    ShowNomenclaturalStatus(UUID.fromString("075eba36-90fc-42a2-8e2d-98a61ee88205"), "Name Details: Show Nomenclatural Status", "editor.nameDetails.NS", Boolean.TRUE),
59
    ShowProtologue(UUID.fromString("fd1105cf-5c98-4325-9db3-117907dac448"), "Name Details: Show Protologue", "editor.nameDetails.SP", Boolean.TRUE),
60
    ShowTypeDesignation(UUID.fromString("dc79a014-5307-457e-9e92-7353a47a4df6"), "Name Details: Show Typedesignation", "editor.nameDetails.TD", Boolean.TRUE),
61
    ShowNameRelations(UUID.fromString("7173817e-c15f-4618-8dea-2035b84f7757"), "Name Details: Show Namerelationships", "editor.nameDetails.NRS", Boolean.TRUE),
62
    ShowHybrid(UUID.fromString("f58a4e82-8162-4d2e-905d-466d40069df8"), "Name Details: Show Hybrid Section", "editor.nameDetails.hybrids", Boolean.TRUE),
63

  
64
    //distribution editor
65
    DistributionEditorActivated(UUID.fromString("733e9bce-4394-4fae-97d3-1b7dfc48ee3c"), "Distribution Editor Is activated", "distribution.editor.activated",  Boolean.TRUE),
66
    AreasSortedInDistributionEditor(UUID.fromString("513d7de9-fec4-432c-b4dd-75f9f6e74ad0"), "Distribution Editor: Areas sorted in Distribution Editor", "distribution.editor.areas.sortedInDistributionEditor", TermOrder.IdInVoc),  //unsure about correct default value, please decide
67
    //the following 4 should be replaced by termLabelPreferenceEnum , enum should contain label, abbrevLabel, idInVoc, symbol1, symbol2, ...
68
    DisplayOfStatus(UUID.fromString("1ee6b945-0a81-4f05-b867-f9d105882249"), "Distribution Editor: Display of Status", "distribution.editor.status.display", TermDisplayEnum.Title),
69
    DisplayOfAreasInDistributionEditor(UUID.fromString("7b671bba-1b7f-4cb9-bbac-c914518a4bf8"), "Distribution Editor: Display of Areas", "distribution.editor.areas.displayAreas",  TermDisplayEnum.Title),
70
    OwnDescriptionForDistributionEditor(UUID.fromString("38282571-049c-473e-bec3-bde6f65f796a"), "Distribution Editor: Create distribution editor TaxonDescription", "distribution.editor.distributionOwnDescription",  Boolean.FALSE),
71
    AvailableDistributionAreaTerms(UUID.fromString("34469acc-9e23-4f95-92d4-1695e02cb5a0"), "Available Distribution Area Terms", "distribution.area.terms", null),  //default: all/no filter
72

  
73

  
74
    ShowRankInDistributionEditor(UUID.fromString("fb13b4f2-2d82-4fd3-8abe-2b955a695245"), "Distribution Editor: Show Rank", "distribution.editor.showRank", Boolean.FALSE),
75

  
76

  
77
    //import
78
    ShowImportExportMenu(UUID.fromString("92839352-beee-4d66-b078-77fd4f500ab4"), "Show Import Export Menu Items", "io.showMenu", Boolean.TRUE),
79
    AbcdImportConfig(UUID.fromString("65380375-d041-458c-8275-c36cdc1f34df"), "AbcdImportConfig", "io.ABCD.config", null),  //default defined in TaxEditor
80
    BioCaseProvider(UUID.fromString("bd22c85c-f4e8-4771-ae7b-5750868762c4"), "BioCaseProvider", "io.ABCD.providerList", null),  //default defined in TaxEditor
81

  
82
    //specimen
83
    ShowSpecimen(UUID.fromString("a925f874-b953-429f-9db7-f28e3beb576f"), "Show Specimen", "showSpecimen", Boolean.TRUE),
84
    ShowCollectingAreasInGeneralSection(UUID.fromString("578a1195-64ce-4dfb-9be9-6f2823288678"), "Show Collecting Area in General Section", "specimen.detail.showCollectingAreaInGeneralSection", Boolean.FALSE),
85
    ShowTaxonAssociations(UUID.fromString("849c24f9-b62b-4f70-b0a0-1b02182b3433"), "Show Taxon Associations", "specimen.detail.showTaxonAssociations", Boolean.FALSE),
86
    ShowLifeForm(UUID.fromString("85870e7d-a6a3-4c9b-97d6-eb27e6516860"), "Show Life Form", "showLifeForm", Boolean.FALSE),
87

  
88

  
89
    DefaultBehaviourForPublishFlag(UUID.fromString("24e636fc-ef3b-4a2c-8c9e-018143e66949"), "Default behaviour for publish flag", "defaultBehaviourForPublishFlag", PublishEnum.InheritFromParent)
27
//    TaxonNodeOrder(UUID.fromString("ce06bd8e-4371-4ee5-8f57-cf23930cfd12"), "Taxon node order", "model.taxon.TNO", NavigatorOrderEnum.RankAndNameOrder),  //default alphabet + rank
28
//    NameDetailsView(UUID.fromString("3c4ec5f5-feb5-44a8-8533-c3c3484a6869"), "NameDetailsView", "model.editor.NDV", null),
29
//    DeterminationOnlyForFieldUnits(UUID.fromString("91b9224b-6610-4cf1-b3da-d60d6f9d59b1"), "DeterminationOnlyForFieldUnit", "model.editor.DOFU", Boolean.FALSE),
30
//
31
//    //taxeditor UI
32
//    ShowMediaView(UUID.fromString("ba7ba1bb-47e3-4b68-bc44-c5ac45775db4"), "Show media view", "views.showMediaView", Boolean.TRUE),
33
//    ShowTaxonNodeWizard(UUID.fromString("af06fbec-635b-4676-8b60-0b98aefda6aa"), "Show TaxonNode wizard", "views.showTaxonNodeWizard", Boolean.TRUE),
34
//    DisableMultiClassification(UUID.fromString("abdf7e40-afe6-4131-9af3-c6b6779ee6be"), "Disable multi-classification functionality", "menu.disableMultiClassification", Boolean.FALSE),
35
//    ShowChecklistPerspective(UUID.fromString("6058762b-893c-4330-bfe7-45d5717d02b2"), "Show checklist perspective as default", "perspective.checklist", Boolean.FALSE),
36
//
37
//
38
//    //sources
39
//    ShowIdInSource(UUID.fromString("de291d1b-d89e-42ee-a7b5-15f306f50785"), "Source Details: Show ID in Source", "sourceDetails.IdInSource", Boolean.TRUE),
40
//    //I did rename this "Name"-> "Namespace" (later we should adapt the modelKey similarly
41
//    ShowNamespaceInSource(UUID.fromString("f2e881bb-03a1-4bf9-aff1-7bfd4d355a7c"), "Source Details: Show Namespace in Source", "sourceDetails.NameInSource", Boolean.TRUE),
42
//
43
//    //name details view
44
//    SimpleDetailsViewActivated(UUID.fromString("78666fde-9ee5-4c09-923b-be98604aace6"), "Name Details: Activated", "editor.nameDetails.activated", Boolean.FALSE),
45
//    ShowTaxon(UUID.fromString("0853e47a-68a8-49af-94d6-505a0479cb28"), "Name Details: Show Taxon", "editor.nameDetails.taxon", Boolean.TRUE),
46
//    ShowLSID(UUID.fromString("fa26eba7-43ed-4498-83a5-8f306a3ef6b3"), "Name Details: Show LSID", "editor.nameDetails.LSID", Boolean.TRUE),
47
//    ShowNomenclaturalCode(UUID.fromString("b54c7670-a4eb-4d41-b847-2c1a48efdd25"), "Name Details: Show Nomenclatural Code", "editor.nameDetails.NC", Boolean.TRUE),
48
//    ShowNameCache(UUID.fromString("d2e74b5b-90ca-4f5a-8979-d3c065512d63"), "Name Details: Show Namecache", "editor.nameDetails.nameCache", Boolean.TRUE),
49
//    ShowNameEpithets(UUID.fromString("816b7edd-0e1e-4277-9931-f73f1970dfe2"), "Name Details: Show Name Epithets", "editor.nameDetails.NE", Boolean.TRUE),
50
//    ShowAppendedPhrase(UUID.fromString("ca0b3d02-09f0-458f-af88-9c9d281f029d"), "Name Details: Show Appended Phrase", "editor.nameDetails.AP", Boolean.TRUE),
51
//    ShowRankInNameDetails(UUID.fromString("b1181426-e87a-4cd2-80bb-40224182efda"), "Name Details: Show Rank", "editor.nameDetails.rank", Boolean.TRUE),
52
//    ShowAuthorship(UUID.fromString("ce6e1a79-f0c3-4542-a93c-2dbd0023220e"), "Name Details: Show Authorship", "editor.nameDetails.AS", Boolean.TRUE),
53
//    ShowAuthorshipCache(UUID.fromString("dbc95c3c-b984-406c-b060-67bde64bb968"), "Name Details: Show AuthorshipCache", "editor.nameDetails.ASC", Boolean.TRUE),
54
//    ShowNomenclaturalReference(UUID.fromString("5b318525-8830-4dbd-8f31-df93bbc69800"), "Name Details: Show Nomenclatural Reference", "editor.nameDetails.NR", Boolean.TRUE),
55
//    ShowNomenclaturalStatus(UUID.fromString("075eba36-90fc-42a2-8e2d-98a61ee88205"), "Name Details: Show Nomenclatural Status", "editor.nameDetails.NS", Boolean.TRUE),
56
//    ShowProtologue(UUID.fromString("fd1105cf-5c98-4325-9db3-117907dac448"), "Name Details: Show Protologue", "editor.nameDetails.SP", Boolean.TRUE),
57
//    ShowTypeDesignation(UUID.fromString("dc79a014-5307-457e-9e92-7353a47a4df6"), "Name Details: Show Typedesignation", "editor.nameDetails.TD", Boolean.TRUE),
58
//    ShowNameRelations(UUID.fromString("7173817e-c15f-4618-8dea-2035b84f7757"), "Name Details: Show Namerelationships", "editor.nameDetails.NRS", Boolean.TRUE),
59
//    ShowHybrid(UUID.fromString("f58a4e82-8162-4d2e-905d-466d40069df8"), "Name Details: Show Hybrid Section", "editor.nameDetails.hybrids", Boolean.TRUE),
60
//
61
//    //distribution editor
62
//    DistributionEditorActivated(UUID.fromString("733e9bce-4394-4fae-97d3-1b7dfc48ee3c"), "Distribution Editor Is activated", "distribution.editor.activated",  Boolean.TRUE),
63
//    AreasSortedInDistributionEditor(UUID.fromString("513d7de9-fec4-432c-b4dd-75f9f6e74ad0"), "Distribution Editor: Areas sorted in Distribution Editor", "distribution.editor.areas.sortedInDistributionEditor", TermOrder.IdInVoc),  //unsure about correct default value, please decide
64
//    //the following 4 should be replaced by termLabelPreferenceEnum , enum should contain label, abbrevLabel, idInVoc, symbol1, symbol2, ...
65
//    DisplayOfStatus(UUID.fromString("1ee6b945-0a81-4f05-b867-f9d105882249"), "Distribution Editor: Display of Status", "distribution.editor.status.display", TermDisplayEnum.Title),
66
//    DisplayOfAreasInDistributionEditor(UUID.fromString("7b671bba-1b7f-4cb9-bbac-c914518a4bf8"), "Distribution Editor: Display of Areas", "distribution.editor.areas.displayAreas",  TermDisplayEnum.Title),
67
//    OwnDescriptionForDistributionEditor(UUID.fromString("38282571-049c-473e-bec3-bde6f65f796a"), "Distribution Editor: Create distribution editor TaxonDescription", "distribution.editor.distributionOwnDescription",  Boolean.FALSE),
68
//    AvailableDistributionAreaTerms(UUID.fromString("34469acc-9e23-4f95-92d4-1695e02cb5a0"), "Available Distribution Area Terms", "distribution.area.terms", null),  //default: all/no filter
69
//
70
//
71
//    ShowRankInDistributionEditor(UUID.fromString("fb13b4f2-2d82-4fd3-8abe-2b955a695245"), "Distribution Editor: Show Rank", "distribution.editor.showRank", Boolean.FALSE),
72
//
73
//
74
//    //import
75
//    ShowImportExportMenu(UUID.fromString("92839352-beee-4d66-b078-77fd4f500ab4"), "Show Import Export Menu Items", "io.showMenu", Boolean.TRUE),
76
//    AbcdImportConfig(UUID.fromString("65380375-d041-458c-8275-c36cdc1f34df"), "AbcdImportConfig", "io.ABCD.config", null),  //default defined in TaxEditor
77
//    BioCaseProvider(UUID.fromString("bd22c85c-f4e8-4771-ae7b-5750868762c4"), "BioCaseProvider", "io.ABCD.providerList", null),  //default defined in TaxEditor
78
//
79
//    //specimen
80
//    ShowSpecimen(UUID.fromString("a925f874-b953-429f-9db7-f28e3beb576f"), "Show Specimen", "showSpecimen", Boolean.TRUE),
81
//    ShowCollectingAreasInGeneralSection(UUID.fromString("578a1195-64ce-4dfb-9be9-6f2823288678"), "Show Collecting Area in General Section", "specimen.detail.showCollectingAreaInGeneralSection", Boolean.FALSE),
82
//    ShowTaxonAssociations(UUID.fromString("849c24f9-b62b-4f70-b0a0-1b02182b3433"), "Show Taxon Associations", "specimen.detail.showTaxonAssociations", Boolean.FALSE),
83
//    ShowLifeForm(UUID.fromString("85870e7d-a6a3-4c9b-97d6-eb27e6516860"), "Show Life Form", "showLifeForm", Boolean.FALSE),
84
//
85
//
86
//    DefaultBehaviourForPublishFlag(UUID.fromString("24e636fc-ef3b-4a2c-8c9e-018143e66949"), "Default behaviour for publish flag", "defaultBehaviourForPublishFlag", PublishEnum.InheritFromParent)
90 87
    ;
91 88

  
92 89

  
93 90

  
94 91
    private static EnumeratedTermVoc<EditorPreferencePredicate> delegateVoc;
95 92
    private IEnumTerm<EditorPreferencePredicate> delegateVocTerm;
96

  
97
    static {
98
        delegateVoc = EnumeratedTermVoc.getVoc(EditorPreferencePredicate.class);
99
    }
93
//
94
//    static {
95
//        delegateVoc = EnumeratedTermVoc.getVoc(EditorPreferencePredicate.class);
96
//    }
100 97
    private Object defaultValue;
101

  
102

  
103
    private EditorPreferencePredicate(UUID uuid, String messageString, String key, Object defaultValue){
104
       this(uuid, messageString, key, null, defaultValue);
105
    }
106

  
107
    private EditorPreferencePredicate(UUID uuid, String messageString, String modelKey, PreferencePredicate parent, Object defaultValue){
108
        delegateVocTerm = EnumeratedTermVoc.addTerm(getClass(), this, uuid, messageString, modelKey, parent);
109
        this.defaultValue = defaultValue;
110

  
111
    }
112

  
98
//
99
//
100
//    private EditorPreferencePredicate(UUID uuid, String messageString, String key, Object defaultValue){
101
//       this(uuid, messageString, key, null, defaultValue);
102
//    }
103
//
104
//    private EditorPreferencePredicate(UUID uuid, String messageString, String modelKey, PreferencePredicate parent, Object defaultValue){
105
//        delegateVocTerm = EnumeratedTermVoc.addTerm(getClass(), this, uuid, messageString, modelKey, parent);
106
//        this.defaultValue = defaultValue;
107
//
108
//    }
109
//
113 110
    @Override
114 111
    public Object getDefaultValue() {return defaultValue;}
115 112

  

Also available in: Unified diff