Project

General

Profile

« Previous | Next » 

Revision 2d4607f2

Added by Anahit Babadshanjan over 15 years ago

TypeDesignationStatus renamed to SpecimenTypeDesignationStatus

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/SpecimenTypeDesignation.java
36 36
 * {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or a figure}. All {@link TaxonNameBase taxon names}
37 37
 * which have a {@link Rank rank} "species aggregate" or lower can only be typified
38 38
 * by specimens. Moreover each typification by a specimen (or by a figure) has a
39
 * {@link TypeDesignationStatus status} like "holotype" or "isotype".
39
 * {@link SpecimenTypeDesignationStatus status} like "holotype" or "isotype".
40 40
 * <P>
41 41
 * This class corresponds to: <ul>
42 42
 * <li> NomenclaturalType according to the TDWG ontology
......
53 53
@XmlRootElement(name = "SpecimenTypeDesignation")
54 54
@XmlAccessorType(XmlAccessType.FIELD)
55 55
@XmlType(name = "SpecimenTypeDesignation", propOrder = {
56
    "typeSpecimen",
57
    "typeStatus"
56
    "typeSpecimen"
58 57
})
59 58
@Entity
60 59
@Audited
61
public class SpecimenTypeDesignation extends TypeDesignationBase implements ITypeDesignation {
60
public class SpecimenTypeDesignation extends TypeDesignationBase<SpecimenTypeDesignationStatus>
61
implements ITypeDesignation {
62 62
	
63 63
	private static final Logger logger = Logger.getLogger(SpecimenTypeDesignation.class);
64 64
	
......
69 69
	@Cascade(CascadeType.SAVE_UPDATE)
70 70
	private DerivedUnitBase typeSpecimen;
71 71
	
72
	@XmlElement(name = "TypeStatus")
73
	@XmlIDREF
74
	@XmlSchemaType(name = "IDREF")
75
	@ManyToOne(fetch = FetchType.LAZY)
76
	private TypeDesignationStatus typeStatus;
77

  
78 72
//	/**
79 73
//	 * Creates a new specimen type designation instance
80 74
//	 * (including its {@link reference.ReferenceBase reference source} and eventually
......
103 97
	/** 
104 98
	 * Class constructor: creates a new empty specimen type designation.
105 99
	 * 
106
	 * @see	#SpecimenTypeDesignation(DerivedUnitBase, TypeDesignationStatus,
100
	 * @see	#SpecimenTypeDesignation(DerivedUnitBase, SpecimenTypeDesignationStatus,
107 101
	 * ReferenceBase, String, String, boolean)
108 102
	 */
109 103
	protected SpecimenTypeDesignation(){
110
		
111 104
	}
112 105
	
113 106
	/**
......
127 120
	 * @param isNotDesignated		the boolean flag indicating whether there is no specimen type at all for 
128 121
	 * 								<i>this</i> specimen type designation
129 122
	 * @see							#SpecimenTypeDesignation()
130
	 * @see							TaxonNameBase#addSpecimenTypeDesignation(Specimen, TypeDesignationStatus, ReferenceBase, String, String, boolean, boolean)
123
	 * @see							TaxonNameBase#addSpecimenTypeDesignation(Specimen, SpecimenTypeDesignationStatus, ReferenceBase, String, String, boolean, boolean)
131 124
	 * @see							TypeDesignationBase#isNotDesignated()
132 125
	 * @see							eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase
133 126
	 */
134
	protected SpecimenTypeDesignation(DerivedUnitBase specimen, TypeDesignationStatus status, ReferenceBase citation, String citationMicroReference, 
127
	protected SpecimenTypeDesignation(DerivedUnitBase specimen, SpecimenTypeDesignationStatus status, ReferenceBase citation, String citationMicroReference, 
135 128
			String originalNameString, boolean isNotDesignated) {
136 129
		super(citation, citationMicroReference, originalNameString, isNotDesignated);
137 130
		this.setTypeSpecimen(specimen);
......
156 149
		this.typeSpecimen = typeSpecimen;
157 150
	}
158 151

  
159
	/** 
160
	 * Returns the {@link TypeDesignationStatus type designation status} for <i>this</i> specimen type
161
	 * designation. This status describes which of the possible categories of
162
	 * types like "holotype", "neotype", "syntype" or "isotype" applies to <i>this</i>
163
	 * specimen type designation.
164
	 */
165
	public TypeDesignationStatus getTypeStatus(){
166
		return this.typeStatus;
167
	}
168
	/**
169
	 * @see  #getTypeStatus()
170
	 */
171
	public void setTypeStatus(TypeDesignationStatus typeStatus){
172
		this.typeStatus = typeStatus;
173
	}
174

  
175 152
	/* (non-Javadoc)
176 153
	 * @see eu.etaxonomy.cdm.model.name.ITypeDesignation#isLectoType()
177 154
	 */
......
184 161
	 * holotype is found to belong to more than one taxon name,
185 162
	 * or as long as it is missing.
186 163
	 *
187
	 * @see  TypeDesignationStatus#isLectotype()
188
	 * @see  TypeDesignationStatus#HOLOTYPE()
164
	 * @see  SpecimenTypeDesignationStatus#isLectotype()
165
	 * @see  SpecimenTypeDesignationStatus#HOLOTYPE()
189 166
	 */
190 167
	@Transient
191 168
	public boolean isLectoType() {
192
		return typeStatus.isLectotype();
169
		return getTypeStatus().isLectotype();
193 170
	}
194 171
	
195 172
}

Also available in: Unified diff