*/
package org.opendaylight.controller.yang.parser.builder.api;
+import org.opendaylight.controller.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
+
/**
* Parent interface for all builder interfaces.
*/
public interface Builder {
- Object build();
- int getLine();
+ /**
+ * Get current line in yang file.
+ *
+ * @return current line in yang file
+ */
+ int getLine();
+
+ /**
+ * Get parent node of this node.
+ *
+ * @return parent node builder or null if this is top level node
+ */
+ Builder getParent();
+
+ /**
+ * Set parent of this node.
+ *
+ * @param parent
+ * parent node builder
+ */
+ void setParent(Builder parent);
+
+ /**
+ * Build YANG data model node.
+ *
+ * This method should create an instance of YANG data model node. After
+ * creating an instance, this instance should be returned for each call
+ * without repeating build process.
+ *
+ * @return YANG data model node
+ */
+ Object build();
+
+ void addUnknownSchemaNode(UnknownSchemaNodeBuilder unknownNode);
}