Moved parsing of unknown nodes from implementation to abstract classes.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / main / java / org / opendaylight / controller / yang / parser / builder / api / DataNodeContainerBuilder.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.yang.parser.builder.api;
9
10 import java.util.Set;
11
12 import org.opendaylight.controller.yang.common.QName;
13 import org.opendaylight.controller.yang.model.api.DataSchemaNode;
14 import org.opendaylight.controller.yang.model.api.GroupingDefinition;
15 import org.opendaylight.controller.yang.model.api.SchemaPath;
16
17 /**
18  * Interface for all yang data-node containers [augment, case, container,
19  * grouping, list, module, notification].
20  */
21 public interface DataNodeContainerBuilder extends Builder {
22
23     /**
24      * Get qname of this node.
25      *
26      * @return QName of this node
27      */
28     QName getQName();
29
30     /**
31      * Get schema path of this node.
32      *
33      * @return SchemaPath of this node
34      */
35     SchemaPath getPath();
36
37     /**
38      * Get already built child nodes.
39      *
40      * @return collection of child nodes
41      */
42     Set<DataSchemaNode> getChildNodes();
43
44     /**
45      * Get builders of child nodes.
46      *
47      * @return collection child nodes builders
48      */
49     Set<DataSchemaNodeBuilder> getChildNodeBuilders();
50
51     /**
52      * Get child node by name.
53      *
54      * @param name
55      *            name of child to seek
56      * @return child node with given name if present, null otherwise
57      */
58     DataSchemaNodeBuilder getDataChildByName(String name);
59
60     /**
61      * Add builder of child node to this node.
62      *
63      * @param childNode
64      */
65     void addChildNode(DataSchemaNodeBuilder childNode);
66
67     /**
68      * Get already built groupings defined in this node.
69      *
70      * @return collection of GroupingDefinition objects
71      */
72     Set<GroupingDefinition> getGroupings();
73
74     /**
75      * Get builders of groupings defined in this node.
76      *
77      * @return collection of grouping builders
78      */
79     Set<GroupingBuilder> getGroupingBuilders();
80
81     /**
82      * Add builder of grouping statement to this node.
83      *
84      * @param groupingBuilder
85      */
86     void addGrouping(GroupingBuilder groupingBuilder);
87
88     /**
89      * Add builder of uses statement to this node.
90      *
91      * @param usesBuilder
92      */
93     void addUsesNode(UsesNodeBuilder usesBuilder);
94
95     /**
96      * Get builders of typedef statement defined in this node.
97      *
98      * @return
99      */
100     Set<TypeDefinitionBuilder> getTypeDefinitionBuilders();
101
102     /**
103      * Add typedef builder to this node.
104      *
105      * @param typedefBuilder
106      */
107     void addTypedef(TypeDefinitionBuilder typedefBuilder);
108
109 }