Add support for identity-ref config attributes to config/netconf subsystem
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / mapping / attributes / fromxml / SimpleAttributeReadingStrategy.java
index 625e4ab3dfe9f8c4a7aeb28879eb8daad31e1bfa..3765a135080adbd7e5a4af7742bd069bf6b5b2c7 100644 (file)
@@ -31,7 +31,7 @@ public class SimpleAttributeReadingStrategy extends AbstractAttributeReadingStra
 
         String textContent = "";
         try{
-            textContent = xmlElement.getTextContent();
+            textContent = readElementContent(xmlElement);
         }catch(IllegalStateException | NullPointerException e) {
             // yuma sends <attribute /> for empty value instead of <attribute></attribute>
             logger.warn("Ignoring exception caused by failure to read text element", e);
@@ -42,6 +42,10 @@ public class SimpleAttributeReadingStrategy extends AbstractAttributeReadingStra
                 postprocessParsedValue(textContent));
     }
 
+    protected String readElementContent(XmlElement xmlElement) {
+        return xmlElement.getTextContent();
+    }
+
     @Override
     protected Object postprocessNullableDefault(String nullableDefault) {
         return nullableDefault;