eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF -text
eu.etaxonomy.taxeditor.test/build.properties -text
eu.etaxonomy.taxeditor.test/ide/eclipse/EDITor[!!-~]Tests.launch -text
+eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar -text
eu.etaxonomy.taxeditor.test/pom.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/cdmlib-ehcache.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/datasources.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/cdm.datasources.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/PolytomousKeyTest.xml -text
-eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/TaxonNodeTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/TaxonNameEditorTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/TaxonNavigatorTest.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml -text
eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmModelGetMethodCacherTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/PolytomousKeyTest.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNodeTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNameEditorTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNavigatorTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operations/OperationTestBase.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ITestService.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceInterceptorTest.java -text
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceRebasingTest.java -text
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?><!--
+ generated by Jailer 4.3, Wed Mar 04 16:11:14 CET 2015 from cmathew@cmbgbm-t530
+
+ Extraction Model: all rows from Classification (extractionmodel/by-example/SbE-Classification-16-11-06-737.csv)
+ Database URL: jdbc:mysql://127.0.0.1:3306/local-cyprus
+ Database User: root
+
+ Exported Rows: 31
+ Classification 1
+ HomotypicalGroup 2
+ SynonymRelationship 1
+ TaxonBase 5
+ TaxonNameBase 3
+ TaxonNode 19
+
+--><dataset>
+
+
+ <TaxonNode id="347" created="2010-12-21 15:09:45.0" uuid="d425a971-1abe-4895-9e1f-1e5c8ff1c84c" countchildren="0" classification_id="10" taxon_id="387" treeIndex="#t10#4032#49#346#345#347#" sortIndex="1"/>
+ <TaxonNode id="351" created="2010-12-21 15:09:46.0" uuid="ce54c396-3694-47f2-abb0-1d7b7e057985" countchildren="0" classification_id="10" taxon_id="394" treeIndex="#t10#4032#49#346#345#351#" sortIndex="4"/>
+
+ <HomotypicalGroup id="368" created="2010-12-21 15:09:45.0" uuid="d7eaa174-4efd-4d09-a427-dce4ed6513f7" />
+ <HomotypicalGroup id="375" created="2010-12-21 15:09:46.0" uuid="62ed57d6-2c69-4404-bb95-248a1c9bb24c" />
+
+ <TaxonNameBase DTYPE="BotanicalName" id="387" created="2010-12-21 15:09:45.0" uuid="d25985c7-6fb4-4b31-8a94-5d7c5ba6ad16" protectedtitlecache="false" titleCache="Asplenium ceterach L." fullTitleCache="Asplenium ceterach L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium ceterach" protectedauthorshipcache="false" protectednamecache="false" specificepithet="ceterach" trinomhybrid="false" anamorphic="false" homotypicalgroup_id="368" rank_id="778" />
+ <TaxonNameBase DTYPE="BotanicalName" id="388" created="2010-12-21 15:09:45.0" uuid="747021f1-cf5f-4249-a825-228da3368399" protectedtitlecache="true" titleCache="Asplenium cyprium Viane & Van den heede" fullTitleCache="Asplenium cyprium Viane & Van den heede" parsingproblem="16" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="" binomhybrid="false" hybridformula="false" monomhybrid="false" namecache="Asplenium cyprium Viane & Van den heede" protectedauthorshipcache="false" protectednamecache="true" trinomhybrid="false" anamorphic="false" />
+ <TaxonNameBase DTYPE="BotanicalName" id="394" created="2010-12-21 15:09:46.0" uuid="08f8f376-c9a4-4ea9-950d-3ac30b7fa689" protectedtitlecache="false" titleCache="Asplenium viride Huds." fullTitleCache="Asplenium viride Huds." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="Huds." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium viride" protectedauthorshipcache="false" protectednamecache="false" specificepithet="viride" trinomhybrid="false" anamorphic="false" homotypicalgroup_id="375" rank_id="778" />
+
+ <Classification id="10" created="2010-12-21 15:09:43.0" uuid="0c2b5d25-7b15-4401-8b51-dd4be0ee5cab" protectedtitlecache="false" titleCache="Cyprus" name_id="10" reference_id="10" />
+
+ <TaxonBase DTYPE="Taxon" id="387" created="2011-03-01 20:11:27.0" uuid="9763e5f0-6cd4-4d96-b8a4-4420854f7727" protectedtitlecache="false" titleCache="Asplenium ceterach L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" name_id="387" sec_id="10" publish="true"/>
+ <TaxonBase DTYPE="Synonym" id="388" created="2010-12-21 15:09:45.0" uuid="1eb173bd-b174-4162-8ff5-5136d8f1e746" protectedtitlecache="false" titleCache="Asplenium cyprium Viane & Van den heede sec. Cyprus" doubtful="false" usenamecache="false" name_id="388" sec_id="10" publish="true"/>
+ <TaxonBase DTYPE="Taxon" id="394" created="2011-03-01 20:11:27.0" uuid="aff4fa6f-9aa8-463d-ac07-ec8a1925eb57" protectedtitlecache="false" titleCache="Asplenium viride Huds. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" name_id="394" sec_id="10" publish="true"/>
+
+ <SynonymRelationship id="50" created="2010-12-21 15:09:45.0" uuid="60d1466f-5823-4a69-a071-1887d0c1e72b" doubtful="false" partial="false" proparte="false" relatedfrom_id="388" relatedto_id="387" />
+
+
+</dataset>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?><!--
+ generated by Jailer 4.3, Mon Mar 09 12:52:22 CET 2015 from cmathew@cmbgbm-t530
+
+ Extraction Model: all rows from Classification (extractionmodel/by-example/SbE-Classification-12-51-51-866.csv)
+ Database URL: jdbc:mysql://127.0.0.1:3306/local-cyprus
+ Database User: root
+
+ Exported Rows: 26
+ Classification 1
+ TaxonBase 6
+ TaxonNameBase 6
+ TaxonNode 13
+
+--><dataset>
+ <TaxonNode id="13" created="2010-12-21 15:09:43.0" uuid="0ac32f24-6d55-44ae-8519-c86c83faa938" countchildren="122" createdby_id="11" classification_id="10" parent_id="4032" taxon_id="11" treeIndex="#t10#4032#13#" sortIndex="0"/>
+ <TaxonNode id="49" created="2010-12-21 15:09:43.0" uuid="572290a9-7535-48c8-9f68-25ddbc9869ee" countchildren="10" createdby_id="11" classification_id="10" parent_id="4032" taxon_id="49" treeIndex="#t10#4032#49#" sortIndex="1"/>
+ <TaxonNode id="344" created="2010-12-21 15:09:45.0" uuid="894bc754-235b-4fa1-aa0c-a2b62e3f684c" countchildren="0" createdby_id="11" classification_id="10" parent_id="345" taxon_id="384" treeIndex="#t10#4032#49#346#345#344#" sortIndex="0"/>
+ <TaxonNode id="345" created="2010-12-21 15:09:45.0" uuid="8667c9d7-18e4-4711-a2be-9d468635744d" countchildren="5" createdby_id="11" classification_id="10" parent_id="346" taxon_id="386" treeIndex="#t10#4032#49#346#345#" sortIndex="0"/>
+ <TaxonNode id="346" created="2010-12-21 15:09:45.0" uuid="ffc9b1ec-278e-4298-8bc2-d36bdb2c33b8" countchildren="1" createdby_id="11" classification_id="10" parent_id="49" taxon_id="385" treeIndex="#t10#4032#49#346#" sortIndex="1"/>
+ <TaxonNode id="347" created="2010-12-21 15:09:45.0" uuid="d425a971-1abe-4895-9e1f-1e5c8ff1c84c" countchildren="0" createdby_id="11" classification_id="10" parent_id="345" taxon_id="387" treeIndex="#t10#4032#49#346#345#347#" sortIndex="1"/>
+ <TaxonNode id="348" created="2010-12-21 15:09:46.0" uuid="3bb05d37-51fa-48f6-9f49-0162f2893dd5" countchildren="0" createdby_id="11" classification_id="10" parent_id="345" taxon_id="391" treeIndex="#t10#4032#49#346#345#348#" sortIndex="2"/>
+ <TaxonNode id="350" created="2010-12-21 15:09:46.0" uuid="3f47c04f-4a84-4f53-95ce-840309900db7" countchildren="1" createdby_id="11" classification_id="10" parent_id="345" taxon_id="393" treeIndex="#t10#4032#49#346#345#350#" sortIndex="3"/>
+ <TaxonNode id="351" created="2010-12-21 15:09:46.0" uuid="ce54c396-3694-47f2-abb0-1d7b7e057985" countchildren="0" createdby_id="11" classification_id="10" parent_id="345" taxon_id="394" treeIndex="#t10#4032#49#346#345#351#" sortIndex="4"/>
+ <TaxonNode id="942" created="2010-12-21 15:09:50.0" uuid="713baf41-c76b-4ba6-be82-ffabb7f895c5" countchildren="0" createdby_id="11" classification_id="10" parent_id="943" taxon_id="1070" treeIndex="#t10#4032#49#3880#943#942#" sortIndex="0"/>
+ <TaxonNode id="943" created="2010-12-21 15:09:50.0" uuid="47336df4-af4b-4b40-84de-34fc445d762c" countchildren="1" createdby_id="11" classification_id="10" parent_id="3880" taxon_id="1072" treeIndex="#t10#4032#49#3880#943#" sortIndex="0"/>
+ <TaxonNode id="3880" created="2012-07-19 21:43:16.0" uuid="05102134-ce13-4a0e-be2e-48aa08ecbea5" countchildren="1" createdby_id="30" classification_id="10" parent_id="49" taxon_id="6110" treeIndex="#t10#4032#49#3880#" sortIndex="9"/>
+ <TaxonNode id="4032" created="2014-01-16 10:24:29.0" uuid="29b3fd3f-29b4-4011-ab12-9c1ad1607dbd" countchildren="2" classification_id="10" treeIndex="#t10#4032#"/>
+
+ <TaxonNameBase DTYPE="BotanicalName" id="384" created="2010-12-21 15:09:45.0" uuid="0a89c1d4-b8b9-4bbe-8e25-03cef7179b6d" protectedtitlecache="false" titleCache="Asplenium adiantum-nigrum L." fullTitleCache="Asplenium adiantum-nigrum L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium adiantum-nigrum" protectedauthorshipcache="false" protectednamecache="false" specificepithet="adiantum-nigrum" trinomhybrid="false" anamorphic="false" createdby_id="11" homotypicalgroup_id="365" rank_id="778" combinationauthorteam_id="7220"/>
+ <TaxonNameBase DTYPE="BotanicalName" id="387" created="2010-12-21 15:09:45.0" uuid="d25985c7-6fb4-4b31-8a94-5d7c5ba6ad16" protectedtitlecache="false" titleCache="Asplenium ceterach L." fullTitleCache="Asplenium ceterach L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium ceterach" protectedauthorshipcache="false" protectednamecache="false" specificepithet="ceterach" trinomhybrid="false" anamorphic="false" createdby_id="11" homotypicalgroup_id="368" rank_id="778" combinationauthorteam_id="674"/>
+ <TaxonNameBase DTYPE="BotanicalName" id="391" created="2010-12-21 15:09:46.0" uuid="bb33b929-77f4-47fd-ac6b-265e947871be" protectedtitlecache="false" titleCache="Asplenium onopteris L." fullTitleCache="Asplenium onopteris L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium onopteris" protectedauthorshipcache="false" protectednamecache="false" specificepithet="onopteris" trinomhybrid="false" anamorphic="false" createdby_id="11" homotypicalgroup_id="372" rank_id="778" combinationauthorteam_id="678"/>
+ <TaxonNameBase DTYPE="BotanicalName" id="393" created="2010-12-21 15:09:46.0" uuid="d0d8df45-6d47-4dbf-8554-ea1aa1e00dc9" protectedtitlecache="false" titleCache="Asplenium trichomanes L." fullTitleCache="Asplenium trichomanes L." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="L." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium trichomanes" protectedauthorshipcache="false" protectednamecache="false" specificepithet="trichomanes" trinomhybrid="false" anamorphic="false" createdby_id="11" homotypicalgroup_id="374" rank_id="778" combinationauthorteam_id="7390"/>
+ <TaxonNameBase DTYPE="BotanicalName" id="394" created="2010-12-21 15:09:46.0" uuid="08f8f376-c9a4-4ea9-950d-3ac30b7fa689" protectedtitlecache="false" titleCache="Asplenium viride Huds." fullTitleCache="Asplenium viride Huds." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="Huds." binomhybrid="false" genusoruninomial="Asplenium" hybridformula="false" monomhybrid="false" namecache="Asplenium viride" protectedauthorshipcache="false" protectednamecache="false" specificepithet="viride" trinomhybrid="false" anamorphic="false" createdby_id="11" homotypicalgroup_id="375" rank_id="778" combinationauthorteam_id="682"/>
+ <TaxonNameBase DTYPE="BotanicalName" id="1070" created="2010-12-21 15:09:50.0" uuid="d23fca33-18c6-4b5c-81d7-93359afd76e1" protectedtitlecache="false" titleCache="Cystopteris fragilis (L.) Bernh." fullTitleCache="Cystopteris fragilis (L.) Bernh." parsingproblem="0" problemends="-1" problemstarts="-1" protectedfulltitlecache="false" authorshipcache="(L.) Bernh." binomhybrid="false" genusoruninomial="Cystopteris" hybridformula="false" monomhybrid="false" namecache="Cystopteris fragilis" protectedauthorshipcache="false" protectednamecache="false" specificepithet="fragilis" trinomhybrid="false" anamorphic="false" createdby_id="11" homotypicalgroup_id="1004" rank_id="778" basionymauthorteam_id="2019" combinationauthorteam_id="2021"/>
+
+ <Classification id="10" created="2010-12-21 15:09:43.0" uuid="0c2b5d25-7b15-4401-8b51-dd4be0ee5cab" protectedtitlecache="false" titleCache="Cyprus" createdby_id="11" name_id="10" reference_id="10" rootnode_id="4032"/>
+
+ <TaxonBase DTYPE="Taxon" id="384" created="2011-03-01 20:11:27.0" uuid="b9f1429d-137c-4c23-a11f-7808b50bde4b" protectedtitlecache="false" titleCache="Asplenium adiantum-nigrum L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" name_id="384" sec_id="10" publish="true"/>
+ <TaxonBase DTYPE="Taxon" id="387" created="2011-03-01 20:11:27.0" uuid="9763e5f0-6cd4-4d96-b8a4-4420854f7727" protectedtitlecache="false" titleCache="Asplenium ceterach L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" name_id="387" sec_id="10" publish="true"/>
+ <TaxonBase DTYPE="Taxon" id="391" created="2011-03-01 20:11:27.0" uuid="42c42377-3847-4d85-811f-743ab3d3f0a3" protectedtitlecache="false" titleCache="Asplenium onopteris L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" name_id="391" sec_id="10" publish="true"/>
+ <TaxonBase DTYPE="Taxon" id="393" created="2010-12-21 15:09:46.0" uuid="c1263710-0225-4429-b2b7-518e6db564c5" protectedtitlecache="false" titleCache="Asplenium trichomanes L. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" name_id="393" sec_id="10" publish="true"/>
+ <TaxonBase DTYPE="Taxon" id="394" created="2011-03-01 20:11:27.0" uuid="aff4fa6f-9aa8-463d-ac07-ec8a1925eb57" protectedtitlecache="false" titleCache="Asplenium viride Huds. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" name_id="394" sec_id="10" publish="true"/>
+ <TaxonBase DTYPE="Taxon" id="1070" created="2011-03-01 20:11:30.0" uuid="f380f8ff-2dab-4ea7-a3c9-4758f963eb6b" protectedtitlecache="false" titleCache="Cystopteris fragilis (L.) Bernh. sec. Cyprus" doubtful="false" usenamecache="false" excluded="false" taxonstatusunknown="false" taxonomicchildrencount="0" unplaced="false" createdby_id="11" name_id="1070" sec_id="10" publish="true"/>
+
+
+</dataset>
+++ /dev/null
-<?xml version='1.0' encoding='UTF-8'?>
-<dataset>
- <REFERENCE ID="1" UUID="de7d1205-291f-45d9-9059-ca83fc7ade14" PROTECTEDTITLECACHE="false" REFTYPE="GEN" PROTECTEDABBREVTITLECACHE="false" ABBREVTITLECACHE="Sp. Pl." ABBREVTITLE="Sp. Pl." NOMENCLATURALLYRELEVANT="false" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" />
- <CLASSIFICATION ID="1" UUID="6c2bc8d9-ee62-4222-be89-4a8e31770878" PROTECTEDTITLECACHE="true" ROOTNODE_ID = "1"/>
- <!-- <CLASSIFICATION_TAXONNODE CLASSIFICATION_ID="1" ROOTNODES_ID="1" SORTINDEX="0"/> -->
-
- <TAXONNODE ID="1" TAXON_ID="[null]" PARENT_ID="[null]" SORTINDEX="[null]" CLASSIFICATION_ID="1" UUID="324a1a77-689c-44be-8e65-347d835f4111" COUNTCHILDREN="2" TREEINDEX="#t1#1#"/>
- <TAXONNODE ID="2" TAXON_ID="1" PARENT_ID="1" SORTINDEX="0" CLASSIFICATION_ID="1" UUID="484a1a77-689c-44be-8e65-347d835f47e8" COUNTCHILDREN="0" TREEINDEX="#t1#1#2#"/>
- <TAXONNODE ID="3" TAXON_ID="2" PARENT_ID="1" SORTINDEX="1" CLASSIFICATION_ID="1" UUID="2d41f0c2-b785-4f73-a436-cc2d5e93cc5b" COUNTCHILDREN="0" TREEINDEX="#t1#1#3#"/>
-
- <TAXONBASE DTYPE="Taxon" ID="1" NAME_ID="1" UUID="55c3e41a-c629-40e6-aa6a-ff274ac6ddb1" PROTECTEDTITLECACHE="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" EXCLUDED="false" TAXONSTATUSUNKNOWN="false" UNPLACED="false" TAXONOMICCHILDRENCOUNT="0"/>
- <TAXONBASE DTYPE="Taxon" ID="2" NAME_ID="2" UUID="2659a7e0-ff35-4ee4-8493-b453756ab955" PROTECTEDTITLECACHE="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" EXCLUDED="false" TAXONSTATUSUNKNOWN="false" UNPLACED="false" TAXONOMICCHILDRENCOUNT="0"/>
- <TAXONBASE DTYPE="Synonym" ID="3" NAME_ID="3" UUID="3034249e-9491-4439-bcb6-9c7d68e29bce" PROTECTEDTITLECACHE="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" EXCLUDED="[null]" TAXONSTATUSUNKNOWN="[null]" UNPLACED="[null]" TAXONOMICCHILDRENCOUNT="[null]"/>
- <TAXONBASE DTYPE="Synonym" ID="4" NAME_ID="4" UUID="ac6c5bb1-d36d-4068-af7c-4f0bb009880d" PROTECTEDTITLECACHE="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" EXCLUDED="[null]" TAXONSTATUSUNKNOWN="[null]" UNPLACED="[null]" TAXONOMICCHILDRENCOUNT="[null]"/>
-
- <TAXONNAMEBASE DTYPE="BotanicalName" ID="1" UUID="54a1d7f9-79ab-4fb3-bff5-152e1046cf75" PROTECTEDTITLECACHE="false" PARSINGPROBLEM="0" HOMOTYPICALGROUP_ID="1" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" HYBRIDFORMULA="false" MONOMHYBRID="false" BINOMHYBRID="false" TRINOMHYBRID="false" ANAMORPHIC="false" RANK_ID="765"/>
- <TAXONNAMEBASE DTYPE="BotanicalName" ID="2" UUID="e7f50b04-9648-479b-bc8a-ffebf295dce9" PROTECTEDTITLECACHE="false" PARSINGPROBLEM="0" HOMOTYPICALGROUP_ID="2" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" HYBRIDFORMULA="false" MONOMHYBRID="false" BINOMHYBRID="false" TRINOMHYBRID="false" ANAMORPHIC="false" RANK_ID="765"/>
- <TAXONNAMEBASE DTYPE="BotanicalName" ID="3" UUID="c0439dd6-8d2b-4428-86f4-37f4a90d4583" PROTECTEDTITLECACHE="false" PARSINGPROBLEM="0" HOMOTYPICALGROUP_ID="3" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" HYBRIDFORMULA="false" MONOMHYBRID="false" BINOMHYBRID="false" TRINOMHYBRID="false" ANAMORPHIC="false" RANK_ID="765"/>
- <TAXONNAMEBASE DTYPE="BotanicalName" ID="4" UUID="6a5774bd-c8aa-42dc-91dd-d62d27e7ea2a" PROTECTEDTITLECACHE="false" PARSINGPROBLEM="0" HOMOTYPICALGROUP_ID="4" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" HYBRIDFORMULA="false" MONOMHYBRID="false" BINOMHYBRID="false" TRINOMHYBRID="false" ANAMORPHIC="false" RANK_ID="765"/>
- <HOMOTYPICALGROUP ID="1" CREATED="2011-10-12 19:57:31.0" UUID="d8652fa0-eff9-460d-8990-aed0ebf1322e"/>
- <HOMOTYPICALGROUP ID="2" CREATED="2011-10-12 19:57:31.0" UUID="2a1b0776-b4b5-462a-9be7-f88378ebd732"/>
- <HOMOTYPICALGROUP ID="3" CREATED="2011-10-12 19:57:31.0" UUID="3ac4e376-31cd-47fd-9dd6-eaff415ff0e7"/>
- <HOMOTYPICALGROUP ID="4" CREATED="2011-10-12 19:57:31.0" UUID="76258671-07cf-40f3-a9eb-af286b5945ec"/>
-
- <SYNONYMRELATIONSHIP ID="1" UUID="cc769418-3ba4-4c1f-a4cb-b18bf42ec8e9" CITATION_ID="1" RELATEDFROM_ID="3" RELATEDTO_ID="1" DOUBTFUL="false" PARTIAL="false" PROPARTE="false"/>
- <DESCRIPTIONBASE ID="1" UUID="56cf0c8c-18e3-4bea-9525-b9804cf57c5d" DTYPE="TaxonDescription" TAXON_ID="1" PROTECTEDTITLECACHE="false" IMAGEGALLERY="false" />
- <DESCRIPTIONBASE ID="2" UUID="36af5c7c-18e3-4bec-6535-a9804cf57c6e" DTYPE="TaxonDescription" TAXON_ID="1" PROTECTEDTITLECACHE="false" IMAGEGALLERY="false" />
- <DESCRIPTIONELEMENTBASE DTYPE="TextData" ID="1" INDESCRIPTION_ID="1" ORDERRELEVANT="false"/>
- <DESCRIPTIONELEMENTBASE DTYPE="TextData" ID="2" INDESCRIPTION_ID="2" ORDERRELEVANT="false"/>
- <DESCRIPTIONELEMENTBASE_LANGUAGESTRING DESCRIPTIONELEMENTBASE_ID="1" MULTILANGUAGETEXT_ID="1" MULTILANGUAGETEXT_MAPKEY_ID="406" />
- <DESCRIPTIONELEMENTBASE_LANGUAGESTRING DESCRIPTIONELEMENTBASE_ID="2" MULTILANGUAGETEXT_ID="2" MULTILANGUAGETEXT_MAPKEY_ID="406" />
- <LANGUAGESTRING ID="1" TEXT="Any text" LANGUAGE_ID="406"/>
- <LANGUAGESTRING ID="2" TEXT="Second text" LANGUAGE_ID="406"/>
-
-</dataset>
\ No newline at end of file
// |- root : polytomous key node
// in a recursive call
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH1_INIT_STRATEGY),PolytomousKey.class);
- pkey1 = cdmEntitySession.load(pkey1);
+
// checking to make sure the root object is in the session cache
Assert.assertSame(pkey1.getRoot(), cacher.getFromCache(pkey1.getRoot()));
// |- statement : KeyStatement
// in a recursive call
PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey = cdmEntitySession.load(pkey);
CdmTransientEntityCacher cacher = getCacher(sessionOwner);
// checking to make sure the root object is in the session cache
Assert.assertSame(pkey.getRoot(), cacher.getFromCache(pkey.getRoot()));
// |- question : KeyStatement
// |- statement : KeyStatement
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
- pkey1 = cdmEntitySession.load(pkey1);
+
CdmTransientEntityCacher cacher = getCacher(sessionOwner);
}
// |- root : polytomous key node
// in a recursive call
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH1_INIT_STRATEGY),PolytomousKey.class);
- pkey1 = cdmEntitySession.load(pkey1);
+
CdmTransientEntityCacher cacher = getCacher(sessionOwner);
// this call will load into the session cache the graph and update the objects in the sub-graph for a
// |- question : KeyStatement
// |- statement : KeyStatement
PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey2 = cdmEntitySession.load(pkey2);
+
Assert.assertSame(pkey2.getRoot().getStatement(), cacher.getFromCache(pkey2.getRoot().getStatement()));
Assert.assertSame(pkey1.getRoot().getStatement(), pkey2.getRoot().getStatement());
// |- question : KeyStatement
// |- statement : KeyStatement
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey1 = cdmEntitySession.load(pkey1);
+
CdmTransientEntityCacher cacher = getCacher(sessionOwner);
// this call will load into the session cache the graph and update the objects in the sub-graph for a
// polytomous key
// |- root : polytomous key node
PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH1_INIT_STRATEGY),PolytomousKey.class);
- pkey2 = cdmEntitySession.load(pkey2);
+
Assert.assertSame(pkey2.getRoot().getStatement(), cacher.getFromCache(pkey2.getRoot().getStatement()));
Assert.assertSame(pkey1.getRoot().getStatement(), pkey2.getRoot().getStatement());
// |- question : KeyStatement
// |- statement : KeyStatement
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey1 = cdmEntitySession.load(pkey1);
+
CdmTransientEntityCacher cacher = getCacher(sessionOwner);
// checking that the root is not null and
// polytomous key
// |- root : polytomous key node
PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
- pkey2 = cdmEntitySession.load(pkey2);
+
Assert.assertSame(pkey2.getRoot().getStatement(), cacher.getFromCache(pkey2.getRoot().getStatement()));
// |- root : polytomous key node
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
- pkey1 = cdmEntitySession.load(pkey1);
+
// lazy initialising root.statement
KeyStatement st = CdmBase.deproxy(pkey1.getRoot().getStatement(), KeyStatement.class);
// |- statement : KeyStatement
PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey2 = cdmEntitySession.load(pkey2);
+
Assert.assertSame(pkey2.getRoot().getStatement(), cacher.getFromCache(pkey2.getRoot().getStatement(), KeyStatement.class));
Assert.assertSame(st, pkey2.getRoot().getStatement());
// this call will load into the session cache a polytomous key node object
PolytomousKeyNode rootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid1),PolytomousKeyNode.class);
- rootPKNode = cdmEntitySession.load(rootPKNode);
+
Assert.assertNotNull(rootPKNode);
Assert.assertSame(rootPKNode, cacher.getFromCache(rootPKNode));
PolytomousKeyNode childOfRootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid2),PolytomousKeyNode.class);
- childOfRootPKNode = cdmEntitySession.load(childOfRootPKNode);
+
Assert.assertNotNull(childOfRootPKNode);
Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
// |- statement : KeyStatement
PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey = cdmEntitySession.load(pkey);
+
Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
Assert.assertSame(pkey.getRoot().getChildAt(1), childOfRootPKNode);
// |- statement : KeyStatement
PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey = cdmEntitySession.load(pkey);
+
// this call will load into the session cache a polytomous key node object
PolytomousKeyNode rootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid1),PolytomousKeyNode.class);
- rootPKNode = cdmEntitySession.load(rootPKNode);
+
Assert.assertNotNull(rootPKNode);
Assert.assertSame(rootPKNode, cacher.getFromCache(rootPKNode));
PolytomousKeyNode childOfRootPKNode = CdmBase.deproxy(polytomousKeyNodeService.find(polytomousKeyNodeUuid2),PolytomousKeyNode.class);
- childOfRootPKNode = cdmEntitySession.load(childOfRootPKNode);
+
Assert.assertNotNull(childOfRootPKNode);
Assert.assertSame(childOfRootPKNode, cacher.getFromCache(childOfRootPKNode));
// |- statement : KeyStatement
PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- pkey = cdmEntitySession.load(pkey);
+
PolytomousKeyNode childOfRootPKNode = pkey.getRoot().getChildAt(1);
// |- statement : KeyStatement
PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH3_INIT_STRATEGY),PolytomousKey.class);
- pkey = cdmEntitySession.load(pkey);
+
Map<Language, LanguageString> labelMap = pkey.getRoot().getStatement().getLabel();
Set<Language> languages = labelMap.keySet();
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* 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.
+*/
+package eu.etaxonomy.cdm.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionException;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.unitils.dbunit.annotation.DataSet;
+
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.name.BotanicalName;
+import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation;
+import eu.etaxonomy.taxeditor.httpinvoker.CDMServer;
+import eu.etaxonomy.taxeditor.operations.OperationTestBase;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.session.MockSessionOwner;
+
+/**
+ * @author cmathew
+ * @date 3 Feb 2015
+ *
+ */
+@DataSet
+public class TaxonNameEditorTest extends OperationTestBase {
+
+ private static final Logger logger = Logger.getLogger(TaxonNameEditorTest.class);
+
+
+
+
+ ITaxonNodeService taxonNodeService = getRemoteApplicationController().getTaxonNodeService();
+ ITaxonService taxonService = getRemoteApplicationController().getTaxonService();
+ IClassificationService classificationService = getRemoteApplicationController().getClassificationService();
+
+
+ private CdmTransientEntityCacher cacher;
+ private ICdmEntitySessionEnabled sessionOwner;
+
+ private ICdmEntitySession cdmEntitySession;
+
+ Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
+
+
+
+ @BeforeClass
+ public static void initializePolytomousKeyTest() {
+ logger.setLevel(Level.INFO);
+ CDMServer.getInstance().setKeepServerRunning(true);
+ initializeController("default",
+ "localhost",
+ 8080,
+ "",
+ NomenclaturalCode.ICNAFP,
+ "admin",
+ "00000");
+ }
+
+ @Before
+ public void initializeSession() {
+ sessionOwner = new MockSessionOwner();
+ cdmEntitySession = cdmEntitySessionManager.newSession(sessionOwner, true);
+ cacher = getCacher(sessionOwner);
+ }
+
+ @Test
+ public void testAddHomotypicSynonym() throws ExecutionException {
+ UUID taxonNodeUuid = UUID.fromString("ce54c396-3694-47f2-abb0-1d7b7e057985");
+
+ TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+ Taxon taxon = taxonNode.getTaxon();
+ HomotypicalGroup group = taxon.getHomotypicGroup();
+ BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+ newSynonymName.setTitleCache("New Synonym", true);
+ operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+ undoContext, taxon, group, newSynonymName, postOperation);
+
+ operation.execute(monitor, info);
+ taxonNodeService.merge(taxonNode);
+ Assert.assertEquals(taxon.getHomotypicGroup().getTypifiedNames().size(), 2);
+ Assert.assertEquals(taxon.getSynonyms().size(), 1);
+ Iterator<Synonym> synonymItr = taxon.getSynonyms().iterator();
+ Synonym synonym = synonymItr.next();
+ Assert.assertTrue(taxon.getHomotypicGroup().getTypifiedNames().contains(synonym.getName()));
+ }
+
+ @Test
+ public void addHeterotypicSynonym() throws ExecutionException {
+ UUID taxonNodeUuid = UUID.fromString("ce54c396-3694-47f2-abb0-1d7b7e057985");
+
+ TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+ Taxon taxon = taxonNode.getTaxon();
+ HomotypicalGroup group = taxon.getHomotypicGroup();
+ BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+ newSynonymName.setTitleCache("New Synonym", true);
+ operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+ undoContext, taxon, group, newSynonymName, postOperation);
+
+ operation.execute(monitor, info);
+ taxonNodeService.merge(taxonNode);
+
+
+ }
+
+ @Test
+ public void addDeleteAddHomotypicSynonym() throws ExecutionException {
+ UUID taxonNodeUuid = UUID.fromString("ce54c396-3694-47f2-abb0-1d7b7e057985");
+
+ TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+ Taxon taxon = taxonNode.getTaxon();
+ HomotypicalGroup group = taxon.getHomotypicGroup();
+ BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+ newSynonymName.setTitleCache("New Synonym", true);
+ operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+ undoContext, taxon, group, newSynonymName, postOperation);
+
+ operation.execute(monitor, info);
+ taxonNodeService.merge(taxonNode);
+ Assert.assertEquals(taxon.getHomotypicGroup().getTypifiedNames().size(), 2);
+
+ Set<Synonym> synonyms = taxon.getSynonyms();
+ for(Synonym synonym : synonyms) {
+ taxonService.deleteSynonym(synonym.getUuid(), taxon.getUuid(), null);
+ }
+
+ taxonNodeService.merge(taxonNode);
+
+ newSynonymName = BotanicalName.NewInstance(null);
+ newSynonymName.setTitleCache("Another New Synonym", true);
+ operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
+ undoContext, taxon, group, newSynonymName, postOperation);
+
+ operation.execute(monitor, info);
+ taxonNodeService.merge(taxonNode);
+ }
+
+ @Test
+ public void swapSynonymWithAcceptedTaxon() throws ExecutionException {
+ List<TaxonNode> rootEntities = new ArrayList<TaxonNode>();
+ UUID taxonNodeUuid = UUID.fromString("d425a971-1abe-4895-9e1f-1e5c8ff1c84c");
+ TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
+ rootEntities.add(taxonNode);
+ sessionOwner = new MockSessionOwner(rootEntities);
+ cdmEntitySession = cdmEntitySessionManager.newSession(sessionOwner, true);
+
+ UUID taxonUuid = UUID.fromString("9763e5f0-6cd4-4d96-b8a4-4420854f7727");
+ Taxon taxon = (Taxon)taxonService.load(taxonUuid);
+ TaxonNameBase taxonName = taxon.getName();
+
+ UUID synonymUuid = UUID.fromString("1eb173bd-b174-4162-8ff5-5136d8f1e746");
+ Synonym synonym = (Synonym)taxonService.load(synonymUuid);
+ TaxonNameBase synonymName = synonym.getName();
+
+ taxonService.swapSynonymAndAcceptedTaxon(synonym.getUuid(), taxon.getUuid());
+
+ Assert.assertEquals(taxonName, synonym.getName());
+ Assert.assertEquals(synonymName, taxon.getName());
+ }
+
+ @Test
+ public void addTaxon() {
+ NonViralName taxonName = NonViralName.NewInstance(null);
+ Taxon taxon = Taxon.NewInstance(taxonName, null);
+ taxonService.merge(taxon);
+ }
+}
+
*/
package eu.etaxonomy.cdm.model;
-import java.util.UUID;
-
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.unitils.dbunit.annotation.DataSet;
-import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.IClassificationService;
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.api.service.ITaxonService;
import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.name.BotanicalName;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
import eu.etaxonomy.taxeditor.httpinvoker.CDMServer;
+import eu.etaxonomy.taxeditor.operations.OperationTestBase;
import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
/**
* @author cmathew
- * @date 3 Feb 2015
+ * @date 9 Mar 2015
*
*/
-@DataSet
-public class TaxonNodeTest extends BaseRemotingTest {
+public class TaxonNavigatorTest extends OperationTestBase {
- private static final Logger logger = Logger.getLogger(TaxonNodeTest.class);
+ private static final Logger logger = Logger.getLogger(TaxonNameEditorTest.class);
- UUID taxonNodeUuid = UUID.fromString("324a1a77-689c-44be-8e65-347d835f4111");
- private static final UUID classificationUuid = UUID.fromString("6c2bc8d9-ee62-4222-be89-4a8e31770878");
- private static final UUID node1Uuid= UUID.fromString("484a1a77-689c-44be-8e65-347d835f47e8");
- private static final UUID node2Uuid = UUID.fromString("2d41f0c2-b785-4f73-a436-cc2d5e93cc5b");
- private static final UUID rootNodeUuid = UUID.fromString("324a1a77-689c-44be-8e65-347d835f4111");
ITaxonNodeService taxonNodeService = getRemoteApplicationController().getTaxonNodeService();
+ ITaxonService taxonService = getRemoteApplicationController().getTaxonService();
IClassificationService classificationService = getRemoteApplicationController().getClassificationService();
private CdmTransientEntityCacher cacher;
private ICdmEntitySessionEnabled sessionOwner;
-
private ICdmEntitySession cdmEntitySession;
Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
"00000");
}
+
@Before
public void initializeSession() {
sessionOwner = new MockSessionOwner();
}
@Test
- public void deleteTaxonNode() {
- Classification classification = classificationService.load(classificationUuid);
- TaxonNode node1 = taxonNodeService.load(node1Uuid);
- TaxonNode node2 = taxonNodeService.load(rootNodeUuid);
- node1 = (TaxonNode)HibernateProxyHelper.deproxy(node1);
+ public void addNewTaxonTest() {
- TaxonNode newNode = node1.addChildTaxon(Taxon.NewInstance(BotanicalName.NewInstance(Rank.SPECIES()), null), null, null);
- newNode = taxonNodeService.merge(newNode);
- newNode = taxonNodeService.load(newNode.getUuid());
- UUID taxUUID = newNode.getTaxon().getUuid();
- UUID nameUUID = newNode.getTaxon().getName().getUuid();
+ }
- DeleteResult result = taxonNodeService.deleteTaxonNode(node1, null);
+ @Test
+ public void addNewClassificationTest() {
- node1 = taxonNodeService.load(node1Uuid);
}
-}
+ @Test
+ public void changeAcceptedTaxonToSynonymTest() {
+
+ }
+
+ @Test
+ public void moveTaxonTest() {
+
+ }
+
+
+}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.operations;
+
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+import eu.etaxonomy.taxeditor.httpinvoker.BaseRemotingTest;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+
+/**
+ * @author n.hoffmann
+ * @created 15.04.2009
+ * @version 1.0
+ */
+public class OperationTestBase extends BaseRemotingTest {
+
+ public static final IUndoContext undoContext = null;
+
+ public static final IProgressMonitor monitor = new NullProgressMonitor();
+ public static final IAdaptable info = null;
+ public static final IPostOperationEnabled postOperation = null;
+ public static final ICdmEntitySessionEnabled cdmEntitySessionEnabled = null;
+
+ protected static AbstractPostOperation operation;
+
+}
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
cdmEntitySessionManager.bind(null);
- PolytomousKey pKeyLoaded = cdmEntitySessionManager.load(pKey);
- Assert.assertSame(pKeyLoaded, pKey);
+ Assert.assertSame(pKey, pKey);
Assert.assertNull(getActiveSession());
}
@Test
public void manageSessionWithObjectTest() {
PolytomousKey pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
- pKey = cdmEntitySession.load(pKey);
+
Assert.assertNotNull(getActiveSession());
List<CdmBase> rootEntities = (List<CdmBase>)getFieldValueViaReflection(getActiveSession(), "rootEntities");
sessionOwner = new MockSessionOwner();
pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
- pKey = cdmEntitySession.load(pKey);
+
Assert.assertEquals(pKey.getTitleCache(), upTitleCache);
Assert.assertEquals(pKey.getRoot().getChildAt(0).getStatement().getLabel(english).getText(), upStatement);
@Test
public void manageSessionWithListTest() {
List<PolytomousKey> pKeys = polytomousKeyService.list(PolytomousKey.class, null, null, null, null);
- pKeys = (List<PolytomousKey>) cdmEntitySession.load(pKeys);
Assert.assertNotNull(getActiveSession());
List<CdmBase> rootEntities = (List<CdmBase>)getFieldValueViaReflection(getActiveSession(), "rootEntities");
sessionOwner = new MockSessionOwner();
pKeys = polytomousKeyService.list(PolytomousKey.class, null, null, null, null);
- pKeys = (List<PolytomousKey>) cdmEntitySession.load(pKeys);
+
Assert.assertEquals(pKeys.get(0).getTitleCache(), upTitleCache);
Assert.assertEquals(pKeys.get(1).getRoot().getChildAt(0).getStatement().getLabel(english).getText(), upStatement);
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.session.mock.MockCdmEntitySession;
-public class MockSessionOwner implements ICdmEntitySessionEnabled {
+public class MockSessionOwner<T extends CdmBase> implements ICdmEntitySessionEnabled {
+ List<T> rootEntities;
+
+
+ public MockSessionOwner() {
+ rootEntities = null;
+ }
+
+ public MockSessionOwner(List<T> rootEntities) {
+ this.rootEntities = rootEntities;
+ }
/* (non-Javadoc)
* @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
*/
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
*/
@Override
- public <T extends CdmBase> List<T> getRootEntities() {
- return null;
+ public List<T> getRootEntities() {
+ return rootEntities;
}
}