2 * Copyright (C) 2007 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.
10 package eu
.etaxonomy
.cdm
.model
.name
;
13 import javax
.persistence
.Entity
;
14 import javax
.persistence
.ManyToOne
;
15 import javax
.persistence
.Transient
;
16 import javax
.xml
.bind
.annotation
.XmlAccessType
;
17 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
18 import javax
.xml
.bind
.annotation
.XmlElement
;
19 import javax
.xml
.bind
.annotation
.XmlIDREF
;
20 import javax
.xml
.bind
.annotation
.XmlRootElement
;
21 import javax
.xml
.bind
.annotation
.XmlSchemaType
;
22 import javax
.xml
.bind
.annotation
.XmlTransient
;
23 import javax
.xml
.bind
.annotation
.XmlType
;
25 import org
.apache
.log4j
.Logger
;
26 import org
.hibernate
.annotations
.Cascade
;
27 import org
.hibernate
.annotations
.CascadeType
;
28 import org
.hibernate
.annotations
.Target
;
30 import eu
.etaxonomy
.cdm
.model
.agent
.INomenclaturalAuthor
;
31 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
32 import eu
.etaxonomy
.cdm
.model
.reference
.INomenclaturalReference
;
33 import eu
.etaxonomy
.cdm
.strategy
.cache
.name
.INonViralNameCacheStrategy
;
34 import eu
.etaxonomy
.cdm
.strategy
.cache
.name
.NonViralNameDefaultCacheStrategy
;
37 * The taxon name class for all non viral taxa. Parenthetical authorship is derived
38 * from basionym relationship. The scientific name including author strings and
39 * maybe year can be stored as a string in the inherited {@link common.IdentifiableEntity#getTitleCache() titleCache} attribute.
40 * The year itself is an information obtained from the {@link reference.INomenclaturalReference#getYear() nomenclatural reference}.
41 * The scientific name string without author strings and year can be stored in the {@link #getNameCache() nameCache} attribute.
45 * @created 08-Nov-2007 13:06:39
47 @XmlAccessorType(XmlAccessType
.FIELD
)
48 @XmlType(name
= "", propOrder
= {
51 "infraGenericEpithet",
53 "infraSpecificEpithet",
54 "combinationAuthorTeam",
55 "exCombinationAuthorTeam",
57 "exBasionymAuthorTeam",
59 "protectedAuthorshipCache",
63 @XmlRootElement(name
= "NonViralName")
65 public class NonViralName
<T
extends NonViralName
> extends TaxonNameBase
<NonViralName
, INonViralNameCacheStrategy
> {
67 private static final Logger logger
= Logger
.getLogger(NonViralName
.class);
69 @XmlElement(name
= "NameCache")
70 private String nameCache
;
72 @XmlElement(name
= "GenusOrUninomial")
73 private String genusOrUninomial
;
75 @XmlElement(name
= "InfraGenericEpithet")
76 private String infraGenericEpithet
;
78 @XmlElement(name
= "SpecificEpithet")
79 private String specificEpithet
;
81 @XmlElement(name
= "InfraSpecificEpithet")
82 private String infraSpecificEpithet
;
84 @XmlElement(name
= "CombinationAuthorTeam", type
= TeamOrPersonBase
.class)
86 @XmlSchemaType(name
= "IDREF")
87 private INomenclaturalAuthor combinationAuthorTeam
;
89 @XmlElement(name
= "CombinationAuthorTeam", type
= TeamOrPersonBase
.class)
91 @XmlSchemaType(name
= "IDREF")
92 private INomenclaturalAuthor exCombinationAuthorTeam
;
94 @XmlElement(name
= "CombinationAuthorTeam", type
= TeamOrPersonBase
.class)
96 @XmlSchemaType(name
= "IDREF")
97 private INomenclaturalAuthor basionymAuthorTeam
;
99 @XmlElement(name
= "CombinationAuthorTeam", type
= TeamOrPersonBase
.class)
101 @XmlSchemaType(name
= "IDREF")
102 private INomenclaturalAuthor exBasionymAuthorTeam
;
104 @XmlElement(name
= "AuthorshipCache")
105 private String authorshipCache
;
107 @XmlElement(name
= "ProtectedAuthorshipCache")
108 protected boolean protectedAuthorshipCache
;
110 @XmlElement(name
= "ProtectedNameCache")
111 protected boolean protectedNameCache
;
115 protected INonViralNameCacheStrategy cacheStrategy
;
117 // ************* CONSTRUCTORS *************/
119 //needed by hibernate
121 * Class constructor: creates a new non viral taxon name instance
122 * only containing the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
124 * @see #NonViralName(Rank, HomotypicalGroup)
125 * @see #NonViralName(Rank, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
126 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
127 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
128 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
130 protected NonViralName(){
132 setNameCacheStrategy();
136 * Class constructor: creates a new non viral taxon name instance
137 * only containing its {@link common.Rank rank},
138 * its {@link HomotypicalGroup homotypical group} and
139 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
140 * The new non viral taxon name instance will be also added to the set of
141 * non viral taxon names belonging to this homotypical group.
143 * @param rank the rank to be assigned to this non viral taxon name
144 * @param homotypicalGroup the homotypical group to which this non viral taxon name belongs
145 * @see #NonViralName()
146 * @see #NonViralName(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
147 * @see #NewInstance(Rank, HomotypicalGroup)
148 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
149 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
150 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
152 protected NonViralName(Rank rank
, HomotypicalGroup homotypicalGroup
) {
153 super(rank
, homotypicalGroup
);
154 setNameCacheStrategy();
157 * Class constructor: creates a new non viral taxon name instance
158 * containing its {@link common.Rank rank},
159 * its {@link HomotypicalGroup homotypical group},
160 * its scientific name components, its {@link agent.TeamOrPersonBase author(team)},
161 * its {@link reference.INomenclaturalReference nomenclatural reference} and
162 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
163 * The new non viral taxon name instance will be also added to the set of
164 * non viral taxon names belonging to this homotypical group.
166 * @param rank the rank to be assigned to this non viral taxon name
167 * @param genusOrUninomial the string for this taxon name
168 * if its rank is genus or higher or for the genus part
169 * if its rank is lower than genus
170 * @param infraGenericEpithet the string for the first epithet of
171 * this non viral taxon name if its rank is lower than genus
172 * and higher than species aggregate
173 * @param specificEpithet the string for the first epithet of
174 * this non viral taxon name if its rank is species aggregate or lower
175 * @param infraSpecificEpithet the string for the second epithet of
176 * this non viral taxon name if its rank is lower than species
177 * @param combinationAuthorTeam the author or the team who published this non viral taxon name
178 * @param nomenclaturalReference the nomenclatural reference where this non viral taxon name was published
179 * @param nomenclMicroRef the string with the details for precise location within the nomenclatural reference
180 * @param homotypicalGroup the homotypical group to which this non viral taxon name belongs
181 * @see #NonViralName()
182 * @see #NonViralName(Rank, HomotypicalGroup)
183 * @see #NewInstance(Rank, HomotypicalGroup)
184 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
185 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
186 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
188 protected NonViralName(Rank rank
, String genusOrUninomial
, String infraGenericEpithet
, String specificEpithet
, String infraSpecificEpithet
, TeamOrPersonBase combinationAuthorTeam
, INomenclaturalReference nomenclaturalReference
, String nomenclMicroRef
, HomotypicalGroup homotypicalGroup
) {
189 super(rank
, homotypicalGroup
);
190 setNameCacheStrategy();
191 setGenusOrUninomial(genusOrUninomial
);
192 setInfraGenericEpithet (infraGenericEpithet
);
193 setSpecificEpithet(specificEpithet
);
194 setInfraSpecificEpithet(infraSpecificEpithet
);
195 setCombinationAuthorTeam(combinationAuthorTeam
);
196 setNomenclaturalReference(nomenclaturalReference
);
197 this.setNomenclaturalMicroReference(nomenclMicroRef
);
200 //********* METHODS **************************************/
202 * Creates a new non viral taxon name instance
203 * only containing its {@link common.Rank rank} and
204 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
206 * @param rank the rank to be assigned to this non viral taxon name
207 * @see #NewInstance(Rank, HomotypicalGroup)
208 * @see #NonViralName(Rank, HomotypicalGroup)
209 * @see #NonViralName()
210 * @see #NonViralName(Rank, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
211 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
212 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
213 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
215 public static NonViralName
NewInstance(Rank rank
){
216 return new NonViralName(rank
, null);
220 * Creates a new non viral taxon name instance
221 * only containing its {@link common.Rank rank},
222 * its {@link HomotypicalGroup homotypical group} and
223 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
224 * The new non viral taxon name instance will be also added to the set of
225 * non viral taxon names belonging to this homotypical group.
227 * @param rank the rank to be assigned to this non viral taxon name
228 * @param homotypicalGroup the homotypical group to which this non viral taxon name belongs
229 * @see #NewInstance(Rank)
230 * @see #NonViralName(Rank, HomotypicalGroup)
231 * @see #NonViralName()
232 * @see #NonViralName(Rank, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
233 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
234 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
235 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
237 public static NonViralName
NewInstance(Rank rank
, HomotypicalGroup homotypicalGroup
){
238 return new NonViralName(rank
, homotypicalGroup
);
241 private void setNameCacheStrategy(){
242 if (getClass() == NonViralName
.class){
243 this.cacheStrategy
= NonViralNameDefaultCacheStrategy
.NewInstance();
250 * Returns the {@link eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy cache strategy} used to generate
251 * several strings corresponding to this non viral taxon name
252 * (in particular taxon name caches and author strings).
254 * @return the cache strategy used for this non viral taxon name
255 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
256 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
257 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
261 public INonViralNameCacheStrategy
getCacheStrategy() {
262 return cacheStrategy
;
265 * @see #getCacheStrategy()
268 public void setCacheStrategy(INonViralNameCacheStrategy cacheStrategy
) {
269 this.cacheStrategy
= cacheStrategy
;
275 * Returns the {@link agent.INomenclaturalAuthor author (team)} that published this non viral
278 * @return the nomenclatural author (team) of this non viral taxon name
279 * @see agent.INomenclaturalAuthor
280 * @see agent.TeamOrPersonBase#getNomenclaturalTitle()
283 @Cascade({CascadeType
.SAVE_UPDATE
})
284 @Target(TeamOrPersonBase
.class)
285 public INomenclaturalAuthor
getCombinationAuthorTeam(){
286 return this.combinationAuthorTeam
;
289 * @see #getCombinationAuthorTeam()
291 public void setCombinationAuthorTeam(INomenclaturalAuthor combinationAuthorTeam
){
292 this.combinationAuthorTeam
= combinationAuthorTeam
;
296 * Returns the {@link agent.INomenclaturalAuthor author (team)} that contributed to
297 * the publication of this non viral taxon name as generally stated by
298 * the {@link #getCombinationAuthorTeam() combination author (team)} itself.
299 * The presence of an author (team) of this non viral taxon name is a
300 * condition for the existence of an ex author (team) for this same name.
302 * @return the nomenclatural ex author (team) of this non viral taxon name
303 * @see #getCombinationAuthorTeam()
304 * @see agent.INomenclaturalAuthor
305 * @see agent.TeamOrPersonBase#getNomenclaturalTitle()
308 @Cascade({CascadeType
.SAVE_UPDATE
})
309 @Target(TeamOrPersonBase
.class)
310 public INomenclaturalAuthor
getExCombinationAuthorTeam(){
311 return this.exCombinationAuthorTeam
;
314 * @see #getExCombinationAuthorTeam()
316 public void setExCombinationAuthorTeam(INomenclaturalAuthor exCombinationAuthorTeam
){
317 this.exCombinationAuthorTeam
= exCombinationAuthorTeam
;
321 * Returns the {@link agent.INomenclaturalAuthor author (team)} that published the original combination
322 * on which this non viral taxon name is nomenclaturally based. Such an
323 * author (team) can only exist if this non viral taxon name is a new
324 * combination due to a taxonomical revision.
326 * @return the nomenclatural basionym author (team) of this non viral taxon name
327 * @see #getCombinationAuthorTeam()
328 * @see agent.INomenclaturalAuthor
329 * @see agent.TeamOrPersonBase#getNomenclaturalTitle()
332 @Cascade({CascadeType
.SAVE_UPDATE
})
333 @Target(TeamOrPersonBase
.class)
334 public INomenclaturalAuthor
getBasionymAuthorTeam(){
335 return basionymAuthorTeam
;
338 * @see #getBasionymAuthorTeam()
340 public void setBasionymAuthorTeam(INomenclaturalAuthor basionymAuthorTeam
) {
341 this.basionymAuthorTeam
= basionymAuthorTeam
;
345 * Returns the {@link agent.INomenclaturalAuthor author (team)} that contributed to
346 * the publication of the original combination this non viral taxon name is
347 * based on. This should have been generally stated by
348 * the {@link #getCombinationAuthorTeam() basionym author (team)} itself.
349 * The presence of a basionym author (team) of this non viral taxon name is a
350 * condition for the existence of an ex basionym author (team)
351 * for this same name.
353 * @return the nomenclatural ex basionym author (team) of this non viral taxon name
354 * @see #getBasionymAuthorTeam()
355 * @see #getCombinationAuthorTeam()
356 * @see agent.INomenclaturalAuthor
357 * @see agent.TeamOrPersonBase#getNomenclaturalTitle()
360 @Cascade({CascadeType
.SAVE_UPDATE
})
361 @Target(TeamOrPersonBase
.class)
362 public INomenclaturalAuthor
getExBasionymAuthorTeam(){
363 return exBasionymAuthorTeam
;
366 * @see #getExBasionymAuthorTeam()
368 public void setExBasionymAuthorTeam(INomenclaturalAuthor exBasionymAuthorTeam
) {
369 this.exBasionymAuthorTeam
= exBasionymAuthorTeam
;
372 * Returns either the scientific name string (without authorship) for this
373 * non viral taxon name if its rank is genus or higher (monomial) or the string for
374 * the genus part of it if its {@link Rank rank} is lower than genus (bi- or trinomial).
375 * Genus or uninomial strings begin with an upper case letter.
377 * @return the string containing the suprageneric name, the genus name or the genus part of this non viral taxon name
378 * @see #getNameCache()
380 public String
getGenusOrUninomial() {
381 return genusOrUninomial
;
385 * @see #getGenusOrUninomial()
387 public void setGenusOrUninomial(String genusOrUninomial
) {
388 this.genusOrUninomial
= genusOrUninomial
;
392 * Returns the genus subdivision epithet string (infrageneric part) for
393 * this non viral taxon name if its {@link Rank rank} is infrageneric (lower than genus and
394 * higher than species aggregate: binomial). Genus subdivision epithet
395 * strings begin with an upper case letter.
397 * @return the string containing the infrageneric part of this non viral taxon name
398 * @see #getNameCache()
400 public String
getInfraGenericEpithet(){
401 return this.infraGenericEpithet
;
405 * @see #getInfraGenericEpithet()
407 public void setInfraGenericEpithet(String infraGenericEpithet
){
408 this.infraGenericEpithet
= infraGenericEpithet
;
412 * Returns the species epithet string for this non viral taxon name if its {@link Rank rank} is
413 * species aggregate or lower (bi- or trinomial). Species epithet strings
414 * begin with a lower case letter.
416 * @return the string containing the species epithet of this non viral taxon name
417 * @see #getNameCache()
419 public String
getSpecificEpithet(){
420 return this.specificEpithet
;
424 * @see #getSpecificEpithet()
426 public void setSpecificEpithet(String specificEpithet
){
427 this.specificEpithet
= specificEpithet
;
431 * Returns the species subdivision epithet string (infraspecific part) for
432 * this non viral taxon name if its {@link Rank rank} is infraspecific
433 * (lower than species: trinomial). Species subdivision epithet strings
434 * begin with a lower case letter.
436 * @return the string containing the infraspecific part of this non viral taxon name
437 * @see #getNameCache()
439 public String
getInfraSpecificEpithet(){
440 return this.infraSpecificEpithet
;
444 * @see #getInfraSpecificEpithet()
446 public void setInfraSpecificEpithet(String infraSpecificEpithet
){
447 this.infraSpecificEpithet
= infraSpecificEpithet
;
451 * Generates and returns the string with the scientific name of this
452 * non viral taxon name including author strings and maybe year according to
453 * the strategy defined in
454 * {@link eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy INonViralNameCacheStrategy}.
455 * This string may be stored in the inherited
456 * {@link common.IdentifiableEntity#getTitleCache() titleCache} attribute.
457 * This method overrides the generic and inherited
458 * TaxonNameBase#generateTitle() method.
460 * @return the string with the composed name of this non viral taxon name with authorship (and maybe year)
461 * @see common.IdentifiableEntity#generateTitle()
462 * @see common.IdentifiableEntity#getTitleCache()
463 * @see TaxonNameBase#generateTitle()
466 public String
generateTitle(){
467 if (cacheStrategy
== null){
468 logger
.warn("No CacheStrategy defined for nonViralName: " + this.getUuid());
471 return cacheStrategy
.getTitleCache(this);
476 * Generates the composed name string of this non viral taxon name without author
477 * strings or year according to the strategy defined in
478 * {@link eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy INonViralNameCacheStrategy}.
479 * The result might be stored in {@link #getNameCache() nameCache} if the
480 * flag {@link #isProtectedNameCache() protectedNameCache} is not set.
482 * @return the string with the composed name of this non viral taxon name without authors or year
483 * @see #getNameCache()
485 protected String
generateNameCache(){
486 if (cacheStrategy
== null){
487 logger
.warn("No CacheStrategy defined for taxonName: " + this.toString());
490 return cacheStrategy
.getNameCache(this);
495 * Returns or generates the nameCache (scientific name
496 * without author strings and year) string for this non viral taxon name. If the
497 * {@link #isProtectedNameCache() protectedNameCache} flag is not set (False)
498 * the string will be generated according to a defined strategy,
499 * otherwise the value of the actual nameCache string will be returned.
501 * @return the string which identifies this non viral taxon name (without authors or year)
502 * @see #generateNameCache()
504 public String
getNameCache() {
505 if (protectedNameCache
){
506 return this.nameCache
;
508 // is title dirty, i.e. equal NULL?
509 if (nameCache
== null){
510 this.nameCache
= generateNameCache();
516 * Assigns a nameCache string to this non viral taxon name and protects it from being overwritten.
518 * @param nameCache the string which identifies this non viral taxon name (without authors or year)
519 * @see #getNameCache()
521 public void setNameCache(String nameCache
){
522 this.nameCache
= nameCache
;
523 this.setProtectedTitleCache(false);
524 this.setProtectedNameCache(true);
528 * Returns the boolean value of the flag intended to protect (true)
529 * or not (false) the {@link #getNameCache() nameCache} (scientific name without author strings and year)
530 * string of this non viral taxon name.
532 * @return the boolean value of the protectedNameCache flag
533 * @see #getNameCache()
535 public boolean isProtectedNameCache() {
536 return protectedNameCache
;
540 * @see #isProtectedNameCache()
542 public void setProtectedNameCache(boolean protectedNameCache
) {
543 this.protectedNameCache
= protectedNameCache
;
548 * Generates and returns a concatenated and formated authorteams string
549 * including basionym and combination authors of this non viral taxon name
550 * according to the strategy defined in
551 * {@link eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy#getAuthorshipCache(NonViralName) INonViralNameCacheStrategy}.
553 * @return the string with the concatenated and formated authorteams for this non viral taxon name
554 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy#getAuthorshipCache(NonViralName)
556 public String
generateAuthorship(){
557 if (cacheStrategy
== null){
558 logger
.warn("No CacheStrategy defined for nonViralName: " + this.getUuid());
561 return ((INonViralNameCacheStrategy
<T
>)cacheStrategy
).getAuthorshipCache((T
)this);
566 * Returns the concatenated and formated authorteams string including
567 * basionym and combination authors of this non viral taxon name.
568 * If the protectedAuthorshipCache flag is set this method returns the
569 * string stored in the the authorshipCache attribute, otherwise it
570 * generates the complete authorship string, returns it and stores it in
571 * the authorshipCache attribute.
573 * @return the string with the concatenated and formated authorteams for this non viral taxon name
574 * @see #generateAuthorship()
576 public String
getAuthorshipCache() {
577 if (protectedAuthorshipCache
){
578 return this.authorshipCache
;
580 // is title dirty, i.e. equal NULL?
581 if (authorshipCache
== null){
582 this.authorshipCache
= generateAuthorship();
584 //TODO get is Dirty of authors
585 this.authorshipCache
= generateAuthorship();
587 return authorshipCache
;
591 * Assigns an authorshipCache string to this non viral taxon name.
593 * @param authorshipCache the string which identifies the complete authorship of this non viral taxon name
594 * @see #getAuthorshipCache()
596 public void setAuthorshipCache(String authorshipCache
) {
597 this.authorshipCache
= authorshipCache
;
603 * Returns the boolean value "false" since the components of this taxon name
604 * cannot follow the rules of a corresponding {@link NomenclaturalCode nomenclatural code}
605 * which is not defined for this class. The nomenclature code depends on
606 * the concrete name subclass ({@link BacterialName BacterialName},
607 * {@link BotanicalName BotanicalName}, {@link CultivarPlantName CultivarPlantName} or
608 * {@link ZoologicalName ZoologicalName} to which this non viral taxon name belongs.
609 * This method overrides the isCodeCompliant method from the abstract
610 * {@link TaxonNameBase#isCodeCompliant() TaxonNameBase} class.
613 * @see TaxonNameBase#isCodeCompliant()
617 public boolean isCodeCompliant() {
619 logger
.warn("is CodeCompliant not yet implemented");
624 * @see eu.etaxonomy.cdm.model.name.TaxonNameBase#getNomeclaturalCode()
627 * Returns null as {@link NomenclaturalCode nomenclatural code} that governs
628 * the construction of this non viral taxon name since there is no specific
629 * nomenclatural code defined. The real implementention takes place in the
630 * subclasses {@link BacterialName BacterialName},
631 * {@link BotanicalName BotanicalName}, {@link CultivarPlantName CultivarPlantName} and
632 * {@link ZoologicalName ZoologicalName}.
633 * This method overrides the getNomeclaturalCode method from {@link TaxonNameBase#getNomeclaturalCode() TaxonNameBase}.
636 * @see #isCodeCompliant()
637 * @see TaxonNameBase#getHasProblem()
641 public NomenclaturalCode
getNomenclaturalCode() {
642 logger
.warn("Non Viral Name has no specific Code defined. Use subclasses");
647 * Returns the boolean value of the flag intended to protect (true)
648 * or not (false) the {@link #getAuthorshipCache() authorshipCache} (complete authorship string)
649 * of this non viral taxon name.
651 * @return the boolean value of the protectedAuthorshipCache flag
652 * @see #getAuthorshipCache()
654 public boolean isProtectedAuthorshipCache() {
655 return protectedAuthorshipCache
;
659 * @see #isProtectedAuthorshipCache()
660 * @see #getAuthorshipCache()
662 public void setProtectedAuthorshipCache(boolean protectedAuthorshipCache
) {
663 this.protectedAuthorshipCache
= protectedAuthorshipCache
;