2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.model
.molecular
;
13 import javax
.persistence
.Entity
;
14 import javax
.persistence
.FetchType
;
15 import javax
.persistence
.ManyToOne
;
16 import javax
.persistence
.Transient
;
17 import javax
.xml
.bind
.annotation
.XmlAccessType
;
18 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
19 import javax
.xml
.bind
.annotation
.XmlElement
;
20 import javax
.xml
.bind
.annotation
.XmlIDREF
;
21 import javax
.xml
.bind
.annotation
.XmlRootElement
;
22 import javax
.xml
.bind
.annotation
.XmlSchemaType
;
23 import javax
.xml
.bind
.annotation
.XmlTransient
;
24 import javax
.xml
.bind
.annotation
.XmlType
;
26 import org
.apache
.log4j
.Logger
;
27 import org
.hibernate
.envers
.Audited
;
28 import org
.joda
.time
.DateTime
;
30 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
31 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
32 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
33 import eu
.etaxonomy
.cdm
.model
.occurrence
.MaterialOrMethodEvent
;
34 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationType
;
37 * A DNA Quality describes the quality of a {@link SpecimenOrObservationType#DnaSample}
40 * @created 18-Oct-2014
42 @XmlAccessorType(XmlAccessType
.FIELD
)
43 @XmlType(name
= "DnaQuality", propOrder
= {
44 "ratioOfAbsorbance230_260",
45 "ratioOfAbsorbance260_280",
48 // ,"purificationMethod"
49 // ,"dateQualityCheck"
53 @XmlRootElement(name
= "DnaQuality")
55 //@Indexed(index = "eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase")
57 public class DnaQuality
extends VersionableEntity
implements Cloneable
{
58 private static final long serialVersionUID
= -8829069331010573654L;
59 @SuppressWarnings("unused")
60 private static final Logger logger
= Logger
.getLogger(DnaQuality
.class);
62 // ****************** FACTORY METHOD *****************/
68 public static DnaQuality
NewInstance(){
69 return new DnaQuality();
72 // ************** ATTRIBUTES ****************************/
74 private Double ratioOfAbsorbance230_260
;
76 private Double ratioOfAbsorbance260_280
;
78 private Double concentration
;
80 @XmlElement(name
= "Type")
82 @XmlSchemaType(name
= "IDREF")
83 @ManyToOne(fetch
= FetchType
.LAZY
)
84 private DefinedTerm qualityTerm
;
89 private MaterialOrMethodEvent purificationMethod
;
94 private DateTime dateQualityCheck
;
99 private DateTime dateNanoDrop
;
102 // ******************* CONSTRUCTOR *************************/
107 private DnaQuality() {}
109 //************ GETTER / SETTER **********************************/
111 public Double
getRatioOfAbsorbance230_260() {
112 return ratioOfAbsorbance230_260
;
115 public void setRatioOfAbsorbance230_260(Double ratioOfAbsorbance230_260
) {
116 this.ratioOfAbsorbance230_260
= ratioOfAbsorbance230_260
;
119 public Double
getRatioOfAbsorbance260_280() {
120 return ratioOfAbsorbance260_280
;
123 public void setRatioOfAbsorbance260_280(Double ratioOfAbsorbance260_280
) {
124 this.ratioOfAbsorbance260_280
= ratioOfAbsorbance260_280
;
128 public Double
getConcentration() {
129 return concentration
;
132 public void setConcentration(Double concentration
) {
133 this.concentration
= concentration
;
136 public DefinedTerm
getQualityTerm() {
140 public void setQualityTerm(DefinedTerm qualityTerm
) {
141 this.qualityTerm
= qualityTerm
;
146 //*********** CLONE **********************************/
149 * Clones <i>this</i> dna quality. This is a shortcut that enables to
150 * create a new instance that differs only slightly from <i>this</i> dna quality
151 * by modifying only some of the attributes.<BR>
152 * @throws CloneNotSupportedException
154 * @see Specimen#clone()
155 * @see DerivedUnit#clone()
156 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
157 * @see java.lang.Object#clone()
160 public DnaQuality
clone() {
162 DnaQuality result
= (DnaQuality
)super.clone();
164 //purification method ??
166 //no changes to: rationXXX, concentration, dates, qualityTerm,
169 } catch (CloneNotSupportedException e
) {
170 throw new RuntimeException(e
); //may not occur as Clonable is implemented