Refactor yang-model-api child traversal return types
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / UsesNode.java
index 8f783c1516f2a92c2cfcf06618bd3fea1bbee2bd..72408f54f56d74b25d2308ecd0da2b031d1ffb2b 100644 (file)
@@ -7,55 +7,35 @@
  */
 package org.opendaylight.yangtools.yang.model.api;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Set;
+import org.eclipse.jdt.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.
- *
+ * 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 WhenConditionAware, WithStatus, CopyableNode {
     /**
      * Returns the schema path to used grouping.
      *
      * @return schema path to 'grouping' on which this 'uses' statement points
      */
-    SchemaPath getGroupingPath();
+    // FIXME: 5.0.0: this is effective model, hence we should return GroupingDefinition
+    @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();
-
-    /**
-     * 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();
+    @NonNull Collection<? extends AugmentationSchemaNode> getAugmentations();
 
     /**
-     * Some of the properties of each node in the grouping can be refined with
-     * the "refine" statement.
+     * 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
+     * @return Map, where key is schema path of refined node and value is refined node
      */
-    Map<SchemaPath, SchemaNode> getRefines();
+    // FIXME: 5.0.0: this should probably be SchemaPath.RelativeSchemaPath (which needs to be exposed)
+    @NonNull Map<SchemaPath, SchemaNode> getRefines();
 }