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.yangtools.yang.parser.builder.api;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
14 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
15 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
16 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
19 * Interface for all yang data-node containers [augment, case, container,
20 * grouping, list, module, notification].
22 public interface DataNodeContainerBuilder extends Builder {
25 * Get qname of this node.
27 * @return QName of this node
32 * Get schema path of this node.
34 * @return SchemaPath of this node
39 * Get builders of child nodes.
41 * @return collection child nodes builders
43 Set<DataSchemaNodeBuilder> getChildNodeBuilders();
46 * Get child node by name.
49 * name of child to seek
50 * @return child node with given name if present, null otherwise
52 DataSchemaNodeBuilder getDataChildByName(String name);
55 * Add builder of child node to this node.
59 void addChildNode(DataSchemaNodeBuilder childNode);
61 void addChildNode(DataSchemaNode childNode);
63 void addChildNodeToContext(DataSchemaNodeBuilder childNode);
66 * Get already built groupings defined in this node.
68 * @return collection of GroupingDefinition objects
70 Set<GroupingDefinition> getGroupings();
73 * Get builders of groupings defined in this node.
75 * @return collection of grouping builders
77 Set<GroupingBuilder> getGroupingBuilders();
80 * Add builder of grouping statement to this node.
82 * @param groupingBuilder
84 void addGrouping(GroupingBuilder groupingBuilder);
87 * Get builders of uses defined in this node.
89 * @return collection of uses builders
91 Set<UsesNodeBuilder> getUsesNodeBuilders();
94 * Add builder of uses statement to this node.
98 void addUsesNode(UsesNodeBuilder usesBuilder);
100 Set<TypeDefinition<?>> getTypeDefinitions();
103 * Get builders of typedef statement defined in this node.
105 * @return typedefBuilder
107 Set<TypeDefinitionBuilder> getTypeDefinitionBuilders();
110 * Add typedef builder to this node.
112 * @param typedefBuilder
114 void addTypedef(TypeDefinitionBuilder typedefBuilder);