*/
package org.opendaylight.yangtools.yang.model.api;
+import com.google.common.base.Optional;
import java.util.Map;
import java.util.Set;
+import javax.annotation.Nonnull;
/**
* Contains the methods for getting data and checking properties of the YANG
* <code>uses</code> substatement.
- *
*/
-public interface UsesNode extends YangNode {
+public interface UsesNode extends DocumentedNode.WithStatus {
/**
* Returns the schema path to used grouping.
*
* @return schema path to 'grouping' on which this 'uses' statement points
*/
- SchemaPath getGroupingPath();
+ @Nonnull SchemaPath getGroupingPath();
/**
*
- * Returns agumentations which were specified in this uses node.
+ * Returns augmentations which were specified in this uses node.
*
* @return Set of augment statements defined under this uses node
*/
- Set<AugmentationSchema> getAugmentations();
+ @Nonnull Set<AugmentationSchema> getAugmentations();
/**
* Returns <code>true</code> if the data node was added by augmentation,
* @return Map, where key is schema path of refined node and value is
* refined node
*/
- Map<SchemaPath, SchemaNode> getRefines();
+ @Nonnull 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 @Nonnull Optional<RevisionAwareXPath> getWhenCondition() {
+ return Optional.absent();
+ }
}