blob: d7621512912b99b95e2c202ffb9368e189a2636c [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 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053079public class YangSubModule extends YangNode
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053080 implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, YangReferenceResolver,
81 RpcNotificationContainer {
Vinod Kumar S67e7be62016-02-11 20:13:28 +053082
83 /**
84 * Name of sub module.
85 */
86 private String name;
87
88 /**
89 * Module to which it belongs to.
90 */
91 private YangBelongsTo belongsTo;
92
93 /**
94 * Reference RFC 6020.
95 *
96 * The "contact" statement provides contact information for the module. The
97 * argument is a string that is used to specify contact information for the
98 * person or persons to whom technical queries concerning this module should
99 * be sent, such as their name, postal address, telephone number, and
100 * electronic mail address.
101 */
102 private String contact;
103
104 /**
105 * Description.
106 */
107 private String description;
108
109 /**
110 * List of YANG modules imported.
111 */
112 private List<YangImport> importList;
113
114 /**
115 * List of YANG sub-modules included.
116 */
117 private List<YangInclude> includeList;
118
119 /**
120 * List of leaves at root level in the sub-module.
121 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530122 private List<YangLeaf> listOfLeaf;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530123
124 /**
125 * List of leaf-lists at root level in the sub-module.
126 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530127 private List<YangLeafList> listOfLeafList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530128
129 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530130 * Organization owner of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530131 */
132 private String organization;
133
134 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530135 * Reference of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530136 */
137 private String reference;
138
139 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530140 * Revision info of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530141 */
142 private YangRevision revision;
143
144 /**
145 * YANG version.
146 */
147 private byte version;
148
149 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530150 * Prefix of parent module.
151 */
152 private String prefix;
153 /*-
154 * Reference RFC 6020.
155 *
156 * Nested typedefs and groupings.
157 * Typedefs and groupings may appear nested under many YANG statements,
158 * allowing these to be lexically scoped by the hierarchy under which
159 * they appear. This allows types and groupings to be defined near
160 * where they are used, rather than placing them at the top level of the
161 * hierarchy. The close proximity increases readability.
162 *
163 * Scoping also allows types to be defined without concern for naming
164 * conflicts between types in different submodules. Type names can be
165 * specified without adding leading strings designed to prevent name
166 * collisions within large modules.
167 *
168 * Finally, scoping allows the module author to keep types and groupings
169 * private to their module or submodule, preventing their reuse. Since
170 * only top-level types and groupings (i.e., those appearing as
171 * sub-statements to a module or submodule statement) can be used outside
172 * the module or submodule, the developer has more control over what
173 * pieces of their module are presented to the outside world, supporting
174 * the need to hide internal information and maintaining a boundary
175 * between what is shared with the outside world and what is kept
176 * private.
177 *
178 * Scoped definitions MUST NOT shadow definitions at a higher scope. A
179 * type or grouping cannot be defined if a higher level in the schema
180 * hierarchy has a definition with a matching identifier.
181 *
182 * A reference to an unprefixed type or grouping, or one which uses the
183 * prefix of the current module, is resolved by locating the closest
184 * matching "typedef" or "grouping" statement among the immediate
185 * sub-statements of each ancestor statement.
186 */
187 private List<YangResolutionInfo> unresolvedResolutionList;
Gaurav Agrawal56527662016-04-20 15:49:17 +0530188
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530189 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530190 * Creates a sub module node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530191 */
192 public YangSubModule() {
193 super(YangNodeType.SUB_MODULE_NODE);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530194 unresolvedResolutionList = new LinkedList<YangResolutionInfo>();
195 importList = new LinkedList<YangImport>();
196 includeList = new LinkedList<YangInclude>();
197 listOfLeaf = new LinkedList<YangLeaf>();
198 listOfLeafList = new LinkedList<YangLeafList>();
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530199 }
200
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530201 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530202 * Returns the YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530203 *
204 * @return YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530205 */
206 @Override
207 public String getName() {
208 return name;
209 }
210
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530211 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530212 * Sets YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530213 *
214 * @param subModuleName YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530215 */
216 @Override
217 public void setName(String subModuleName) {
218 name = subModuleName;
219 }
220
221 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530222 * Returns the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530223 *
224 * @return the belongs to info
225 */
226 public YangBelongsTo getBelongsTo() {
227 return belongsTo;
228 }
229
230 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530231 * Sets the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530232 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530233 * @param belongsTo module info to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530234 */
235 public void setBelongsTo(YangBelongsTo belongsTo) {
236 this.belongsTo = belongsTo;
237 }
238
239 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530240 * Returns the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530241 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530242 * @return the contact
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530243 */
244 public String getContact() {
245 return contact;
246 }
247
248 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530249 * Sets the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530250 *
251 * @param contact the contact to set
252 */
253 public void setContact(String contact) {
254 this.contact = contact;
255 }
256
257 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530258 * Returns the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530259 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530260 * @return the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530261 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530262 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530263 public String getDescription() {
264 return description;
265 }
266
267 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530268 * Sets the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530269 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530270 * @param description set the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530271 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530272 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530273 public void setDescription(String description) {
274 this.description = description;
275 }
276
277 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530278 * Returns the list of imported modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530279 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530280 * @return the list of imported modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530281 */
282 public List<YangImport> getImportList() {
283 return importList;
284 }
285
286 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530287 * Adds the imported module information to the import list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530288 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530289 * @param importedModule module being imported
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530290 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530291 public void addToImportList(YangImport importedModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530292 getImportList().add(importedModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530293 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530294
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530295 @Override
296 public void setImportList(List<YangImport> importList) {
297 this.importList = importList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530298 }
299
300 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530301 * Returns the list of included sub modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530302 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530303 * @return the included list of sub modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530304 */
305 public List<YangInclude> getIncludeList() {
306 return includeList;
307 }
308
309 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530310 * Returns the included sub module information to the include list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530311 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530312 * @param includeModule submodule being included
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530313 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530314 public void addToIncludeList(YangInclude includeModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530315 getIncludeList().add(includeModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530316 }
317
318 @Override
319 public void setIncludeList(List<YangInclude> includeList) {
320 this.includeList = includeList;
321 }
322
323 @Override
324 public String getPrefix() {
325 return prefix;
326 }
327
328 @Override
329 public void setPrefix(String prefix) {
330 this.prefix = prefix;
331 }
332
333 @Override
334 public void resolveSelfFileLinking() throws DataModelException {
335 // Get the list to be resolved.
336 List<YangResolutionInfo> resolutionList = getUnresolvedResolutionList();
337 // Resolve linking for a resolution list.
338 resolveLinkingForResolutionList(resolutionList, this);
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530339 }
340
341 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530342 * Returns the list of leaves.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530343 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530344 * @return the list of leaves
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530345 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530346 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530347 public List<YangLeaf> getListOfLeaf() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530348 return listOfLeaf;
349 }
350
351 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530352 * Adds a leaf.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530353 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530354 * @param leaf the leaf to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530355 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530356 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530357 public void addLeaf(YangLeaf leaf) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530358 getListOfLeaf().add(leaf);
359 }
360
361 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530362 * Returns the list of leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530363 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530364 * @return the list of leaf-list
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530365 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530366 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530367 public List<YangLeafList> getListOfLeafList() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530368 return listOfLeafList;
369 }
370
371 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530372 * Adds a leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530373 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530374 * @param leafList the leaf-list to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530375 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530376 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530377 public void addLeafList(YangLeafList leafList) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530378 getListOfLeafList().add(leafList);
379 }
380
381 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530382 * Returns the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530383 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530384 * @return the organization
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530385 */
386 public String getOrganization() {
387 return organization;
388 }
389
390 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530391 * Sets the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530392 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530393 * @param org the organization to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530394 */
395 public void setOrganization(String org) {
396 organization = org;
397 }
398
399 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530400 * Returns the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530401 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530402 * @return the reference
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530403 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530404 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530405 public String getReference() {
406 return reference;
407 }
408
409 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530410 * Sets the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530411 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530412 * @param reference the reference to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530413 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530414 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530415 public void setReference(String reference) {
416 this.reference = reference;
417 }
418
419 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530420 * Returns the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530421 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530422 * @return the revision
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530423 */
424 public YangRevision getRevision() {
425 return revision;
426 }
427
428 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530429 * Sets the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530430 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530431 * @param revision the revision to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530432 */
433 public void setRevision(YangRevision revision) {
434 this.revision = revision;
435 }
436
437 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530438 * Returns the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530439 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530440 * @return the version
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530441 */
442 public byte getVersion() {
443 return version;
444 }
445
446 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530447 * Sets the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530448 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530449 * @param version the version to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530450 */
451 public void setVersion(byte version) {
452 this.version = version;
453 }
454
455 /**
456 * Returns the type of the parsed data.
457 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530458 * @return returns SUB_MODULE_DATA
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530459 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530460 @Override
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530461 public YangConstructType getYangConstructType() {
462 return YangConstructType.SUB_MODULE_DATA;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530463 }
464
465 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530466 * Validates the data on entering the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530467 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530468 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530469 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530470 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530471 public void validateDataOnEntry() throws DataModelException {
472 // TODO auto-generated method stub, to be implemented by parser
473 }
474
475 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530476 * Validates the data on exiting the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530477 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530478 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530479 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530480 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530481 public void validateDataOnExit() throws DataModelException {
482 // TODO auto-generated method stub, to be implemented by parser
483 }
484
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530485 @Override
486 public void detectCollidingChild(String identifierName, YangConstructType dataType) throws DataModelException {
487 // Asks helper to detect colliding child.
488 detectCollidingChildUtil(identifierName, dataType, this);
489 }
490
491 @Override
492 public void detectSelfCollision(String identifierName, YangConstructType dataType) throws DataModelException {
493 // Not required as module doesn't have any parent.
494 }
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530495
496 @Override
497 public List<YangResolutionInfo> getUnresolvedResolutionList() {
498 return unresolvedResolutionList;
499 }
500
501 @Override
502 public void addToResolutionList(YangResolutionInfo resolutionInfo) {
503 this.unresolvedResolutionList.add(resolutionInfo);
504 }
505
506 @Override
507 public void setResolutionList(List<YangResolutionInfo> resolutionList) {
508 this.unresolvedResolutionList = resolutionList;
509 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530510}