Project

General

Profile

Download (7.89 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
    private boolean isHybridActivated = true;
35

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
221
      return result.toString();
222
    }
223

    
224
    
225

    
226
    /**
227
     * @return the isAuthorCacheActivated
228
     */
229
    public boolean isAuthorCacheActivated() {
230
        return isAuthorCacheActivated;
231
    }
232

    
233
    /**
234
     * @param isAuthorCacheActivated the isAuthorCacheActivated to set
235
     */
236
    public void setAuthorCacheActivated(boolean isAuthorCacheActivated) {
237
        this.isAuthorCacheActivated = isAuthorCacheActivated;
238
    }
239

    
240
	public boolean isHybridActivated() {
241
		return isHybridActivated;
242
	}
243

    
244
	public void setHybridActivated(boolean isHybridActivated) {
245
		this.isHybridActivated = isHybridActivated;
246
	}
247

    
248

    
249
}
(16-16/26)