fixes #2189
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / model / FeatureNodeContainerTree.java
index d7fb13fc4d9d400f109d7797c4c0abbad87c52f6..8af49fff076237e893fe768204d2ad949d7912d9 100644 (file)
@@ -121,7 +121,7 @@ public class FeatureNodeContainerTree {
        }
        
        
-       public FeatureNodeContainer getFeatureNodeContainerByFeature(Feature feature) {         
+       public FeatureNodeContainer getFeatureNodeContainer(Feature feature) {          
                List<FeatureNodeContainer> leafs = root.getLeafs();
                
                for(FeatureNodeContainer container : leafs){
@@ -132,6 +132,17 @@ public class FeatureNodeContainerTree {
                return null;
        }
        
+       public FeatureNodeContainer getFeatureNodeContainer(FeatureNode featureNode){
+               List<FeatureNodeContainer> leafs = root.getLeafs();
+               
+               for(FeatureNodeContainer container : leafs){
+                       if(container.getFeatureNode().equals(featureNode)){
+                               return container;
+                       }
+               }
+               return null;
+       }
+       
        public void addContainer(FeatureNodeContainer container){
                featureNodeContainers.add(container);
        }