(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / name / ViralName.java
1 /**
2 * Copyright (C) 2007 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
10 package eu.etaxonomy.cdm.model.name;
11
12
13 import org.apache.log4j.Logger;
14
15 import eu.etaxonomy.cdm.strategy.cache.INameCacheStrategy;
16 import eu.etaxonomy.cdm.strategy.cache.INonViralNameCacheStrategy;
17
18 import javax.persistence.*;
19
20 /**
21 * The taxon name class for viral taxa. The scientific name will be stored
22 * as a string (consisting eventually of several words even combined also with
23 * non alphabetical characters) in the inherited {@link common.IdentifiableEntity#getTitleCache() titleCache} attribute.
24 * Classification has no influence on the names of viral taxon names and no
25 * viral taxon must be taxonomically included in another viral taxon with
26 * higher rank. For examples see ICTVdb:
27 * http://www.ncbi.nlm.nih.gov/ICTVdb/Ictv/vn_indxA.htm
28 *
29 * @author m.doering
30 * @version 1.0
31 * @created 08-Nov-2007 13:07:02
32 */
33 @Entity
34 public class ViralName extends TaxonNameBase<ViralName, INameCacheStrategy> {
35 private static final Logger logger = Logger.getLogger(ViralName.class);
36
37 protected INameCacheStrategy cacheStrategy;
38 //The accepted acronym for the Virus, e.g. PCV for Peanut Clump Virus
39 private String acronym;
40
41
42 public static ViralName NewInstance(Rank rank){
43 return new ViralName(rank);
44 }
45
46
47
48 public ViralName(Rank rank) {
49 super(rank);
50 }
51
52
53 public String getAcronym(){
54 return this.acronym;
55 }
56 public void setAcronym(String acronym){
57 this.acronym = acronym;
58 }
59
60 @Override
61 public String generateTitle(){
62 logger.warn("not yet implemented");
63 return this.toString();
64 }
65
66 @Override
67 @Transient
68 public boolean isCodeCompliant() {
69 logger.warn("not yet implemented");
70 return false;
71 }
72
73
74 @Transient
75 @Override
76 public NomenclaturalCode getNomeclaturalCode(){
77 return NomenclaturalCode.VIRAL();
78 }
79
80
81 @Transient
82 @Override
83 public INameCacheStrategy getCacheStrategy() {
84 return cacheStrategy;
85 }
86
87
88 @Override
89 public void setCacheStrategy(INameCacheStrategy cacheStrategy) {
90 this.cacheStrategy = cacheStrategy;
91 }
92
93 }