BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / UsesNodeBuilder.java
index 1808197de574791ba060e002fa03ddd589e84f19..aedeef3ccbb47ecfc43498171d5d31655906f12d 100644 (file)
@@ -9,71 +9,159 @@ package org.opendaylight.yangtools.yang.parser.builder.api;
 
 import java.util.List;
 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.
+ * Builder for  'uses' statement.
+ *
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
  */
-public interface UsesNodeBuilder extends GroupingMember, Builder {
-
+@Deprecated
+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.
+     */
+    @Override
     DataNodeContainerBuilder getParent();
 
-    String getGroupingName();
-
+    /**
+     * Get target grouping path.
+     *
+     * @return target grouping path
+     */
+    SchemaPath getTargetGroupingPath();
+
+    /**
+     * Get grouping path.
+     *
+     * @return grouping path as SchemaPath
+     */
     SchemaPath getGroupingPath();
 
-    void setGroupingPath(SchemaPath groupingPath);
-
-    Set<AugmentationSchemaBuilder> getAugmentations();
-
-    void addAugment(AugmentationSchemaBuilder builder);
-
+    /**
+     * 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);
+
+    /**
+     * 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 information about augmentation
+     */
     void setAugmenting(boolean augmenting);
 
-    List<RefineHolder> getRefines();
+    /**
+     * Get augmentations defined in this uses node.
+     *
+     * @return set of augmentations defined in this node
+     */
+    Set<AugmentationSchemaBuilder> getAugmentations();
 
-    List<SchemaNodeBuilder> getRefineNodes();
+    /**
+     * Add augment builder.
+     *
+     * @param builder
+     *            new builder of augment statement
+     */
+    void addAugment(AugmentationSchemaBuilder builder);
 
-    void addRefine(RefineHolder refine);
+    /**
+     * Get refine statements.
+     *
+     * @return list of RefineHolder objects
+     */
+    List<RefineBuilder> getRefines();
+
+    /**
+     * Get refined nodes.
+     *
+     * @return List of refined SchemaNodeBuilder objects
+     */
+    List<SchemaNodeBuilder> getRefineNodes();
 
+    /**
+     * Add refine statement.
+     *
+     * @param refine
+     *            new RefineHolder object
+     */
+    void addRefine(RefineBuilder refine);
+
+    /**
+     * Add refine node.
+     *
+     * @param refineNode
+     *            refined DataSchemaNodeBuilder object
+     */
     void addRefineNode(DataSchemaNodeBuilder refineNode);
 
+    /**
+     * Build new UsesNode object.
+     *
+     *
+     * @return UsesNode Instance of {@link UsesNode} described by this builder.
+     */
+    @Override
     UsesNode build();
 
-    Set<DataSchemaNodeBuilder> getFinalChildren();
-
-    Set<DataSchemaNodeBuilder> getTargetChildren();
-
-    void setTargetChildren(Set<DataSchemaNodeBuilder> targetChildren);
-
-    Set<GroupingBuilder> getFinalGroupings();
-
-    Set<GroupingBuilder> getTargetGroupings();
-
-    void setTargetGroupings(Set<GroupingBuilder> targetGroupings);
-
-    Set<TypeDefinitionBuilder> getFinalTypedefs();
-
-    Set<TypeDefinitionBuilder> getTargetTypedefs();
-
-    void setTargetTypedefs(Set<TypeDefinitionBuilder> targetTypedefs);
-
-    List<UnknownSchemaNodeBuilder> getFinalUnknownNodes();
-
-    List<UnknownSchemaNodeBuilder> getTargetUnknownNodes();
-
-    void setTargetUnknownNodes(List<UnknownSchemaNodeBuilder> targetUnknownNodes);
-
-    List<UsesNodeBuilder> getTargetGroupingUses();
-
-    boolean isLoadDone();
-
-    void setLoadDone(boolean loadDone);
+    /**
+     *
+     * Returns true if uses node was resolved and {@link #getGroupingBuilder()}
+     * was instantiated for parent done of this node.
+     *
+     * @return true if uses node was resolved and associated nodes were instantiated in parent node.
+     */
+    boolean isResolved();
+
+    /**
+     *
+     * Sets state of instantiation of {@link #getGroupingBuilder()}
+     * into parent node of this node.
+     *
+     * @deprecated Do not use this, this should be internal to the implementation
+     *  and public API contract.
+     *
+     *  @param resolved resolved
+     */
+    @Deprecated
+    void setResolved(boolean resolved);
 
 }