2 * Copyright (C) 2016 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.preference
;
16 public class NameDetailsConfigurator
{
18 private boolean isSimpleDetailsViewActivated
= true;
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;
36 private boolean isNameApprobiationActivated
= true;
38 public NameDetailsConfigurator(boolean isSimpleDetailsViewActivated
){
39 this.isSimpleDetailsViewActivated
= isSimpleDetailsViewActivated
;
42 public boolean isSimpleDetailsViewActivated() {
43 return isSimpleDetailsViewActivated
;
46 public void setSimpleDetailsViewActivated(boolean isSimpleDetailsViewActivated
) {
47 this.isSimpleDetailsViewActivated
= isSimpleDetailsViewActivated
;
50 public boolean isTaxonSectionActivated() {
51 return isTaxonSectionActivated
;
54 public void setTaxonSectionActivated(boolean isTaxonSectionActivated
) {
55 this.isTaxonSectionActivated
= isTaxonSectionActivated
;
58 public boolean isLSIDActivated() {
59 return isLSIDActivated
;
62 public void setLSIDActivated(boolean isLSIDActivated
) {
63 this.isLSIDActivated
= isLSIDActivated
;
66 public boolean isNomenclaturalCodeActived() {
67 return isNomenclaturalCodeActived
;
70 public void setNomenclaturalCodeActived(boolean isNomenclaturalCodeActived
) {
71 this.isNomenclaturalCodeActived
= isNomenclaturalCodeActived
;
74 public boolean isNameCacheActivated() {
75 return isNameCacheActivated
;
78 public void setNameCacheActivated(boolean isNameCacheActivated
) {
79 this.isNameCacheActivated
= isNameCacheActivated
;
82 public boolean isAppendedPhraseActivated() {
83 return isAppendedPhraseActivated
;
86 public void setAppendedPhraseActivated(boolean isAppendedPhraseActivated
) {
87 this.isAppendedPhraseActivated
= isAppendedPhraseActivated
;
90 public boolean isRankActivated() {
91 return isRankActivated
;
94 public void setRankActivated(boolean isRankActivated
) {
95 this.isRankActivated
= isRankActivated
;
98 public boolean isAtomisedEpithetsActivated() {
99 return isAtomisedEpithetsActivated
;
102 public void setAtomisedEpithetsActivated(boolean isAtomisedEpithetsActivated
) {
103 this.isAtomisedEpithetsActivated
= isAtomisedEpithetsActivated
;
106 public boolean isAuthorshipSectionActivated() {
107 return isAuthorshipSectionActivated
;
110 public void setAuthorshipSectionActivated(boolean isAuthorshipSectionActivated
) {
111 this.isAuthorshipSectionActivated
= isAuthorshipSectionActivated
;
114 public boolean isNomenclaturalReferenceSectionActivated() {
115 return isNomenclaturalReferenceSectionActivated
;
118 public void setNomenclaturalReferenceSectionActivated(boolean isNomenclaturalReferenceSectionActivated
) {
119 this.isNomenclaturalReferenceSectionActivated
= isNomenclaturalReferenceSectionActivated
;
122 public boolean isNomenclaturalStatusSectionActivated() {
123 return isNomenclaturalStatusSectionActivated
;
126 public void setNomenclaturalStatusSectionActivated(boolean isNomenclaturalStatusSectionActivated
) {
127 this.isNomenclaturalStatusSectionActivated
= isNomenclaturalStatusSectionActivated
;
130 public boolean isTypeDesignationSectionActivated() {
131 return isTypeDesignationSectionActivated
;
134 public void setTypeDesignationSectionActivated(boolean isTypeDesignationSectionActivated
) {
135 this.isTypeDesignationSectionActivated
= isTypeDesignationSectionActivated
;
138 public boolean isNameRelationsSectionActivated() {
139 return isNameRelationsSectionActivated
;
142 public void setNameRelationsSectionActivated(boolean isNameRelationsSectionActivated
) {
143 this.isNameRelationsSectionActivated
= isNameRelationsSectionActivated
;
147 * @return the isProtologueActivated
149 public boolean isProtologueActivated() {
150 return isProtologueActivated
;
154 * @param isProtologueActivated the isProtologueActivated to set
156 public void setProtologueActivated(boolean isProtologueActivated
) {
157 this.isProtologueActivated
= isProtologueActivated
;
161 public String
toString(){
162 StringBuffer result
= new StringBuffer();
163 //the preference value is build like this:
164 //<section1>:true;<section2>:false....
165 result
.append("simpleViewActivated");
167 result
.append(this.isSimpleDetailsViewActivated
);
170 result
.append("taxon");
172 result
.append(this.isTaxonSectionActivated
);
175 result
.append("lsid");
177 result
.append(this.isLSIDActivated());
179 result
.append("nameApproviation");
181 result
.append(this.isNameApprobiationActivated());
185 result
.append(this.isNomenclaturalCodeActived());
189 result
.append(this.isAppendedPhraseActivated());
191 result
.append("rank");
193 result
.append(this.isRankActivated());
195 result
.append("author");
197 result
.append(this.isAuthorshipSectionActivated());
199 result
.append("atomisedEpithets");
201 result
.append(this.isAtomisedEpithetsActivated());
203 result
.append("nomRef");
205 result
.append(this.isNomenclaturalReferenceSectionActivated());
207 result
.append("nomStat");
209 result
.append(this.isNomenclaturalStatusSectionActivated());
211 result
.append("protologue");
213 result
.append(this.isProtologueActivated());
215 result
.append("typeDes");
217 result
.append(this.isTypeDesignationSectionActivated());
219 result
.append("nameRelation");
221 result
.append(this.isNameRelationsSectionActivated());
223 result
.append("hybrid");
225 result
.append(this.isHybridActivated());
227 return result
.toString();
233 * @return the isAuthorCacheActivated
235 public boolean isAuthorCacheActivated() {
236 return isAuthorCacheActivated
;
240 * @param isAuthorCacheActivated the isAuthorCacheActivated to set
242 public void setAuthorCacheActivated(boolean isAuthorCacheActivated
) {
243 this.isAuthorCacheActivated
= isAuthorCacheActivated
;
246 public boolean isHybridActivated() {
247 return isHybridActivated
;
250 public void setHybridActivated(boolean isHybridActivated
) {
251 this.isHybridActivated
= isHybridActivated
;
254 public void setNameApprobiationActivated(boolean isNameApprobiationActivated
) {
255 this.isNameApprobiationActivated
= isNameApprobiationActivated
;
258 public boolean isNameApprobiationActivated() {
259 return isNameApprobiationActivated
;