Seal ForeignDataNode
[yangtools.git] / data / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / AnydataNode.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.data.api.schema;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
12
13 /**
14  * A NormalizedNode holding the contents of an {@code anydata} node in some object model. While no guarantees are placed
15  * on object models, there are related interfaces available for data interchange:
16  *
17  * <ul>
18  *   <li>{@link NormalizedAnydata}, which exposes the contents as a {@link NormalizedNode} with attached schema
19  *       information</li>
20  *   <li>{@link NormalizableAnydata}, which is trait optionally implemented by object models and allows the opaque,
21  *       implementation-specific representation to be interpreted in a the context of provided schema information,
22  *       potentially forming a NormalizedAnydata node.
23  * </ul>
24  *
25  * @param <V> Value type, uniquely identifying the object model used for values
26  */
27 @Beta
28 public non-sealed interface AnydataNode<V> extends ForeignDataNode<V> {
29     @Override
30     @SuppressWarnings("rawtypes")
31     default Class<AnydataNode> contract() {
32         return AnydataNode.class;
33     }
34
35     @Override
36     NodeIdentifier getIdentifier();
37 }