Fix ConstraintDefinition inconsistency
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DocumentedNode.java
index 36acbe9b5168c770bbff5558bf1d736b065bafea..876645f9654b872044f17467430e41fb483bb5c1 100644 (file)
@@ -7,6 +7,11 @@
  */
 package org.opendaylight.yangtools.yang.model.api;
 
+import com.google.common.collect.ImmutableList;
+import java.util.List;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
 /**
  *
  * Node which can have documentation assigned.
@@ -20,7 +25,7 @@ public interface DocumentedNode {
      * @return string with textual description the node which represents the
      *         argument of the YANG <code>description</code> substatement
      */
-    String getDescription();
+    @Nullable String getDescription();
 
     /**
      * Returns reference of the instance of the type <code>SchemaNode</code>
@@ -32,7 +37,7 @@ public interface DocumentedNode {
      *         represents the argument of the YANG <code>reference</code>
      *         substatement
      */
-    String getReference();
+    @Nullable String getReference();
 
     /**
      * Returns status of the instance of the type <code>SchemaNode</code>
@@ -40,5 +45,14 @@ public interface DocumentedNode {
      * @return status of this node which represents the argument of the YANG
      *         <code>status</code> substatement
      */
-    Status getStatus();
+    @Nonnull Status getStatus();
+
+    /**
+     * Returns unknown schema nodes which belongs to this instance.
+     *
+     * @return list of unknown schema nodes defined under this node.
+     */
+    default @Nonnull List<UnknownSchemaNode> getUnknownSchemaNodes() {
+        return ImmutableList.of();
+    }
 }