Project

General

Profile

Download (8.56 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 isAllowOverride = true;
19
    private boolean isSimpleDetailsViewActivated = true;
20

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

    
37
	private boolean isNameApprobiationActivated = true;
38

    
39
    public NameDetailsConfigurator(boolean isSimpleDetailsViewActivated){
40
        this.isSimpleDetailsViewActivated = isSimpleDetailsViewActivated;
41
    }
42

    
43
    public boolean isSimpleDetailsViewActivated() {
44
        return isSimpleDetailsViewActivated;
45
    }
46

    
47
    public void setSimpleDetailsViewActivated(boolean isSimpleDetailsViewActivated) {
48
        this.isSimpleDetailsViewActivated = isSimpleDetailsViewActivated;
49
    }
50

    
51
    public boolean isTaxonSectionActivated() {
52
        return isTaxonSectionActivated;
53
    }
54

    
55
    public void setTaxonSectionActivated(boolean isTaxonSectionActivated) {
56
        this.isTaxonSectionActivated = isTaxonSectionActivated;
57
    }
58

    
59
    public boolean isLSIDActivated() {
60
        return isLSIDActivated;
61
    }
62

    
63
    public void setLSIDActivated(boolean isLSIDActivated) {
64
        this.isLSIDActivated = isLSIDActivated;
65
    }
66

    
67
    public boolean isNomenclaturalCodeActived() {
68
        return isNomenclaturalCodeActived;
69
    }
70

    
71
    public void setNomenclaturalCodeActived(boolean isNomenclaturalCodeActived) {
72
        this.isNomenclaturalCodeActived = isNomenclaturalCodeActived;
73
    }
74

    
75
    public boolean isNameCacheActivated() {
76
        return isNameCacheActivated;
77
    }
78

    
79
    public void setNameCacheActivated(boolean isNameCacheActivated) {
80
        this.isNameCacheActivated = isNameCacheActivated;
81
    }
82

    
83
    public boolean isAppendedPhraseActivated() {
84
        return isAppendedPhraseActivated;
85
    }
86

    
87
    public void setAppendedPhraseActivated(boolean isAppendedPhraseActivated) {
88
        this.isAppendedPhraseActivated = isAppendedPhraseActivated;
89
    }
90

    
91
    public boolean isRankActivated() {
92
        return isRankActivated;
93
    }
94

    
95
    public void setRankActivated(boolean isRankActivated) {
96
        this.isRankActivated = isRankActivated;
97
    }
98

    
99
    public boolean isAtomisedEpithetsActivated() {
100
        return isAtomisedEpithetsActivated;
101
    }
102

    
103
    public void setAtomisedEpithetsActivated(boolean isAtomisedEpithetsActivated) {
104
        this.isAtomisedEpithetsActivated = isAtomisedEpithetsActivated;
105
    }
106

    
107
    public boolean isAuthorshipSectionActivated() {
108
        return isAuthorshipSectionActivated;
109
    }
110

    
111
    public void setAuthorshipSectionActivated(boolean isAuthorshipSectionActivated) {
112
        this.isAuthorshipSectionActivated = isAuthorshipSectionActivated;
113
    }
114

    
115
    public boolean isNomenclaturalReferenceSectionActivated() {
116
        return isNomenclaturalReferenceSectionActivated;
117
    }
118

    
119
    public void setNomenclaturalReferenceSectionActivated(boolean isNomenclaturalReferenceSectionActivated) {
120
        this.isNomenclaturalReferenceSectionActivated = isNomenclaturalReferenceSectionActivated;
121
    }
122

    
123
    public boolean isNomenclaturalStatusSectionActivated() {
124
        return isNomenclaturalStatusSectionActivated;
125
    }
126

    
127
    public void setNomenclaturalStatusSectionActivated(boolean isNomenclaturalStatusSectionActivated) {
128
        this.isNomenclaturalStatusSectionActivated = isNomenclaturalStatusSectionActivated;
129
    }
130

    
131
    public boolean isTypeDesignationSectionActivated() {
132
        return isTypeDesignationSectionActivated;
133
    }
134

    
135
    public void setTypeDesignationSectionActivated(boolean isTypeDesignationSectionActivated) {
136
        this.isTypeDesignationSectionActivated = isTypeDesignationSectionActivated;
137
    }
138

    
139
    public boolean isNameRelationsSectionActivated() {
140
        return isNameRelationsSectionActivated;
141
    }
142

    
143
    public void setNameRelationsSectionActivated(boolean isNameRelationsSectionActivated) {
144
        this.isNameRelationsSectionActivated = isNameRelationsSectionActivated;
145
    }
146

    
147
    /**
148
     * @return the isProtologueActivated
149
     */
150
    public boolean isProtologueActivated() {
151
        return isProtologueActivated;
152
    }
153

    
154
    /**
155
     * @param isProtologueActivated the isProtologueActivated to set
156
     */
157
    public void setProtologueActivated(boolean isProtologueActivated) {
158
        this.isProtologueActivated = isProtologueActivated;
159
    }
160

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

    
171
        result.append("taxon");
172
        result.append(":");
173
        result.append(this.isTaxonSectionActivated);
174
        result.append(";");
175

    
176
        result.append("lsid");
177
        result.append(":");
178
        result.append(this.isLSIDActivated());
179
        result.append(";");
180
        result.append("nameApproviation");
181
        result.append(":");
182
        result.append(this.isNameApprobiationActivated());
183
        result.append(";");
184
        result.append("nc");
185
        result.append(":");
186
        result.append(this.isNomenclaturalCodeActived());
187
        result.append(";");
188
        result.append("ap");
189
        result.append(":");
190
        result.append(this.isAppendedPhraseActivated());
191
        result.append(";");
192
        result.append("rank");
193
        result.append(":");
194
        result.append(this.isRankActivated());
195
        result.append(";");
196
        result.append("author");
197
        result.append(":");
198
        result.append(this.isAuthorshipSectionActivated());
199
        result.append(";");
200
        result.append("atomisedEpithets");
201
        result.append(":");
202
        result.append(this.isAtomisedEpithetsActivated());
203
        result.append(";");
204
        result.append("nomRef");
205
        result.append(":");
206
        result.append(this.isNomenclaturalReferenceSectionActivated());
207
        result.append(";");
208
        result.append("nomStat");
209
        result.append(":");
210
        result.append(this.isNomenclaturalStatusSectionActivated());
211
        result.append(";");
212
        result.append("protologue");
213
        result.append(":");
214
        result.append(this.isProtologueActivated());
215
        result.append(";");
216
        result.append("typeDes");
217
        result.append(":");
218
        result.append(this.isTypeDesignationSectionActivated());
219
        result.append(";");
220
        result.append("nameRelation");
221
        result.append(":");
222
        result.append(this.isNameRelationsSectionActivated());
223
        result.append(";");
224
        result.append("hybrid");
225
        result.append(":");
226
        result.append(this.isHybridActivated());
227

    
228
      return result.toString();
229
    }
