BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / DataSchemaNodeBuilder.java
index 8d343bb4e07f41093fabc1f70f8fcf0ffd6e4e05..cf0ed93f53a7150eb8ea4d46f44cce99900ade8c 100644 (file)
@@ -7,34 +7,45 @@
  */
 package org.opendaylight.yangtools.yang.parser.builder.api;
 
-import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
-import org.opendaylight.yangtools.yang.model.api.YangNode;
-import org.opendaylight.yangtools.yang.parser.builder.impl.ConstraintsBuilder;
 
 /**
  * Interface for all yang data-schema nodes [anyxml, case, container, grouping,
  * list, module, notification].
+ *
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
  */
+@Deprecated
 public interface DataSchemaNodeBuilder extends SchemaNodeBuilder, GroupingMember {
 
-    void setQName(QName qname);
+    /**
+     * Get original builder definition from grouping, where it is defined.
+     *
+     * @return original builder definition from grouping if this node is added
+     *         by uses, null otherwise
+     */
+    SchemaNodeBuilder getOriginal();
 
     /**
-     * Build DataSchemaNode object from this builder.
+     * Set original builder definition from grouping
+     *
+     * @param original
+     *            original builder definition from grouping
      */
-    DataSchemaNode build(YangNode parent);
+    void setOriginal(SchemaNodeBuilder original);
 
     /**
+     *
+     * Returns true if product of this builder is added by augmentation.
      *
      * @return true, if this node is added by augmentation, false otherwise
      */
     boolean isAugmenting();
 
     /**
-     * Set if this node is added by augmentation.
+     * Set if the product of the builder node is introduced by augmentation.
      *
-     * @param augmenting
+     * @param augmenting information about augmentation
      */
     void setAugmenting(boolean augmenting);
 
@@ -43,14 +54,15 @@ public interface DataSchemaNodeBuilder extends SchemaNodeBuilder, GroupingMember
      *
      * @return value of config statement
      */
-    Boolean isConfiguration();
+    boolean isConfiguration();
 
     /**
-     * Set config statement.
+     * Set config statement to the product.
      *
-     * @param config
+     *
+     * @param config true if config true was set, false if config false was set.
      */
-    void setConfiguration(Boolean config);
+    void setConfiguration(boolean config);
 
     /**
      * Get constraints of this builder.
@@ -59,4 +71,12 @@ public interface DataSchemaNodeBuilder extends SchemaNodeBuilder, GroupingMember
      */
     ConstraintsBuilder getConstraints();
 
+    /**
+     * Build DataSchemaNode object from this builder.
+     *
+     * @return instance of {@link DataSchemaNode} based on the state present in this builder.
+     */
+    @Override
+    DataSchemaNode build();
+
 }