Revision 3bdbeb62
Added by Andreas Müller about 3 years ago
cdmlib-io/src/test/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/AbcdGgbnImportTest.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.cdm.io.specimen.abcd206.in; |
11 | 10 |
|
12 | 11 |
import static org.junit.Assert.assertEquals; |
... | ... | |
68 | 67 |
* @author a.mueller |
69 | 68 |
* @since 29.01.2009 |
70 | 69 |
*/ |
71 |
|
|
72 | 70 |
public class AbcdGgbnImportTest extends CdmTransactionalIntegrationTest { |
73 | 71 |
|
74 | 72 |
@SpringBeanByName |
... | ... | |
461 | 459 |
@DataSet(loadStrategy=CleanSweepInsertLoadStrategy.class, value="/eu/etaxonomy/cdm/database/ClearDBDataSet.xml"), |
462 | 460 |
@DataSet( value="AbcdGgbnImportTest.testAttachDnaSampleToDerivedUnit.xml", loadStrategy=CleanSweepInsertLoadStrategy.class) |
463 | 461 |
}) |
464 |
|
|
465 | 462 |
public void testAttachDnaSampleToExistingDerivedUnit_parentChild(){ |
466 | 463 |
UUID fieldUnit1Uuid = UUID.fromString("0f896630-48d6-4352-9c91-278be28ce19c"); |
467 | 464 |
UUID derivedUnit1Uuid = UUID.fromString("eb40cb0f-efb2-4985-819e-a9168f6d61fe"); |
... | ... | |
516 | 513 |
@DataSet(loadStrategy=CleanSweepInsertLoadStrategy.class, value="/eu/etaxonomy/cdm/database/ClearDBDataSet.xml"), |
517 | 514 |
@DataSet( value="AbcdGgbnImportTest.testAttachDnaSampleToDerivedUnit.xml", loadStrategy=CleanSweepInsertLoadStrategy.class) |
518 | 515 |
}) |
519 |
|
|
520 | 516 |
public void testAttachDnaSampleToExistingDerivedUnit_sibling(){ |
521 | 517 |
UUID fieldUnit1Uuid = UUID.fromString("0f896630-48d6-4352-9c91-278be28ce19c"); |
522 | 518 |
UUID derivedUnit1Uuid = UUID.fromString("eb40cb0f-efb2-4985-819e-a9168f6d61fe"); |
... | ... | |
669 | 665 |
|
670 | 666 |
} |
671 | 667 |
|
672 |
|
|
673 | 668 |
@Override |
674 | 669 |
public void createTestDataSet() throws FileNotFoundException { |
675 | 670 |
UUID derivedUnit1Uuid = UUID.fromString("eb40cb0f-efb2-4985-819e-a9168f6d61fe"); |
... | ... | |
687 | 682 |
setComplete(); |
688 | 683 |
endTransaction(); |
689 | 684 |
|
690 |
|
|
691 | 685 |
try { |
692 | 686 |
writeDbUnitDataSetFile(new String[] { |
693 | 687 |
"SpecimenOrObservationBase", |
... | ... | |
696 | 690 |
e.printStackTrace(); |
697 | 691 |
} |
698 | 692 |
} |
699 |
|
|
700 |
} |
|
693 |
} |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/molecular/Primer.java | ||
---|---|---|
36 | 36 |
* |
37 | 37 |
* @author a.mueller |
38 | 38 |
* @since 2013-07-08 |
39 |
* |
|
40 | 39 |
*/ |
41 | 40 |
@XmlAccessorType(XmlAccessType.FIELD) |
42 | 41 |
@XmlType(name = "Primer", propOrder = { |
... | ... | |
50 | 49 |
@Audited |
51 | 50 |
//TODO which base class (..., identifiable, definedTerm, ...) |
52 | 51 |
public class Primer extends AnnotatableEntity { |
52 |
|
|
53 | 53 |
private static final long serialVersionUID = 6179007910988646989L; |
54 | 54 |
private static final Logger logger = Logger.getLogger(Primer.class); |
55 | 55 |
|
... | ... | |
79 | 79 |
@Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE}) |
80 | 80 |
private Reference publishedIn; |
81 | 81 |
|
82 |
|
|
83 |
|
|
84 |
// ******************** FACTORY METHOD ******************/ |
|
82 |
// ******************** FACTORY METHOD ******************/ |
|
85 | 83 |
|
86 | 84 |
public static Primer NewInstance(String label){ |
87 | 85 |
Primer result = new Primer(); |
... | ... | |
89 | 87 |
return result; |
90 | 88 |
} |
91 | 89 |
|
92 |
// ********************* CONSTRUCTOR ********************/
|
|
90 |
// ********************* CONSTRUCTOR ********************/ |
|
93 | 91 |
|
94 | 92 |
//made protected to fix a java.lang.InstantiationException which occurred while loading an Amplification |
95 | 93 |
//and its primer. see https://stackoverflow.com/questions/7273125/hibernate-envers-and-javassist-enhancement-failed-exception |
... | ... | |
97 | 95 |
|
98 | 96 |
// ********************* GETTER / SETTER ********************/ |
99 | 97 |
|
100 |
|
|
101 | 98 |
/** |
102 | 99 |
* The name of this primer, usually given by the producers. |
103 | 100 |
* @return the label of this primer. |
... | ... | |
105 | 102 |
public String getLabel() { |
106 | 103 |
return label; |
107 | 104 |
} |
108 |
|
|
109 | 105 |
/** |
110 | 106 |
* @see #getLabel() |
111 | 107 |
*/ |
... | ... | |
120 | 116 |
public SequenceString getSequence() { |
121 | 117 |
return sequence; |
122 | 118 |
} |
123 |
|
|
124 | 119 |
/** |
125 | 120 |
* @see Primer#getSequence() |
126 | 121 |
*/ |
... | ... | |
131 | 126 |
this.sequence = sequence; |
132 | 127 |
} |
133 | 128 |
|
134 |
|
|
135 | 129 |
/** |
136 | 130 |
* #4470 |
137 | 131 |
*/ |
138 | 132 |
public DefinedTerm getDnaMarker() { |
139 | 133 |
return dnaMarker; |
140 | 134 |
} |
141 |
|
|
142 | 135 |
public void setDnaMarker(DefinedTerm dnaMarker) { |
143 | 136 |
this.dnaMarker = dnaMarker; |
144 | 137 |
} |
... | ... | |
153 | 146 |
public Reference getPublishedIn() { |
154 | 147 |
return publishedIn; |
155 | 148 |
} |
156 |
|
|
157 | 149 |
/** |
158 | 150 |
* @see #getPublishedIn() |
159 | 151 |
*/ |
... | ... | |
161 | 153 |
this.publishedIn = publishedIn; |
162 | 154 |
} |
163 | 155 |
|
164 |
// ********************* CLONE ********************/ |
|
156 |
// ********************* CLONE ********************/ |
|
157 |
|
|
165 | 158 |
/** |
166 | 159 |
* Clones <i>this</i> primer. This is a shortcut that enables to create |
167 | 160 |
* a new instance that differs only slightly from <i>this</i> primer by |
Also available in: Unified diff
cleanup