blob: ca693c7553167add68e8db535aab6269f1ad5403 [file] [log] [blame]
Vinod Kumar S67e7be62016-02-11 20:13:28 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Vinod Kumar S67e7be62016-02-11 20:13:28 +05303 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.yangutils.datamodel;
17
18import java.util.LinkedList;
19import java.util.List;
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053020
Vinod Kumar S38046502016-03-23 15:30:27 +053021import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
22import org.onosproject.yangutils.parser.Parsable;
23import org.onosproject.yangutils.utils.YangConstructType;
24
25import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCollidingChildUtil;
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053026import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.resolveLinkingForResolutionList;
Vinod Kumar S38046502016-03-23 15:30:27 +053027
Vinod Kumar S67e7be62016-02-11 20:13:28 +053028/*
29 * Reference RFC 6020.
30 *
31 * While the primary unit in YANG is a module, a YANG module can itself
32 * be constructed out of several submodules. Submodules allow a module
33 * designer to split a complex model into several pieces where all the
34 * submodules contribute to a single namespace, which is defined by the
35 * module that includes the submodules.
36 *
37 * The "submodule" statement defines the submodule's name, and groups
38 * all statements that belong to the submodule together. The
39 * "submodule" statement's argument is the name of the submodule,
40 * followed by a block of sub-statements that hold detailed submodule
41 * information.
42 *
43 * The submodule's sub-statements
44 *
45 * +--------------+---------+-------------+------------------+
46 * | substatement | section | cardinality |data model mapping|
47 * +--------------+---------+-------------+------------------+
48 * | anyxml | 7.10 | 0..n | - not supported |
49 * | augment | 7.15 | 0..n | - child nodes |
50 * | belongs-to | 7.2.2 | 1 | - YangBelongsTo |
51 * | choice | 7.9 | 0..n | - child nodes |
52 * | contact | 7.1.8 | 0..1 | - string |
53 * | container | 7.5 | 0..n | - child nodes |
54 * | description | 7.19.3 | 0..1 | - string |
55 * | deviation | 7.18.3 | 0..n | - TODO |
56 * | extension | 7.17 | 0..n | - TODO |
57 * | feature | 7.18.1 | 0..n | - TODO |
58 * | grouping | 7.11 | 0..n | - child nodes |
59 * | identity | 7.16 | 0..n | - TODO |
60 * | import | 7.1.5 | 0..n | - YangImport |
61 * | include | 7.1.6 | 0..n | - YangInclude |
62 * | leaf | 7.6 | 0..n | - YangLeaf |
63 * | leaf-list | 7.7 | 0..n | - YangLeafList |
64 * | list | 7.8 | 0..n | - child nodes |
65 * | notification | 7.14 | 0..n | - TODO |
66 * | organization | 7.1.7 | 0..1 | - string |
67 * | reference | 7.19.4 | 0..1 | - string |
68 * | revision | 7.1.9 | 0..n | - string |
69 * | rpc | 7.13 | 0..n | - TODO |
70 * | typedef | 7.3 | 0..n | - child nodes |
71 * | uses | 7.12 | 0..n | - child nodes |
72 * | YANG-version | 7.1.2 | 0..1 | - int |
73 * +--------------+---------+-------------+------------------+
74 */
Gaurav Agrawal56527662016-04-20 15:49:17 +053075
Vinod Kumar S67e7be62016-02-11 20:13:28 +053076/**
Bharat saraswald9822e92016-04-05 15:13:44 +053077 * Represents data model node to maintain information defined in YANG sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +053078 */
VinodKumarS-Huaweicbdf0f22016-05-11 09:34:21 +053079public class YangSubModule
80 extends YangNode
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053081 implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, YangReferenceResolver,
82 RpcNotificationContainer {
Vinod Kumar S67e7be62016-02-11 20:13:28 +053083
84 /**
85 * Name of sub module.
86 */
87 private String name;
88
89 /**
90 * Module to which it belongs to.
91 */
92 private YangBelongsTo belongsTo;
93
94 /**
95 * Reference RFC 6020.
96 *
97 * The "contact" statement provides contact information for the module. The
98 * argument is a string that is used to specify contact information for the
99 * person or persons to whom technical queries concerning this module should
100 * be sent, such as their name, postal address, telephone number, and
101 * electronic mail address.
102 */
103 private String contact;
104
105 /**
106 * Description.
107 */
108 private String description;
109
110 /**
111 * List of YANG modules imported.
112 */
113 private List<YangImport> importList;
114
115 /**
116 * List of YANG sub-modules included.
117 */
118 private List<YangInclude> includeList;
119
120 /**
121 * List of leaves at root level in the sub-module.
122 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530123 private List<YangLeaf> listOfLeaf;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530124
125 /**
126 * List of leaf-lists at root level in the sub-module.
127 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530128 private List<YangLeafList> listOfLeafList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530129
130 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530131 * Organization owner of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530132 */
133 private String organization;
134
135 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530136 * Reference of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530137 */
138 private String reference;
139
140 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530141 * Revision info of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530142 */
143 private YangRevision revision;
144
145 /**
146 * YANG version.
147 */
148 private byte version;
149
150 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530151 * Prefix of parent module.
152 */
153 private String prefix;
VinodKumarS-Huaweicbdf0f22016-05-11 09:34:21 +0530154
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530155 /*-
156 * Reference RFC 6020.
157 *
158 * Nested typedefs and groupings.
159 * Typedefs and groupings may appear nested under many YANG statements,
160 * allowing these to be lexically scoped by the hierarchy under which
161 * they appear. This allows types and groupings to be defined near
162 * where they are used, rather than placing them at the top level of the
163 * hierarchy. The close proximity increases readability.
164 *
165 * Scoping also allows types to be defined without concern for naming
166 * conflicts between types in different submodules. Type names can be
167 * specified without adding leading strings designed to prevent name
168 * collisions within large modules.
169 *
170 * Finally, scoping allows the module author to keep types and groupings
171 * private to their module or submodule, preventing their reuse. Since
172 * only top-level types and groupings (i.e., those appearing as
173 * sub-statements to a module or submodule statement) can be used outside
174 * the module or submodule, the developer has more control over what
175 * pieces of their module are presented to the outside world, supporting
176 * the need to hide internal information and maintaining a boundary
177 * between what is shared with the outside world and what is kept
178 * private.
179 *
180 * Scoped definitions MUST NOT shadow definitions at a higher scope. A
181 * type or grouping cannot be defined if a higher level in the schema
182 * hierarchy has a definition with a matching identifier.
183 *
184 * A reference to an unprefixed type or grouping, or one which uses the
185 * prefix of the current module, is resolved by locating the closest
186 * matching "typedef" or "grouping" statement among the immediate
187 * sub-statements of each ancestor statement.
188 */
189 private List<YangResolutionInfo> unresolvedResolutionList;
Gaurav Agrawal56527662016-04-20 15:49:17 +0530190
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530191 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530192 * Creates a sub module node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530193 */
194 public YangSubModule() {
195 super(YangNodeType.SUB_MODULE_NODE);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530196 unresolvedResolutionList = new LinkedList<YangResolutionInfo>();
197 importList = new LinkedList<YangImport>();
198 includeList = new LinkedList<YangInclude>();
199 listOfLeaf = new LinkedList<YangLeaf>();
200 listOfLeafList = new LinkedList<YangLeafList>();
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530201 }
202
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530203 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530204 * Returns the YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530205 *
206 * @return YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530207 */
208 @Override
209 public String getName() {
210 return name;
211 }
212
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530213 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530214 * Sets YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530215 *
216 * @param subModuleName YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530217 */
218 @Override
219 public void setName(String subModuleName) {
220 name = subModuleName;
221 }
222
223 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530224 * Returns the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530225 *
226 * @return the belongs to info
227 */
228 public YangBelongsTo getBelongsTo() {
229 return belongsTo;
230 }
231
232 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530233 * Sets the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530234 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530235 * @param belongsTo module info to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530236 */
237 public void setBelongsTo(YangBelongsTo belongsTo) {
238 this.belongsTo = belongsTo;
239 }
240
241 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530242 * Returns the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530243 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530244 * @return the contact
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530245 */
246 public String getContact() {
247 return contact;
248 }
249
250 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530251 * Sets the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530252 *
253 * @param contact the contact to set
254 */
255 public void setContact(String contact) {
256 this.contact = contact;
257 }
258
259 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530260 * Returns the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530261 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530262 * @return the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530263 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530264 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530265 public String getDescription() {
266 return description;
267 }
268
269 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530270 * Sets the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530271 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530272 * @param description set the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530273 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530274 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530275 public void setDescription(String description) {
276 this.description = description;
277 }
278
279 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530280 * Returns the list of imported modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530281 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530282 * @return the list of imported modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530283 */
284 public List<YangImport> getImportList() {
285 return importList;
286 }
287
288 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530289 * Adds the imported module information to the import list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530290 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530291 * @param importedModule module being imported
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530292 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530293 public void addToImportList(YangImport importedModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530294 getImportList().add(importedModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530295 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530296
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530297 @Override
298 public void setImportList(List<YangImport> importList) {
299 this.importList = importList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530300 }
301
302 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530303 * Returns the list of included sub modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530304 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530305 * @return the included list of sub modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530306 */
307 public List<YangInclude> getIncludeList() {
308 return includeList;
309 }
310
311 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530312 * Returns the included sub module information to the include list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530313 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530314 * @param includeModule submodule being included
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530315 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530316 public void addToIncludeList(YangInclude includeModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530317 getIncludeList().add(includeModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530318 }
319
320 @Override
321 public void setIncludeList(List<YangInclude> includeList) {
322 this.includeList = includeList;
323 }
324
325 @Override
326 public String getPrefix() {
327 return prefix;
328 }
329
330 @Override
331 public void setPrefix(String prefix) {
332 this.prefix = prefix;
333 }
334
335 @Override
VinodKumarS-Huaweicbdf0f22016-05-11 09:34:21 +0530336 public void resolveSelfFileLinking()
337 throws DataModelException {
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530338 // Get the list to be resolved.
339 List<YangResolutionInfo> resolutionList = getUnresolvedResolutionList();
340 // Resolve linking for a resolution list.
341 resolveLinkingForResolutionList(resolutionList, this);
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530342 }
343
344 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530345 * Returns the list of leaves.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530346 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530347 * @return the list of leaves
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530348 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530349 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530350 public List<YangLeaf> getListOfLeaf() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530351 return listOfLeaf;
352 }
353
354 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530355 * Adds a leaf.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530356 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530357 * @param leaf the leaf to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530358 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530359 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530360 public void addLeaf(YangLeaf leaf) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530361 getListOfLeaf().add(leaf);
362 }
363
364 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530365 * Returns the list of leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530366 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530367 * @return the list of leaf-list
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530368 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530369 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530370 public List<YangLeafList> getListOfLeafList() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530371 return listOfLeafList;
372 }
373
374 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530375 * Adds a leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530376 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530377 * @param leafList the leaf-list to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530378 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530379 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530380 public void addLeafList(YangLeafList leafList) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530381 getListOfLeafList().add(leafList);
382 }
383
384 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530385 * Returns the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530386 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530387 * @return the organization
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530388 */
389 public String getOrganization() {
390 return organization;
391 }
392
393 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530394 * Sets the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530395 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530396 * @param org the organization to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530397 */
398 public void setOrganization(String org) {
399 organization = org;
400 }
401
402 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530403 * Returns the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530404 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530405 * @return the reference
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530406 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530407 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530408 public String getReference() {
409 return reference;
410 }
411
412 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530413 * Sets the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530414 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530415 * @param reference the reference to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530416 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530417 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530418 public void setReference(String reference) {
419 this.reference = reference;
420 }
421
422 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530423 * Returns the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530424 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530425 * @return the revision
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530426 */
427 public YangRevision getRevision() {
428 return revision;
429 }
430
431 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530432 * Sets the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530433 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530434 * @param revision the revision to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530435 */
436 public void setRevision(YangRevision revision) {
437 this.revision = revision;
438 }
439
440 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530441 * Returns the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530442 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530443 * @return the version
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530444 */
445 public byte getVersion() {
446 return version;
447 }
448
449 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530450 * Sets the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530451 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530452 * @param version the version to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530453 */
454 public void setVersion(byte version) {
455 this.version = version;
456 }
457
458 /**
459 * Returns the type of the parsed data.
460 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530461 * @return returns SUB_MODULE_DATA
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530462 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530463 @Override
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530464 public YangConstructType getYangConstructType() {
465 return YangConstructType.SUB_MODULE_DATA;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530466 }
467
468 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530469 * Validates the data on entering the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530470 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530471 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530472 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530473 @Override
VinodKumarS-Huaweicbdf0f22016-05-11 09:34:21 +0530474 public void validateDataOnEntry()
475 throws DataModelException {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530476 // TODO auto-generated method stub, to be implemented by parser
477 }
478
479 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530480 * Validates the data on exiting the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530481 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530482 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530483 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530484 @Override
VinodKumarS-Huaweicbdf0f22016-05-11 09:34:21 +0530485 public void validateDataOnExit()
486 throws DataModelException {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530487 // TODO auto-generated method stub, to be implemented by parser
488 }
489
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530490 @Override
VinodKumarS-Huaweicbdf0f22016-05-11 09:34:21 +0530491 public void detectCollidingChild(String identifierName, YangConstructType dataType)
492 throws DataModelException {
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530493 // Asks helper to detect colliding child.
494 detectCollidingChildUtil(identifierName, dataType, this);
495 }
496
497 @Override
VinodKumarS-Huaweicbdf0f22016-05-11 09:34:21 +0530498 public void detectSelfCollision(String identifierName, YangConstructType dataType)
499 throws DataModelException {
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530500 // Not required as module doesn't have any parent.
501 }
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530502
503 @Override
504 public List<YangResolutionInfo> getUnresolvedResolutionList() {
505 return unresolvedResolutionList;
506 }
507
508 @Override
509 public void addToResolutionList(YangResolutionInfo resolutionInfo) {
510 this.unresolvedResolutionList.add(resolutionInfo);
511 }
512
513 @Override
514 public void setResolutionList(List<YangResolutionInfo> resolutionList) {
515 this.unresolvedResolutionList = resolutionList;
516 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530517}