make update title cache writable
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / DistributionTree.java
index aa6173cfea3973f72f62e07dc0c75547ba8c95fa..220d9e4519c0c394da949c96082b034f1b21e8c9 100644 (file)
@@ -1,19 +1,23 @@
+/**\r
+* Copyright (C) 2007 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+\r
 package eu.etaxonomy.cdm.api.service;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collections;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
 import java.util.Iterator;\r
 import java.util.List;\r
 import java.util.Set;\r
 \r
 import eu.etaxonomy.cdm.common.Tree;\r
 import eu.etaxonomy.cdm.common.TreeNode;\r
-import eu.etaxonomy.cdm.model.common.DescriptionElementSource;\r
 import eu.etaxonomy.cdm.model.common.Language;\r
-import eu.etaxonomy.cdm.model.common.OriginalSourceBase;\r
-import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
 import eu.etaxonomy.cdm.model.description.Distribution;\r
 import eu.etaxonomy.cdm.model.location.NamedArea;\r
 import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
@@ -24,7 +28,7 @@ public class DistributionTree extends Tree<Distribution>{
                NamedArea area = new NamedArea();\r
                Distribution data = Distribution.NewInstance();\r
                data.setArea(area);\r
-               data.addModifyingText("test", Language.ENGLISH());\r
+               data.putModifyingText(Language.ENGLISH(), "test");\r
                TreeNode<Distribution> rootElement = new TreeNode<Distribution>();\r
                List<TreeNode<Distribution>> children = new ArrayList<TreeNode<Distribution>>();\r
                \r
@@ -148,7 +152,7 @@ public class DistributionTree extends Tree<Distribution>{
                        highestDistNode = new TreeNode<Distribution>(data);\r
                }\r
                if(highestDistNode.data.getModifyingText().isEmpty()){\r
-                       highestDistNode.data.addModifyingText("test", Language.ENGLISH());\r
+                       highestDistNode.data.putModifyingText(Language.ENGLISH(), "test");\r
                }\r
 \r
                if (root.getChildren().isEmpty() || !containsChild(root, highestDistNode)) {\r