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 javax.persistence.Entity;
|
14
|
import javax.xml.bind.annotation.XmlAccessType;
|
15
|
import javax.xml.bind.annotation.XmlAccessorType;
|
16
|
import javax.xml.bind.annotation.XmlRootElement;
|
17
|
import javax.xml.bind.annotation.XmlType;
|
18
|
|
19
|
import org.hibernate.envers.Audited;
|
20
|
import org.hibernate.search.annotations.Indexed;
|
21
|
import org.springframework.beans.factory.annotation.Configurable;
|
22
|
|
23
|
import eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy;
|
24
|
|
25
|
/**
|
26
|
* The taxon name class for viral taxa. The scientific name will be stored
|
27
|
* as a string (consisting eventually of several words even combined also with
|
28
|
* non alphabetical characters) in the inherited {@link eu.etaxonomy.cdm.model.common.IdentifiableEntity#setTitleCache(String) titleCache} attribute.
|
29
|
* Classification has no influence on the names of viral taxon names and no
|
30
|
* viral taxon must be taxonomically included in another viral taxon with
|
31
|
* higher rank. For examples see ICTVdb:
|
32
|
* "http://www.ncbi.nlm.nih.gov/ICTVdb/Ictv/vn_indxA.htm"
|
33
|
* <P>
|
34
|
* This class corresponds to: NameViral according to the ABCD schema.
|
35
|
*
|
36
|
* @author m.doering
|
37
|
* @created 08-Nov-2007 13:07:02
|
38
|
*/
|
39
|
@XmlAccessorType(XmlAccessType.FIELD)
|
40
|
@XmlType(name = "", propOrder = {})
|
41
|
@XmlRootElement(name = "ViralName")
|
42
|
@Entity
|
43
|
@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase")
|
44
|
@Audited
|
45
|
@Configurable
|
46
|
public class ViralName
|
47
|
extends TaxonNameBase<ViralName, INameCacheStrategy> {
|
48
|
private static final long serialVersionUID = -6201649691028218290L;
|
49
|
|
50
|
// ************* CONSTRUCTORS *************/
|
51
|
|
52
|
protected ViralName(){
|
53
|
super();
|
54
|
}
|
55
|
|
56
|
/**
|
57
|
* Class constructor: creates a new viral taxon name instance
|
58
|
* only containing its {@link Rank rank}.
|
59
|
*
|
60
|
* @param rank the rank to be assigned to <i>this</i> viral taxon name
|
61
|
* @see TaxonNameBase#TaxonNameBase(Rank)
|
62
|
*/
|
63
|
protected ViralName(Rank rank) {
|
64
|
super(rank);
|
65
|
}
|
66
|
|
67
|
// ************************* METHODS **************************/
|
68
|
|
69
|
/**
|
70
|
* Returns the {@link NomenclaturalCode nomenclatural code} that governs
|
71
|
* the construction of <i>this</i> viral taxon name, that is the
|
72
|
* International Code of Virus Classification and Nomenclature.
|
73
|
* This method overrides the getNomenclaturalCode method from {@link TaxonNameBase TaxonNameBase}.
|
74
|
*
|
75
|
* @return the nomenclatural code for viruses
|
76
|
* @see #isCodeCompliant()
|
77
|
* @see TaxonNameBase#getHasProblem()
|
78
|
* @see TaxonNameBase#getNomenclaturalCode()
|
79
|
*/
|
80
|
@Override
|
81
|
public NomenclaturalCode getNomenclaturalCode(){
|
82
|
return NomenclaturalCode.ICVCN;
|
83
|
}
|
84
|
|
85
|
|
86
|
//*********************** CLONE ********************************************************/
|
87
|
|
88
|
/**
|
89
|
* Clones <i>this</i> viral name. This is a shortcut that enables to create
|
90
|
* a new instance that differs only slightly from <i>this</i> viral name by
|
91
|
* modifying only some of the attributes.
|
92
|
*
|
93
|
* @see eu.etaxonomy.cdm.model.name.TaxonNameBase#clone()
|
94
|
* @see java.lang.Object#clone()
|
95
|
*/
|
96
|
@Override
|
97
|
public Object clone() {
|
98
|
ViralName result = (ViralName)super.clone();
|
99
|
//no changes to:
|
100
|
return result;
|
101
|
}
|
102
|
}
|