/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import eu.etaxonomy.cdm.hibernate.search.DateTimeBridge;
import eu.etaxonomy.cdm.jaxb.DateTimeAdapter;
-import eu.etaxonomy.cdm.model.common.DefinedTerm;
+import eu.etaxonomy.cdm.model.common.OrderedTerm;
import eu.etaxonomy.cdm.model.common.VersionableEntity;
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
+import eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
/**
* A DNA Quality describes the quality of a {@link SpecimenOrObservationType#DnaSample}
- *
+ *
* @author a.mueller
* @created 18-Oct-2014
*/
private static final long serialVersionUID = -8829069331010573654L;
@SuppressWarnings("unused")
private static final Logger logger = Logger.getLogger(DnaQuality.class);
-
+
// ****************** FACTORY METHOD *****************/
-
+
/**
* Factory method
* @return
return new DnaQuality();
}
-// ************** ATTRIBUTES ****************************/
-
+// ************** ATTRIBUTES ****************************/
+
//TODO
-// @XmlTransient
-// @Transient
-// private MaterialOrMethodEvent purificationMethod;
+// @XmlElement(name = "PurificationMethod")
+// @XmlIDREF
+// @XmlSchemaType(name = "IDREF")
+// @ManyToOne(fetch = FetchType.LAZY)
+// private MaterialOrMethodEvent purificationMethodTerm;
+
private String purificationMethod;
-
+
private Double ratioOfAbsorbance260_230;
-
+
private Double ratioOfAbsorbance260_280;
-
+
private Double concentration;
- @XmlElement(name = "Type")
+ @XmlElement(name = "concentrationUnit")
@XmlIDREF
@XmlSchemaType(name = "IDREF")
@ManyToOne(fetch = FetchType.LAZY)
private MeasurementUnit concentrationUnit;
-
-
+
+
@XmlElement(name = "Type")
@XmlIDREF
@XmlSchemaType(name = "IDREF")
@ManyToOne(fetch = FetchType.LAZY)
- private DefinedTerm qualityTerm;
-
+ private OrderedTerm qualityTerm;
+
@XmlElement (name = "QualityCheckDate", type= String.class)
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@Type(type="dateTimeUserType")
@FieldBridge(impl = DateTimeBridge.class)
@Audited
private DateTime qualityCheckDate;
-
+
// ******************* CONSTRUCTOR *************************/
-
+
/**
* Constructor
*/
- private DnaQuality() {}
-
-//************ GETTER / SETTER **********************************/
-
+ protected DnaQuality() {}
+
+//************ GETTER / SETTER **********************************/
+
public String getPurificationMethod() {
return purificationMethod;
public void setRatioOfAbsorbance260_280(Double ratioOfAbsorbance260_280) {
this.ratioOfAbsorbance260_280 = ratioOfAbsorbance260_280;
}
-
-
+
+
public Double getConcentration() {
return concentration;
}
this.qualityCheckDate = qualityCheckDate;
}
- public DefinedTerm getQualityTerm() {
+ public OrderedTerm getQualityTerm() {
return qualityTerm;
}
- public void setQualityTerm(DefinedTerm qualityTerm) {
+ public void setQualityTerm(OrderedTerm qualityTerm) {
this.qualityTerm = qualityTerm;
}
-
-//*********** CLONE **********************************/
-
- /**
+
+//*********** CLONE **********************************/
+
+ /**
* Clones <i>this</i> dna quality. This is a shortcut that enables to
* create a new instance that differs only slightly from <i>this</i> dna quality
* by modifying only some of the attributes.<BR>
- * @throws CloneNotSupportedException
- *
+ * @throws CloneNotSupportedException
+ *
* @see Specimen#clone()
* @see DerivedUnit#clone()
* @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
public DnaQuality clone() {
try {
DnaQuality result = (DnaQuality)super.clone();
-
+
//purification method ??
-
- //no changes to: rationXXX, concentration, qualityCheckDate, qualityTerm,
+
+ //no changes to: rationXXX, concentration, qualityCheckDate, qualityTerm,
return result;
-
+
} catch (CloneNotSupportedException e) {
- throw new RuntimeException(e); //may not occur as Clonable is implemented
+ throw new RuntimeException(e); //may not occur as Clonable is implemented
}
}