Added getParent() method to DataSchemaNode and DataNodeContainer. Fixed Bugs.
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / DataNodeContainerBuilder.java
index 9bd45768e3bfea8fb80de0d253cf843a7346771b..a2ffec1dcf9cd06c6815c3bf8d8b251b30f621af 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.yangtools.yang.parser.builder.api;
 
+import java.util.Collection;
 import java.util.Set;
 
 import org.opendaylight.yangtools.yang.common.QName;
@@ -22,35 +23,35 @@ public interface DataNodeContainerBuilder extends Builder {
 
     /**
      * Get qname of this node.
-     * 
+     *
      * @return QName of this node
      */
     QName getQName();
 
     /**
      * Get schema path of this node.
-     * 
+     *
      * @return SchemaPath of this node
      */
     SchemaPath getPath();
 
     /**
      * Get already built child nodes.
-     * 
+     *
      * @return collection of child nodes
      */
-    Set<DataSchemaNode> getChildNodes();
+    Collection<DataSchemaNode> getChildNodes();
 
     /**
      * Get builders of child nodes.
-     * 
+     *
      * @return collection child nodes builders
      */
     Set<DataSchemaNodeBuilder> getChildNodeBuilders();
 
     /**
      * Get child node by name.
-     * 
+     *
      * @param name
      *            name of child to seek
      * @return child node with given name if present, null otherwise
@@ -59,56 +60,58 @@ public interface DataNodeContainerBuilder extends Builder {
 
     /**
      * Add builder of child node to this node.
-     * 
+     *
      * @param childNode
      */
     void addChildNode(DataSchemaNodeBuilder childNode);
 
+    void addChildNode(DataSchemaNode childNode);
+
     /**
      * Get already built groupings defined in this node.
-     * 
+     *
      * @return collection of GroupingDefinition objects
      */
     Set<GroupingDefinition> getGroupings();
 
     /**
      * Get builders of groupings defined in this node.
-     * 
+     *
      * @return collection of grouping builders
      */
     Set<GroupingBuilder> getGroupingBuilders();
 
     /**
      * Add builder of grouping statement to this node.
-     * 
+     *
      * @param groupingBuilder
      */
     void addGrouping(GroupingBuilder groupingBuilder);
 
     /**
      * Get builders of uses defined in this node.
-     * 
+     *
      * @return collection of uses builders
      */
     Set<UsesNodeBuilder> getUsesNodes();
 
     /**
      * Add builder of uses statement to this node.
-     * 
+     *
      * @param usesBuilder
      */
     void addUsesNode(UsesNodeBuilder usesBuilder);
 
     /**
      * Get builders of typedef statement defined in this node.
-     * 
+     *
      * @return typedefBuilder
      */
     Set<TypeDefinitionBuilder> getTypeDefinitionBuilders();
 
     /**
      * Add typedef builder to this node.
-     * 
+     *
      * @param typedefBuilder
      */
     void addTypedef(TypeDefinitionBuilder typedefBuilder);