2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.yang.parser.builder.api;
10 import java.util.List;
12 import org.opendaylight.controller.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
15 * Parent interface for all builder interfaces.
17 public interface Builder {
20 * Get name of module in which this node is declared.
24 String getModuleName();
27 * Set name of module in which this node is declared.
31 void setModuleName(String moduleName);
34 * Get current line in yang file.
36 * @return current line in yang file
41 * Get parent node of this node.
43 * @return parent node builder or null if this is top level node
48 * Set parent of this node.
53 void setParent(Builder parent);
56 * Add unknown node to this builder.
60 void addUnknownNodeBuilder(UnknownSchemaNodeBuilder unknownNode);
63 * Get builders of unknown nodes defined in this node.
65 * @return collection of UnknownSchemaNodeBuilder objects
67 List<UnknownSchemaNodeBuilder> getUnknownNodeBuilders();
70 * Build YANG data model node.
72 * This method should create an instance of YANG data model node. After
73 * creating an instance, this instance should be returned for each call
74 * without repeating build process.
76 * @return YANG data model node