Class SchemaOrderedNormalizedNodeWriter

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public class SchemaOrderedNormalizedNodeWriter
    extends org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter
    This is an iterator over a NormalizedNode. Unlike NormalizedNodeWriter, 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.EffectiveModelContext schemaContext, org.opendaylight.yangtools.yang.model.api.SchemaPath path)
      Create a new writer backed by a NormalizedNodeStreamWriter.
    • Constructor Detail

      • SchemaOrderedNormalizedNodeWriter

        public SchemaOrderedNormalizedNodeWriter​(org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer,
                                                 org.opendaylight.yangtools.yang.model.api.EffectiveModelContext schemaContext,
                                                 org.opendaylight.yangtools.yang.model.api.SchemaPath path)
        Create a new writer backed by a NormalizedNodeStreamWriter.
        Parameters:
        writer - Back-end writer
        schemaContext - Schema context
        path - path
    • Method Detail

      • write

        public SchemaOrderedNormalizedNodeWriter write​(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,​?> node)
                                                throws IOException
        Overrides:
        write in class org.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 encapsulated NormalizedNodeStreamWriter.
        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:
        writeChildren in class org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter
        Throws:
        IOException