Added more javadocs.
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / UsesNodeBuilder.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.yangtools.yang.parser.builder.api;
9
10 import java.util.List;
11 import java.util.Set;
12
13 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
14 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
15 import org.opendaylight.yangtools.yang.model.api.UsesNode;
16 import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
17 import org.opendaylight.yangtools.yang.parser.util.RefineHolder;
18
19 /**
20  * Interface for builders of 'uses' statement.
21  */
22 public interface UsesNodeBuilder extends GroupingMember, Builder {
23
24     /**
25      * Get parent of this uses node. Since uses can be defined only under on of
26      * module, container, list, case, grouping, input, output, notification or
27      * augment, return type is DataNodeContainerBuilder.
28      */
29     DataNodeContainerBuilder getParent();
30
31     /**
32      * Get grouping path as string.
33      *
34      * @return grouping path as String
35      */
36     String getGroupingPathAsString();
37
38     /**
39      * Get grouping path.
40      *
41      * @return grouping path as SchemaPath
42      */
43     SchemaPath getGroupingPath();
44
45     /**
46      * Get grouping definition.
47      *
48      * @return GroupingDefinition if present, null otherwise
49      */
50     GroupingDefinition getGroupingDefinition();
51
52     /**
53      * Set grouping definition.
54      *
55      * @param groupingDefinition
56      *            GroupingDefinition object
57      */
58     void setGroupingDefinition(GroupingDefinition groupingDefinition);
59
60     /**
61      * Get grouping builder.
62      *
63      * @return GroupingBuilder if present, null otherwise
64      */
65     GroupingBuilder getGroupingBuilder();
66
67     /**
68      * Set grouping builder.
69      *
70      * @param grouping
71      *            GroupingBuilder object
72      */
73     void setGrouping(GroupingBuilder grouping);
74
75     /**
76      * Get augmentations defined in this uses node.
77      *
78      * @return set of augmentations defined in this node
79      */
80     Set<AugmentationSchemaBuilder> getAugmentations();
81
82     /**
83      * Add augment builder.
84      *
85      * @param builder
86      *            new builder of augment statement
87      */
88     void addAugment(AugmentationSchemaBuilder builder);
89
90     /**
91      * Get refine statements.
92      *
93      * @return list of RefineHolder objects
94      */
95     List<RefineHolder> getRefines();
96
97     /**
98      * Get refined nodes.
99      *
100      * @return List of refined SchemaNodeBuilder objects
101      */
102     List<SchemaNodeBuilder> getRefineNodes();
103
104     /**
105      * Add refine statement.
106      *
107      * @param refine
108      *            new RefineHolder object
109      */
110     void addRefine(RefineHolder refine);
111
112     /**
113      * Add refine node.
114      *
115      * @param refineNode
116      *            refined DataSchemaNodeBuilder object
117      */
118     void addRefineNode(DataSchemaNodeBuilder refineNode);
119
120     /**
121      * Build new UsesNode object.
122      */
123     UsesNode build();
124
125     /**
126      * Get child nodes defined in target grouping.
127      *
128      * @return set of DataSchemaNodeBuilder objects
129      */
130     Set<DataSchemaNodeBuilder> getTargetChildren();
131
132     /**
133      * Set reference to target grouping child nodes.
134      *
135      * @param targetChildren
136      *            set of child nodes defined in target grouping
137      */
138     void setTargetChildren(Set<DataSchemaNodeBuilder> targetChildren);
139
140     /**
141      * Get groupings defined in target grouping.
142      *
143      * @return set of GroupingBuilder objects
144      */
145     Set<GroupingBuilder> getTargetGroupings();
146
147     /**
148      * Set reference to target grouping groupings.
149      *
150      * @param targetGroupings
151      *            set of groupings defined in target grouping
152      */
153     void setTargetGroupings(Set<GroupingBuilder> targetGroupings);
154
155     /**
156      * Get type definitions defined in target grouping.
157      *
158      * @return set of typedefs defined in target grouping
159      */
160     Set<TypeDefinitionBuilder> getTargetTypedefs();
161
162     /**
163      * Set reference to target grouping typedefs.
164      *
165      * @param targetTypedefs
166      *            set of typedefs defined in target grouping
167      */
168     void setTargetTypedefs(Set<TypeDefinitionBuilder> targetTypedefs);
169
170     /**
171      * Get unknown nodes defined in target grouping.
172      *
173      * @return list of unknown nodes defined in target grouping
174      */
175     List<UnknownSchemaNodeBuilder> getTargetUnknownNodes();
176
177     /**
178      * Set reference to target grouping unknown nodes.
179      *
180      * @param targetUnknownNodes
181      *            list of unknown nodes defined in target grouping.
182      */
183     void setTargetUnknownNodes(List<UnknownSchemaNodeBuilder> targetUnknownNodes);
184
185     /**
186      *
187      * @return true, if this object was built based on another UsesNodeBuilder,
188      *         false otherwise
189      */
190     boolean isCopy();
191
192     /**
193      *
194      * @return true, if target grouping objects was loaded already, false
195      *         otherwise
196      */
197     boolean isDataCollected();
198
199     /**
200      * Set if target grouping objects was loaded already.
201      *
202      * @param dataCollected
203      */
204     void setDataCollected(boolean dataCollected);
205
206 }