Merge "Yang parser refactoring."
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / UsesNodeBuilder.java
index 0965f6421321b8fd957614b69cc8e7202a720bc7..c56ee6425893484a83f3a78b6e49f136968925f5 100644 (file)
@@ -13,70 +13,131 @@ import java.util.Set;
 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.api.UsesNode;
-import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
 import org.opendaylight.yangtools.yang.parser.util.RefineHolder;
 
 /**
  * Interface for builders of 'uses' statement.
  */
-public interface UsesNodeBuilder extends GroupingMember, Builder {
+public interface UsesNodeBuilder extends GroupingMember {
 
+    /**
+     * Get parent of this uses node. Since uses can be defined only under on of
+     * module, container, list, case, grouping, input, output, notification or
+     * augment, return type is DataNodeContainerBuilder.
+     */
     DataNodeContainerBuilder getParent();
 
-    String getGroupingName();
-
+    /**
+     * Get grouping path as string.
+     *
+     * @return grouping path as String
+     */
+    String getGroupingPathAsString();
+
+    /**
+     * Get grouping path.
+     *
+     * @return grouping path as SchemaPath
+     */
     SchemaPath getGroupingPath();
 
-    void setGroupingPath(SchemaPath groupingPath);
-
+    /**
+     * Get grouping definition.
+     *
+     * @return GroupingDefinition if present, null otherwise
+     */
     GroupingDefinition getGroupingDefinition();
 
+    /**
+     * Set grouping definition.
+     *
+     * @param groupingDefinition
+     *            GroupingDefinition object
+     */
     void setGroupingDefinition(GroupingDefinition groupingDefinition);
 
+    /**
+     * Get grouping builder.
+     *
+     * @return GroupingBuilder if present, null otherwise
+     */
     GroupingBuilder getGroupingBuilder();
 
+    /**
+     * Set grouping builder.
+     *
+     * @param grouping
+     *            GroupingBuilder object
+     */
     void setGrouping(GroupingBuilder grouping);
 
-    Set<AugmentationSchemaBuilder> getAugmentations();
-
-    void addAugment(AugmentationSchemaBuilder builder);
-
+    /**
+     * Get information if this uses node is defined in augment.
+     *
+     * @return true, if this node is defined under augment statement, false
+     *         otherwise
+     */
     boolean isAugmenting();
 
+    /**
+     * Set information if this uses node is defined in augment.
+     *
+     * @param augmenting
+     */
     void setAugmenting(boolean augmenting);
 
+    /**
+     * Get augmentations defined in this uses node.
+     *
+     * @return set of augmentations defined in this node
+     */
+    Set<AugmentationSchemaBuilder> getAugmentations();
+
+    /**
+     * Add augment builder.
+     *
+     * @param builder
+     *            new builder of augment statement
+     */
+    void addAugment(AugmentationSchemaBuilder builder);
+
+    /**
+     * Get refine statements.
+     *
+     * @return list of RefineHolder objects
+     */
     List<RefineHolder> getRefines();
 
+    /**
+     * Get refined nodes.
+     *
+     * @return List of refined SchemaNodeBuilder objects
+     */
     List<SchemaNodeBuilder> getRefineNodes();
 
+    /**
+     * Add refine statement.
+     *
+     * @param refine
+     *            new RefineHolder object
+     */
     void addRefine(RefineHolder refine);
 
+    /**
+     * Add refine node.
+     *
+     * @param refineNode
+     *            refined DataSchemaNodeBuilder object
+     */
     void addRefineNode(DataSchemaNodeBuilder refineNode);
 
+    /**
+     * Build new UsesNode object.
+     */
     UsesNode build();
 
-    Set<DataSchemaNodeBuilder> getTargetChildren();
-
-    void setTargetChildren(Set<DataSchemaNodeBuilder> targetChildren);
-
-    Set<GroupingBuilder> getTargetGroupings();
-
-    void setTargetGroupings(Set<GroupingBuilder> targetGroupings);
-
-    Set<TypeDefinitionBuilder> getTargetTypedefs();
-
-    void setTargetTypedefs(Set<TypeDefinitionBuilder> targetTypedefs);
-
-    List<UnknownSchemaNodeBuilder> getTargetUnknownNodes();
-
-    void setTargetUnknownNodes(List<UnknownSchemaNodeBuilder> targetUnknownNodes);
-
-    boolean isDataCollected();
-
-    void setDataCollected(boolean dataCollected);
-
-    boolean isParentUpdated();
+    boolean isResolved();
 
-    void setParentUpdated(boolean parentUpdated);
+    void setResolved(boolean resolved);
 
 }