*/
package org.opendaylight.yangtools.yang.model.api;
+import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableList;
+import java.util.List;
import java.util.Map;
import java.util.Set;
* <code>uses</code> substatement.
*
*/
-public interface UsesNode {
+public interface UsesNode extends DocumentedNode {
/**
* Returns the schema path to used grouping.
* refined node
*/
Map<SchemaPath, SchemaNode> getRefines();
+
+ /**
+ * Returns when statement
+ *
+ * If when condition is present node defined by the parent data definition
+ * statement is only valid when the returned XPath expression conceptually
+ * evaluates to "true" for a particular instance, then the node defined by
+ * the parent data definition statement is valid; otherwise, it is not.
+ *
+ * @return Optional of XPath condition
+ */
+ default Optional<RevisionAwareXPath> getWhenCondition() {
+ return Optional.absent();
+ }
+
+ /**
+ *
+ * Returns unknown schema nodes which belongs to this instance of the type
+ * <code>UsesNode</code>.
+ *
+ * @return list of unknown schema nodes defined under this uses node.
+ */
+ default List<UnknownSchemaNode> getUnknownSchemaNodes() {
+ return ImmutableList.of();
+ }
}