Bug 967: Do not translate leaf Instance Identifiers.
[controller.git] / opendaylight / md-sal / sal-common-impl / src / main / java / org / opendaylight / controller / md / sal / common / impl / util / compat / DataNormalizationOperation.java
index 663493a..f869254 100644 (file)
@@ -83,6 +83,8 @@ public abstract class DataNormalizationOperation<T extends PathArgument> impleme
 
     public abstract NormalizedNode<?, ?> normalize(Node<?> legacyData);
 
+    public abstract boolean isLeaf();
+
     private static abstract class SimpleTypeNormalization<T extends PathArgument> extends DataNormalizationOperation<T> {
 
         protected SimpleTypeNormalization(final T identifier) {
@@ -113,6 +115,11 @@ public abstract class DataNormalizationOperation<T extends PathArgument> impleme
             return null;
         }
 
+        @Override
+        public boolean isLeaf() {
+            return true;
+        }
+
     }
 
     private static final class LeafNormalization extends SimpleTypeNormalization<NodeIdentifier> {
@@ -199,6 +206,11 @@ public abstract class DataNormalizationOperation<T extends PathArgument> impleme
             return builder.build();
         }
 
+        @Override
+        public boolean isLeaf() {
+            return false;
+        }
+
         @SuppressWarnings("rawtypes")
         protected abstract NormalizedNodeContainerBuilder createBuilder(final CompositeNode compositeNode);