Add rename notes for Any{Data,Xml}SchemaNode
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / AnyDataSchemaNode.java
index a82b2b4cf66d2711d3005861a759ddf2643887fe..0ba7cfaee3afe70414829ac8f053428123be8000 100644 (file)
@@ -5,31 +5,28 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.yangtools.yang.model.api;
 
 import com.google.common.annotations.Beta;
-import javax.annotation.Nullable;
+import java.util.Optional;
 
 /**
- * The "anydata" statement defines an interior node in the schema tree.
- * It takes one argument, which is an identifier, followed by a block of
- * substatements that holds detailed anydata information.
+ * The "anydata" statement defines an interior node in the schema tree. It takes one argument, which is an identifier,
+ * followed by a block of substatements that holds detailed anydata information.
  *
  * <p>
- * The "anydata" statement is used to represent an unknown set of nodes
- * that can be modeled with YANG, except anyxml, but for which the data
- * model is not known at module design time.  It is possible, though not
- * required, for the data model for anydata content to become known
- * through protocol signaling or other means that are outside the scope
+ * The "anydata" statement is used to represent an unknown set of nodes that can be modeled with YANG, except anyxml,
+ * but for which the data model is not known at module design time.  It is possible, though not required, for the data
+ * model for anydata content to become known through protocol signaling or other means that are outside the scope
  * of this document.
  */
+// FIXME: 4.0.0: rename this to 'AnydataSchemaNode'
 @Beta
-public interface AnyDataSchemaNode extends DataSchemaNode {
+public interface AnyDataSchemaNode extends DataSchemaNode, MandatoryAware, MustConstraintAware {
     /**
-     * Schema of XML data.
+     * Schema of data.
      *
-     * @return schema of contained XML data or null if it is not provided
+     * @return schema of contained data or empty if it is not provided
      */
-    @Nullable ContainerSchemaNode getSchemaOfAnyData();
+    Optional<ContainerSchemaNode> getDataSchema();
 }