import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.YangModeledAnyXmlSchemaNode;
/**
* A node which is composed of multiple simpler nodes.
if (schema instanceof LeafSchemaNode) {
newChild = new LeafNodeDataWithSchema(schema);
} else if (schema instanceof AnyXmlSchemaNode) {
+ // YangModeledAnyXmlSchemaNode is handled by addCompositeChild method.
+ if (schema instanceof YangModeledAnyXmlSchemaNode) {
+ return null;
+ }
newChild = new AnyXmlNodeDataWithSchema(schema);
} else {
return null;
}
AbstractNodeDataWithSchema addCompositeChild(final DataSchemaNode schema) {
- CompositeNodeDataWithSchema newChild;
+ final CompositeNodeDataWithSchema newChild;
+
if (schema instanceof ListSchemaNode) {
newChild = new ListNodeDataWithSchema(schema);
} else if (schema instanceof LeafListSchemaNode) {
newChild = new LeafListNodeDataWithSchema(schema);
} else if (schema instanceof ContainerSchemaNode) {
newChild = new ContainerNodeDataWithSchema(schema);
+ } else if (schema instanceof YangModeledAnyXmlSchemaNode) {
+ newChild = new YangModeledAnyXmlNodeDataWithSchema((YangModeledAnyXmlSchemaNode)schema);
} else {
newChild = new CompositeNodeDataWithSchema(schema);
}
+
addCompositeChild(newChild);
return newChild;
}