ref #6343, ref 6794 adapt taxeditor to removal of non-typified TermVocabulary.NewInst...
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 6 Jan 2023 19:01:48 +0000 (20:01 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 6 Jan 2023 19:02:12 +0000 (20:02 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/UseObjectStore.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java

index b595fea237fd0905f74e7acc1471e3f1c2ca8c21..055c1afee8bd8cdd8c0a0988de401240bde80c8a 100644 (file)
@@ -21,6 +21,7 @@ import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.description.Feature;\r
 import eu.etaxonomy.cdm.model.description.State;\r
 import eu.etaxonomy.cdm.model.term.DefinedTerm;\r
+import eu.etaxonomy.cdm.model.term.OrderedTermVocabulary;\r
 import eu.etaxonomy.cdm.model.term.TermType;\r
 import eu.etaxonomy.cdm.model.term.TermVocabulary;\r
 \r
@@ -156,7 +157,7 @@ public class UseObjectStore {
                                e.printStackTrace();\r
                        }\r
 \r
-                       humanGroupVocabulary = TermVocabulary.NewInstance(TermType.Modifier, UsageTermCollection.humanGroupLabel, UsageTermCollection.humanGroupLabel, null, termSourceUri);\r
+                       humanGroupVocabulary = TermVocabulary.NewInstance(TermType.Modifier, DefinedTerm.class, UsageTermCollection.humanGroupLabel, UsageTermCollection.humanGroupLabel, null, termSourceUri);\r
                        humanGroupVocabulary.setUuid(UsageTermCollection.uuidHumanGroupVocabulary);\r
 \r
                        DefinedTerm newDummyModifier = DefinedTerm.NewInstance(TermType.Modifier, UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
@@ -182,7 +183,7 @@ public class UseObjectStore {
                        } catch (URISyntaxException e) {\r
                                e.printStackTrace();\r
                        }\r
-                       plantPartVocabulary = TermVocabulary.NewInstance(TermType.Modifier, UsageTermCollection.plantPartLabel, UsageTermCollection.plantPartLabel, null, termSourceUri);\r
+                       plantPartVocabulary = TermVocabulary.NewInstance(TermType.Modifier, DefinedTerm.class, UsageTermCollection.plantPartLabel, UsageTermCollection.plantPartLabel, null, termSourceUri);\r
                        plantPartVocabulary.setUuid(UsageTermCollection.uuidPlantPartVocabulary);\r
 \r
                        DefinedTerm newDummyModifier = DefinedTerm.NewInstance(TermType.Modifier, UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
@@ -204,7 +205,7 @@ public class UseObjectStore {
                        } catch (URISyntaxException e) {\r
                                e.printStackTrace();\r
                        }\r
-                       countryVocabulary = TermVocabulary.NewInstance(TermType.Modifier, UsageTermCollection.countryLabel, UsageTermCollection.countryLabel, null, termSourceUri);\r
+                       countryVocabulary = TermVocabulary.NewInstance(TermType.Modifier, DefinedTerm.class, UsageTermCollection.countryLabel, UsageTermCollection.countryLabel, null, termSourceUri);\r
                        countryVocabulary.setUuid(UsageTermCollection.uuidCountryVocabulary);\r
 \r
                        DefinedTerm newDummyModifier = DefinedTerm.NewInstance(TermType.Modifier, UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
@@ -227,7 +228,7 @@ public class UseObjectStore {
                                e.printStackTrace();\r
                        }\r
 \r
-                       stateVocabulary = TermVocabulary.NewInstance(TermType.State, UsageTermCollection.useCategoryVocabularyLabel, UsageTermCollection.useCategoryVocabularyLabel, null, termSourceUri);\r
+                       stateVocabulary = OrderedTermVocabulary.NewOrderedInstance(TermType.State, State.class, UsageTermCollection.useCategoryVocabularyLabel, UsageTermCollection.useCategoryVocabularyLabel, null, termSourceUri);\r
                        stateVocabulary.setUuid(UsageTermCollection.uuidUseCategoryVocabulary);\r
 \r
                        State newDummyState = State.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
index 6a664cf3e3c01102e9e4130479b87a9b76b7ce1f..3ca9c5c67860389ffd30ca686cac4837177422ab 100644 (file)
@@ -395,6 +395,7 @@ public class CdmEntitySessionAwareTest extends RemotingSessionAwareTest {
     public void testSaveNewTermVocabulary() {
         TermVocabulary<Feature> termVocabulary =
                 TermVocabulary.NewInstance(TermType.Feature,
+                        Feature.class,
                         null,
                         "Untitled",
                         null,