Project

General

Profile

Download (3.29 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.XmlIDREF;
20
import javax.xml.bind.annotation.XmlSchemaType;
21
import javax.xml.bind.annotation.XmlType;
22

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

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

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

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

    
83
	/**
84
	 * @see  #getType()
85
	 */
86
	public void setType(NomenclaturalStatusType type){
87
		this.type = type;
88
	}
89

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

    
102
	/**
103
	 * @see  #getRuleConsidered()
104
	 */
105
	public void setRuleConsidered(String ruleConsidered){
106
		this.ruleConsidered = ruleConsidered;
107
	}
108

    
109
}
(12-12/22)