(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 * use name attribute for the entire virus name! examples see ICTVdb: http://www.
22 * ncbi.nlm.nih.gov/ICTVdb/Ictv/vn_indxA.htm
23 * @author m.doering
24 * @version 1.0
25 * @created 08-Nov-2007 13:07:02
26 */
27 @Entity
28 public class ViralName extends TaxonNameBase<ViralName, INameCacheStrategy> {
29 static Logger logger = Logger.getLogger(ViralName.class);
30
31
32 protected INameCacheStrategy cacheStrategy;
33
34
35 //The accepted acronym for the Virus, e.g. PCV for Peanut Clump Virus
36 private String acronym;
37
38 public ViralName(Rank rank) {
39 super(rank);
40 }
41
42
43 public String getAcronym(){
44 return this.acronym;
45 }
46 public void setAcronym(String acronym){
47 this.acronym = acronym;
48 }
49
50 @Override
51 public String generateTitle(){
52 logger.warn("not yet implemented");
53 return this.toString();
54 }
55
56 @Override
57 @Transient
58 public boolean isCodeCompliant() {
59 logger.warn("not yet implemented");
60 return false;
61 }
62
63
64 @Transient
65 @Override
66 public NomenclaturalCode getNomeclaturalCode(){
67 return NomenclaturalCode.VIRAL();
68 }
69
70
71 @Transient
72 @Override
73 public INameCacheStrategy getCacheStrategy() {
74 return cacheStrategy;
75 }
76
77
78 @Override
79 public void setCacheStrategy(INameCacheStrategy cacheStrategy) {
80 this.cacheStrategy = cacheStrategy;
81 }
82
83 }