import java.util.Collection;
import java.util.Deque;
import java.util.List;
-import java.util.Map.Entry;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter.MetadataExtension;
for (AbstractNodeDataWithSchema<?> child : children) {
child.write(writer, metaWriter);
}
- for (Entry<AugmentationSchemaNode, Collection<AbstractNodeDataWithSchema<?>>> augmentationToChild
- : augmentationsToChild.asMap().entrySet()) {
- final Collection<AbstractNodeDataWithSchema<?>> childsFromAgumentation = augmentationToChild.getValue();
- if (!childsFromAgumentation.isEmpty()) {
- // FIXME: can we get the augmentation schema?
- writer.startAugmentationNode(DataSchemaContextNode.augmentationIdentifierFrom(
- augmentationToChild.getKey()));
-
- for (AbstractNodeDataWithSchema<?> nodeDataWithSchema : childsFromAgumentation) {
- nodeDataWithSchema.write(writer, metaWriter);
- }
-
- writer.endNode();
+ for (var childsFromAgumentation : augmentationsToChild.asMap().values()) {
+ for (var nodeDataWithSchema : childsFromAgumentation) {
+ nodeDataWithSchema.write(writer, metaWriter);
}
}
}