Expose EffectiveStatementInference from NormalizedAnyData
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / NormalizedAnydata.java
index f1fdcf42f3845235de9e9e647b0bc53e92310fa8..d915984cf8c06b22304363baa75aef38e3af161a 100644 (file)
@@ -13,8 +13,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter;
-import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
-import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
+import org.opendaylight.yangtools.yang.model.api.EffectiveStatementInference;
 
 /**
  * The contents of an {@code anydata} node in a normalized format. This representation acts as a schema-bound bridge
@@ -27,10 +26,20 @@ import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
  */
 @Beta
 @NonNullByDefault
-public interface NormalizedAnydata extends Immutable, EffectiveModelContextProvider {
-
-    DataSchemaNode getContextNode();
+public interface NormalizedAnydata extends Immutable {
+    /**
+     * Return the {@link EffectiveStatementInference} which describes the structure returned by {@link #getData()}.
+     *
+     * @return An {@link EffectiveStatementInference}
+     */
+    EffectiveStatementInference getInference();
 
+    /**
+     * Return the {@link NormalizedNode} representation of this node's data. Information about the corresponding schema
+     * is available via {@link #getInference()}.
+     *
+     * @return A {@link NormalizedNode}
+     */
     NormalizedNode getData();
 
     default void writeTo(final NormalizedNodeStreamWriter writer) throws IOException {