Project

General

Profile

Download (6.95 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 isNomenclaturalReferenceSectionActivated = true;
29
    private boolean isNomenclaturalStatusSectionActivated = true;
30
    private boolean isTypeDesignationSectionActivated = true;
31
    private boolean isNameRelationsSectionActivated = true;
32
    private boolean isProtologueActivated = true;
33

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
210
      return result.toString();
211
    }
212

    
213

    
214
}
(17-17/27)