Class SchemaOrderedNormalizedNodeWriter
- java.lang.Object
-
- org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter
-
- org.opendaylight.yangtools.yang.data.impl.schema.SchemaOrderedNormalizedNodeWriter
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class SchemaOrderedNormalizedNodeWriter extends org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriterThis is an iterator over aNormalizedNode. UnlikeNormalizedNodeWriter, this iterates over elements in the order as they are defined in YANG file.
-
-
Constructor Summary
Constructors Constructor Description SchemaOrderedNormalizedNodeWriter(org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer, org.opendaylight.yangtools.yang.model.api.SchemaContext schemaContext, org.opendaylight.yangtools.yang.model.api.SchemaPath path)Create a new writer backed by aNormalizedNodeStreamWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaOrderedNormalizedNodeWriterwrite(Collection<org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild<?,?>> nodes)Iterate over the provided collection and emit write events to the encapsulatedNormalizedNodeStreamWriter.SchemaOrderedNormalizedNodeWriterwrite(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> node)protected booleanwriteChildren(Iterable<? extends org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>> children)
-
-
-
Constructor Detail
-
SchemaOrderedNormalizedNodeWriter
public SchemaOrderedNormalizedNodeWriter(org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer, org.opendaylight.yangtools.yang.model.api.SchemaContext schemaContext, org.opendaylight.yangtools.yang.model.api.SchemaPath path)Create a new writer backed by aNormalizedNodeStreamWriter.- Parameters:
writer- Back-end writerschemaContext- Schema contextpath- path
-
-
Method Detail
-
write
public SchemaOrderedNormalizedNodeWriter write(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> node) throws IOException
- Overrides:
writein classorg.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter- Throws:
IOException
-
write
public SchemaOrderedNormalizedNodeWriter write(Collection<org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild<?,?>> nodes) throws IOException
Iterate over the provided collection and emit write events to the encapsulatedNormalizedNodeStreamWriter.- Parameters:
nodes- nodes- Returns:
- NormalizedNodeWriter this
- Throws:
IOException- when thrown from the backing writer.
-
writeChildren
protected boolean writeChildren(Iterable<? extends org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>> children) throws IOException
- Overrides:
writeChildrenin classorg.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter- Throws:
IOException
-
-