import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.OrderedLeafSetNode;
import org.opendaylight.yangtools.yang.data.api.schema.OrderedMapNode;
import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode;
private boolean wasProcessAsSimpleNode(final NormalizedNode<?, ?> node) throws IOException {
if (node instanceof LeafSetEntryNode) {
final LeafSetEntryNode<?> nodeAsLeafList = (LeafSetEntryNode<?>)node;
+ final QName name = nodeAsLeafList.getIdentifier().getNodeType();
if(writer instanceof NormalizedNodeStreamAttributeWriter) {
- ((NormalizedNodeStreamAttributeWriter) writer).leafSetEntryNode(nodeAsLeafList.getValue(), nodeAsLeafList.getAttributes());
+ ((NormalizedNodeStreamAttributeWriter) writer).leafSetEntryNode(name, nodeAsLeafList.getValue(),
+ nodeAsLeafList.getAttributes());
} else {
- writer.leafSetEntryNode(nodeAsLeafList.getValue());
+ writer.leafSetEntryNode(name, nodeAsLeafList.getValue());
}
return true;
} else if (node instanceof LeafNode) {
writer.startMapNode(n.getIdentifier(), childSizeHint(n.getValue()));
return writeChildren(n.getValue());
}
+ if (node instanceof OrderedLeafSetNode) {
+ final LeafSetNode<?> n = (LeafSetNode<?>) node;
+ writer.startOrderedLeafSet(n.getIdentifier(), childSizeHint(n.getValue()));
+ return writeChildren(n.getValue());
+ }
if (node instanceof LeafSetNode) {
- //covers also OrderedLeafSetNode for which doesn't exist start* method
final LeafSetNode<?> n = (LeafSetNode<?>) node;
writer.startLeafSet(n.getIdentifier(), childSizeHint(n.getValue()));
return writeChildren(n.getValue());