Revision 401fe405
Added by Andreas Müller over 13 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/util/TestDatabase.java | ||
---|---|---|
43 | 43 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
44 | 44 |
import eu.etaxonomy.cdm.model.occurrence.Specimen; |
45 | 45 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
46 |
import eu.etaxonomy.cdm.model.reference.ReferenceBase;
|
|
46 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
47 | 47 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
48 | 48 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
49 | 49 |
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType; |
50 | 50 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
51 | 51 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
52 | 52 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
53 |
import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;
|
|
53 |
import eu.etaxonomy.cdm.model.taxon.Classification;
|
|
54 | 54 |
|
55 | 55 |
/** |
56 | 56 |
* @author a.babadshanjan |
... | ... | |
97 | 97 |
} |
98 | 98 |
|
99 | 99 |
/** |
100 |
* This method constructs a small sample taxonomic tree to test JAXB marshaling.
|
|
100 |
* This method constructs a small sample classification to test JAXB marshaling.
|
|
101 | 101 |
* The sample tree contains four taxa. The root taxon has two children taxa, and |
102 | 102 |
* there is one "free" taxon without a parent and children. |
103 | 103 |
*/ |
... | ... | |
109 | 109 |
|
110 | 110 |
//List<TermBase> terms = new ArrayList<TermBase>(); |
111 | 111 |
List<DefinedTermBase> terms = new ArrayList<DefinedTermBase>(); |
112 |
List<ReferenceBase> references = new ArrayList<ReferenceBase>();
|
|
112 |
List<Reference> references = new ArrayList<Reference>();
|
|
113 | 113 |
List<TaxonNameBase> taxonomicNames = new ArrayList<TaxonNameBase>(); |
114 | 114 |
List<TaxonBase> taxonBases = new ArrayList<TaxonBase>(); |
115 | 115 |
|
... | ... | |
145 | 145 |
// List<Synonym> synonyms = new ArrayList<Synonym>(); |
146 | 146 |
List<AnnotatableEntity> homotypicalGroups; |
147 | 147 |
|
148 |
ReferenceBase citRef, sec;
|
|
148 |
Reference citRef, sec; |
|
149 | 149 |
BotanicalName name1, name2, name21, nameRoot1, nameFree, synName11, synName12, synName2, synNameFree; |
150 | 150 |
BotanicalName nameRoot2, nameR2_1, nameR2_2; |
151 | 151 |
Taxon child1, child2, child21, root1T, root2T, freeT; |
152 | 152 |
Taxon childR2_1, childR2_2; |
153 | 153 |
TaxonNode child1Node, child2Node, child21Node, root1TNode, root2TNode, freeTNode; |
154 | 154 |
TaxonNode childR2_1Node, childR2_2Node; |
155 |
TaxonomicTree taxTree, taxTree2;
|
|
155 |
Classification taxTree, taxTree2;
|
|
156 | 156 |
Synonym syn11, syn12, syn2, synFree; |
157 | 157 |
Rank rankSpecies, rankSubspecies, rankGenus; |
158 | 158 |
|
... | ... | |
299 | 299 |
|
300 | 300 |
// taxonomic children |
301 | 301 |
|
302 |
//TODO: Adapt to taxonomic tree
|
|
303 |
taxTree = TaxonomicTree.NewInstance("TestTree");
|
|
302 |
//TODO: Adapt to classification
|
|
303 |
taxTree = Classification.NewInstance("TestTree");
|
|
304 | 304 |
|
305 | 305 |
root1TNode = taxTree.addChildTaxon(root1T, sec, null, null); |
306 | 306 |
child1Node = root1TNode.addChildTaxon(child1, null, null, null); |
307 | 307 |
child2Node = root1TNode.addChildTaxon(child2, null, null, null); |
308 | 308 |
child21Node = child2Node.addChildTaxon(child21, null, null, null); |
309 | 309 |
|
310 |
taxTree2 = TaxonomicTree.NewInstance("TestTree2");
|
|
310 |
taxTree2 = Classification.NewInstance("TestTree2");
|
|
311 | 311 |
|
312 | 312 |
root2TNode = taxTree2.addChildTaxon(root2T, sec, null, null); |
313 | 313 |
root2TNode.addChildTaxon(child1, sec, "p.1010", syn11); |
... | ... | |
335 | 335 |
|
336 | 336 |
DataSet dataSet = new DataSet(); |
337 | 337 |
|
338 |
logger.warn("WARNING: TestDatabase has been commented in parts. Mainly, must be adapted to taxonomic tree.");
|
|
338 |
logger.warn("WARNING: TestDatabase has been commented in parts. Mainly, must be adapted to classification.");
|
|
339 | 339 |
|
340 | 340 |
dataSet.setTerms(terms); |
341 | 341 |
dataSet.setAgents(agents); |
Also available in: Unified diff
merge cdmlib-app-3.0.2 to trunk (app-import)