Introduce WhenConditionAware
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / UsesNode.java
index b1ec2578f6688658edcf8f7959129812c5ddbe1d..b96d2b2bc0449e73e44eaa60cb36fece65980514 100644 (file)
@@ -1,51 +1,60 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.yang.model.api;\r
-\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-public interface UsesNode {\r
-\r
-    /**\r
-     * @return path to 'grouping' on which this 'uses' statement points\r
-     */\r
-    SchemaPath getGroupingPath();\r
-\r
-    /**\r
-     * @return Set of augment statements defined under this uses node\r
-     */\r
-    Set<AugmentationSchema> getAugmentations();\r
-\r
-    /**\r
-     * Returns <code>true</code> if the data node was added by augmentation,\r
-     * otherwise returns <code>false</code>\r
-     *\r
-     * @return <code>true</code> if the data node was added by augmentation,\r
-     *         otherwise returns <code>false</code>\r
-     */\r
-    boolean isAugmenting();\r
-\r
-    /**\r
-     * Returns <code>true</code> if the data node was added by uses statement,\r
-     * otherwise returns <code>false</code>\r
-     *\r
-     * @return <code>true</code> if the data node was added by uses statement,\r
-     *         otherwise returns <code>false</code>\r
-     */\r
-    boolean isAddedByUses();\r
-\r
-    /**\r
-     * Some of the properties of each node in the grouping can be refined with\r
-     * the "refine" statement.\r
-     *\r
-     * @return Map, where key is schema path of refined node and value is\r
-     *         refined node\r
-     */\r
-    Map<SchemaPath, SchemaNode> getRefines();\r
-}\r
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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 java.util.Map;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus;
+
+/**
+ * Contains the methods for getting data and checking properties of the YANG <code>uses</code> substatement.
+ */
+public interface UsesNode extends WhenConditionAware, WithStatus {
+
+    /**
+     * Returns the schema path to used grouping.
+     *
+     * @return schema path to 'grouping' on which this 'uses' statement points
+     */
+    @Nonnull SchemaPath getGroupingPath();
+
+    /**
+     * Returns augmentations which were specified in this uses node.
+     *
+     * @return Set of augment statements defined under this uses node
+     */
+    @Nonnull Set<AugmentationSchemaNode> getAugmentations();
+
+    /**
+     * Returns <code>true</code> if the data node was added by augmentation,
+     * otherwise returns <code>false</code>.
+     *
+     * @return <code>true</code> if the data node was added by augmentation,
+     *         otherwise returns <code>false</code>
+     */
+    boolean isAugmenting();
+
+    /**
+     * Returns <code>true</code> if the data node was added by uses statement,
+     * otherwise returns <code>false</code>.
+     *
+     * @return <code>true</code> if the data node was added by uses statement,
+     *         otherwise returns <code>false</code>
+     */
+    boolean isAddedByUses();
+
+    /**
+     * Some of the properties of each node in the grouping can be refined with
+     * the "refine" statement.
+     *
+     * @return Map, where key is schema path of refined node and value is
+     *         refined node
+     */
+    @Nonnull Map<SchemaPath, SchemaNode> getRefines();
+}