Project

General

Profile

Download (7.52 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2016 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.taxeditor.preference;
10

    
11
/**
12
 * @author k.luther
13
 * @date 16.12.2016
14
 *
15
 */
16
public class NameDetailsConfigurator {
17

    
18
    private boolean isSimpleDetailsViewActivated = true;
19

    
20
    private boolean isTaxonSectionActivated = true;
21
    private boolean isLSIDActivated = true;
22
    private boolean isNomenclaturalCodeActived = true;
23
    private boolean isNameCacheActivated = true;
24
    private boolean isAppendedPhraseActivated = true;
25
    private boolean isRankActivated = true;
26
    private boolean isAtomisedEpithetsActivated = true;
27
    private boolean isAuthorshipSectionActivated = true;
28
    private boolean isAuthorCacheActivated = true;
29
    private boolean isNomenclaturalReferenceSectionActivated = true;
30
    private boolean isNomenclaturalStatusSectionActivated = true;
31
    private boolean isTypeDesignationSectionActivated = true;
32
    private boolean isNameRelationsSectionActivated = true;
33
    private boolean isProtologueActivated = true;
34

    
35
    public NameDetailsConfigurator(boolean isSimpleDetailsViewActivated){
36
        this.isSimpleDetailsViewActivated = isSimpleDetailsViewActivated;
37
    }
38

    
39
    public boolean isSimpleDetailsViewActivated() {
40
        return isSimpleDetailsViewActivated;
41
    }
42

    
43
    public void setSimpleDetailsViewActivated(boolean isSimpleDetailsViewActivated) {
44
        this.isSimpleDetailsViewActivated = isSimpleDetailsViewActivated;
45
    }
46

    
47
    public boolean isTaxonSectionActivated() {
48
        return isTaxonSectionActivated;
49
    }
50

    
51
    public void setTaxonSectionActivated(boolean isTaxonSectionActivated) {
52
        this.isTaxonSectionActivated = isTaxonSectionActivated;
53
    }
54

    
55
    public boolean isLSIDActivated() {
56
        return isLSIDActivated;
57
    }
58

    
59
    public void setLSIDActivated(boolean isLSIDActivated) {
60
        this.isLSIDActivated = isLSIDActivated;
61
    }
62

    
63
    public boolean isNomenclaturalCodeActived() {
64
        return isNomenclaturalCodeActived;
65
    }
66

    
67
    public void setNomenclaturalCodeActived(boolean isNomenclaturalCodeActived) {
68
        this.isNomenclaturalCodeActived = isNomenclaturalCodeActived;
69
    }
70

    
71
    public boolean isNameCacheActivated() {
72
        return isNameCacheActivated;
73
    }
74

    
75
    public void setNameCacheActivated(boolean isNameCacheActivated) {
76
        this.isNameCacheActivated = isNameCacheActivated;
77
    }
78

    
79
    public boolean isAppendedPhraseActivated() {
80
        return isAppendedPhraseActivated;
81
    }
82

    
83
    public void setAppendedPhraseActivated(boolean isAppendedPhraseActivated) {
84
        this.isAppendedPhraseActivated = isAppendedPhraseActivated;
85
    }
86

    
87
    public boolean isRankActivated() {
88
        return isRankActivated;
89
    }
90

    
91
    public void setRankActivated(boolean isRankActivated) {
92
        this.isRankActivated = isRankActivated;
93
    }
94

    
95
    public boolean isAtomisedEpithetsActivated() {
96
        return isAtomisedEpithetsActivated;
97
    }
98

    
99
    public void setAtomisedEpithetsActivated(boolean isAtomisedEpithetsActivated) {
100
        this.isAtomisedEpithetsActivated = isAtomisedEpithetsActivated;
101
    }
102

    
103
    public boolean isAuthorshipSectionActivated() {
104
        return isAuthorshipSectionActivated;
105
    }
106

    
107
    public void setAuthorshipSectionActivated(boolean isAuthorshipSectionActivated) {
108
        this.isAuthorshipSectionActivated = isAuthorshipSectionActivated;
109
    }
110

    
111
    public boolean isNomenclaturalReferenceSectionActivated() {
112
        return isNomenclaturalReferenceSectionActivated;
113
    }
114

    
115
    public void setNomenclaturalReferenceSectionActivated(boolean isNomenclaturalReferenceSectionActivated) {
116
        this.isNomenclaturalReferenceSectionActivated = isNomenclaturalReferenceSectionActivated;
117
    }
118

    
119
    public boolean isNomenclaturalStatusSectionActivated() {
120
        return isNomenclaturalStatusSectionActivated;
121
    }
122

    
123
    public void setNomenclaturalStatusSectionActivated(boolean isNomenclaturalStatusSectionActivated) {
124
        this.isNomenclaturalStatusSectionActivated = isNomenclaturalStatusSectionActivated;
125
    }
126

    
127
    public boolean isTypeDesignationSectionActivated() {
128
        return isTypeDesignationSectionActivated;
129
    }
130

    
131
    public void setTypeDesignationSectionActivated(boolean isTypeDesignationSectionActivated) {
132
        this.isTypeDesignationSectionActivated = isTypeDesignationSectionActivated;
133
    }
134

    
135
    public boolean isNameRelationsSectionActivated() {
136
        return isNameRelationsSectionActivated;
137
    }
138

    
139
    public void setNameRelationsSectionActivated(boolean isNameRelationsSectionActivated) {
140
        this.isNameRelationsSectionActivated = isNameRelationsSectionActivated;
141
    }
142

    
143
    /**
144
     * @return the isProtologueActivated
145
     */
146
    public boolean isProtologueActivated() {
147
        return isProtologueActivated;
148
    }
149

    
150
    /**
151
     * @param isProtologueActivated the isProtologueActivated to set
152
     */
153
    public void setProtologueActivated(boolean isProtologueActivated) {
154
        this.isProtologueActivated = isProtologueActivated;
155
    }
156

    
157
    @Override
158
    public String toString(){
159
        StringBuffer result = new StringBuffer();
160
      //the preference value is build like this:
161
        //<section1>:true;<section2>:false....
162
        result.append("simpleViewActivated");
163
        result.append(":");
164
        result.append(this.isSimpleDetailsViewActivated);
165
        result.append(";");
166

    
167
        result.append("taxon");
168
        result.append(":");
169
        result.append(this.isTaxonSectionActivated);
170
        result.append(";");
171

    
172
        result.append("lsid");
173
        result.append(":");
174
        result.append(this.isLSIDActivated());
175
        result.append(";");
176
        result.append("nc");
177
        result.append(":");
178
        result.append(this.isNomenclaturalCodeActived());
179
        result.append(";");
180
        result.append("ap");
181
        result.append(":");
182
        result.append(this.isAppendedPhraseActivated());
183
        result.append(";");
184
        result.append("rank");
185
        result.append(":");
186
        result.append(this.isRankActivated());
187
        result.append(";");
188
        result.append("author");
189
        result.append(":");
190
        result.append(this.isAuthorshipSectionActivated());
191
        result.append(";");
192
        result.append("atomisedEpithets");
193
        result.append(":");
194
        result.append(this.isAtomisedEpithetsActivated());
195
        result.append(";");
196
        result.append("nomRef");
197
        result.append(":");
198
        result.append(this.isNomenclaturalReferenceSectionActivated());
199
        result.append(";");
200
        result.append("nomStat");
201
        result.append(":");
202
        result.append(this.isNomenclaturalStatusSectionActivated());
203
        result.append(";");
204
        result.append("protologue");
205
        result.append(":");
206
        result.append(this.isProtologueActivated());
207
        result.append(";");
208
        result.append("typeDes");
209
        result.append(":");
210
        result.append(this.isTypeDesignationSectionActivated());
211
        result.append(";");
212
        result.append("nameRelation");
213
        result.append(":");
214
        result.append(this.isNameRelationsSectionActivated());
215

    
216
      return result.toString();
217
    }
218

    
219
    /**
220
     * @return the isAuthorCacheActivated
221
     */
222
    public boolean isAuthorCacheActivated() {
223
        return isAuthorCacheActivated;
224
    }
225

    
226
    /**
227
     * @param isAuthorCacheActivated the isAuthorCacheActivated to set
228
     */
229
    public void setAuthorCacheActivated(boolean isAuthorCacheActivated) {
230
        this.isAuthorCacheActivated = isAuthorCacheActivated;
231
    }
232

    
233

    
234
}
(16-16/25)