2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.api.schema.stream;
10 import com.google.common.annotations.Beta;
11 import java.io.IOException;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
15 * A {@link NormalizedNodeStreamWriterExtension} supporting streaming of {@code anydata} nodes.
17 * @author Robert Varga
20 // FIXME: 4.0.0: integrate this into NormalizedNodeStreamWriter
21 public interface AnydataExtension extends NormalizedNodeStreamWriterExtension {
23 * Start emitting a new anydata node identified by name.
25 * @param name The name of the anydata element
26 * @param objectModel The object model of anydata content
27 * @return True if the specified object model is supported by this extension and the process of emitting the node
28 * has started. False if the object model is not supported and the node has not started to be emitted.
29 * @throws IOException if an underlying IO error occurs
31 boolean startAnydataNode(NodeIdentifier name, Class<?> objectModel) throws IOException;