Project

General

Profile

Download (3.12 KB) Statistics
| Branch: | Tag: | Revision:
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 eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
14
import org.apache.log4j.Logger;
15
import javax.persistence.*;
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.XmlRootElement;
20
import javax.xml.bind.annotation.XmlType;
21

    
22
/**
23
 * The class representing the assignation of a nomenclatural status to a 
24
 * {@link TaxonNameBase taxon name}. This includes a {@link NomenclaturalStatusType nomenclatural status type}
25
 * (for instance "invalid", "novum" or "conserved") and eventually the article
26
 * of the corresponding {@link NomenclaturalCode nomenclatural code} this status assignation is based on.
27
 * One nomenclatural status type can be assigned to several taxon names.
28
 * 
29
 * @author m.doering
30
 * @version 1.0
31
 * @created 08-Nov-2007 13:06:39
32
 */
33
@XmlAccessorType(XmlAccessType.FIELD)
34
@XmlType(name = "", propOrder = {
35
    "ruleConsidered",
36
    "type"
37
})
38
@Entity
39
public class NomenclaturalStatus extends ReferencedEntityBase {
40
	
41
	static Logger logger = Logger.getLogger(NomenclaturalStatus.class);
42
	
43
	//The nomenclatural code rule considered. The article/note/recommendation in the code in question that is commented on in
44
	//the note property.
45
	@XmlElement(name = "ruleConsidered")
46
	private String ruleConsidered;
47
	
48
	@XmlElement(name = "NomenclaturalStatusType")
49
	private NomenclaturalStatusType type;
50

    
51
	/** 
52
	 * Class constructor: creates a new empty nomenclatural status instance.
53
	 */
54
	protected NomenclaturalStatus() {
55
		super();
56
	}
57

    
58
	/** 
59
	 * Creates a new nomenclatural status instance with a given
60
	 * {@link NomenclaturalStatusType nomenclatural status type}.
61
	 * 
62
	 * @see #NomenclaturalStatus()
63
	 */
64
	public static NomenclaturalStatus NewInstance(NomenclaturalStatusType nomStatusType){
65
		NomenclaturalStatus status = new NomenclaturalStatus();
66
		status.setType(nomStatusType);
67
		return status;
68
	}
69
	
70

    
71
	/** 
72
	 * Returns the {@link NomenclaturalStatusType nomenclatural status type} of <i>this</i>
73
	 * nomenclatural status.
74
	 */
75
	@ManyToOne
76
	public NomenclaturalStatusType getType(){
77
		return this.type;
78
	}
79

    
80
	/**
81
	 * @see  #getType()
82
	 */
83
	public void setType(NomenclaturalStatusType type){
84
		this.type = type;
85
	}
86

    
87
	/** 
88
	 * Returns the nomenclatural code rule considered (that is the
89
	 * article/note/recommendation in the nomenclatural code ruling
90
	 * the {@link TaxonNameBase#getNomenclaturalCode() taxon name(s)}) of <i>this</i>
91
	 * nomenclatural status. The considered rule gives the reason why the
92
	 * {@link NomenclaturalStatusType nomenclatural status type} has been
93
	 * assigned to the {@link TaxonNameBase taxon name(s)}.
94
	 */
95
	public String getRuleConsidered(){
96
		return this.ruleConsidered;
97
	}
98

    
99
	/**
100
	 * @see  #getRuleConsidered()
101
	 */
102
	public void setRuleConsidered(String ruleConsidered){
103
		this.ruleConsidered = ruleConsidered;
104
	}
105

    
106
}
(11-11/20)