230

    
231

    
232

    
233
    /**
234
     * @return the isAuthorCacheActivated
235
     */
236
    public boolean isAuthorCacheActivated() {
237
        return isAuthorCacheActivated;
238
    }
239

    
240
    /**
241
     * @param isAuthorCacheActivated the isAuthorCacheActivated to set
242
     */
243
    public void setAuthorCacheActivated(boolean isAuthorCacheActivated) {
244
        this.isAuthorCacheActivated = isAuthorCacheActivated;
245
    }
246

    
247
	public boolean isHybridActivated() {
248
		return isHybridActivated;
249
	}
250

    
251
	public void setHybridActivated(boolean isHybridActivated) {
252
		this.isHybridActivated = isHybridActivated;
253
	}
254

    
255
	public void setNameApprobiationActivated(boolean isNameApprobiationActivated) {
256
		this.isNameApprobiationActivated  = isNameApprobiationActivated;
257

    
258
	}
259
	public boolean isNameApprobiationActivated() {
260
		return isNameApprobiationActivated;
261

    
262
	}
263

    
264
    public boolean isAllowOverride() {
265
        return isAllowOverride;
266
    }
267

    
268
    public void setAllowOverride(boolean isAllowOverride) {
269
        this.isAllowOverride = isAllowOverride;
270
    }
271

    
272
}
(15-15/24)