blob: 9db0469a856865f11fc5f64b8ac486a78da5b1d0 [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 S38046502016-03-23 15:30:27 +053020import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
21import org.onosproject.yangutils.parser.Parsable;
22import org.onosproject.yangutils.utils.YangConstructType;
23
24import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCollidingChildUtil;
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053025import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.resolveLinkingForResolutionList;
Vinod Kumar S38046502016-03-23 15:30:27 +053026
Vinod Kumar S67e7be62016-02-11 20:13:28 +053027/*
28 * Reference RFC 6020.
29 *
30 * While the primary unit in YANG is a module, a YANG module can itself
31 * be constructed out of several submodules. Submodules allow a module
32 * designer to split a complex model into several pieces where all the
33 * submodules contribute to a single namespace, which is defined by the
34 * module that includes the submodules.
35 *
36 * The "submodule" statement defines the submodule's name, and groups
37 * all statements that belong to the submodule together. The
38 * "submodule" statement's argument is the name of the submodule,
39 * followed by a block of sub-statements that hold detailed submodule
40 * information.
41 *
42 * The submodule's sub-statements
43 *
44 * +--------------+---------+-------------+------------------+
45 * | substatement | section | cardinality |data model mapping|
46 * +--------------+---------+-------------+------------------+
47 * | anyxml | 7.10 | 0..n | - not supported |
48 * | augment | 7.15 | 0..n | - child nodes |
49 * | belongs-to | 7.2.2 | 1 | - YangBelongsTo |
50 * | choice | 7.9 | 0..n | - child nodes |
51 * | contact | 7.1.8 | 0..1 | - string |
52 * | container | 7.5 | 0..n | - child nodes |
53 * | description | 7.19.3 | 0..1 | - string |
54 * | deviation | 7.18.3 | 0..n | - TODO |
55 * | extension | 7.17 | 0..n | - TODO |
56 * | feature | 7.18.1 | 0..n | - TODO |
57 * | grouping | 7.11 | 0..n | - child nodes |
58 * | identity | 7.16 | 0..n | - TODO |
59 * | import | 7.1.5 | 0..n | - YangImport |
60 * | include | 7.1.6 | 0..n | - YangInclude |
61 * | leaf | 7.6 | 0..n | - YangLeaf |
62 * | leaf-list | 7.7 | 0..n | - YangLeafList |
63 * | list | 7.8 | 0..n | - child nodes |
64 * | notification | 7.14 | 0..n | - TODO |
65 * | organization | 7.1.7 | 0..1 | - string |
66 * | reference | 7.19.4 | 0..1 | - string |
67 * | revision | 7.1.9 | 0..n | - string |
68 * | rpc | 7.13 | 0..n | - TODO |
69 * | typedef | 7.3 | 0..n | - child nodes |
70 * | uses | 7.12 | 0..n | - child nodes |
71 * | YANG-version | 7.1.2 | 0..1 | - int |
72 * +--------------+---------+-------------+------------------+
73 */
Gaurav Agrawal56527662016-04-20 15:49:17 +053074
Vinod Kumar S67e7be62016-02-11 20:13:28 +053075/**
Bharat saraswald9822e92016-04-05 15:13:44 +053076 * Represents data model node to maintain information defined in YANG sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +053077 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053078public class YangSubModule extends YangNode
Gaurav Agrawal56527662016-04-20 15:49:17 +053079 implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo,
80 HasRpcNotification {
Vinod Kumar S67e7be62016-02-11 20:13:28 +053081
82 /**
83 * Name of sub module.
84 */
85 private String name;
86
87 /**
88 * Module to which it belongs to.
89 */
90 private YangBelongsTo belongsTo;
91
92 /**
93 * Reference RFC 6020.
94 *
95 * The "contact" statement provides contact information for the module. The
96 * argument is a string that is used to specify contact information for the
97 * person or persons to whom technical queries concerning this module should
98 * be sent, such as their name, postal address, telephone number, and
99 * electronic mail address.
100 */
101 private String contact;
102
103 /**
104 * Description.
105 */
106 private String description;
107
108 /**
109 * List of YANG modules imported.
110 */
111 private List<YangImport> importList;
112
113 /**
114 * List of YANG sub-modules included.
115 */
116 private List<YangInclude> includeList;
117
118 /**
119 * List of leaves at root level in the sub-module.
120 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530121 private List<YangLeaf> listOfLeaf;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530122
123 /**
124 * List of leaf-lists at root level in the sub-module.
125 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530126 private List<YangLeafList> listOfLeafList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530127
128 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530129 * Organization owner of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530130 */
131 private String organization;
132
133 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530134 * Reference of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530135 */
136 private String reference;
137
138 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530139 * Revision info of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530140 */
141 private YangRevision revision;
142
143 /**
144 * YANG version.
145 */
146 private byte version;
147
148 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530149 * Prefix of parent module.
150 */
151 private String prefix;
152 /*-
153 * Reference RFC 6020.
154 *
155 * Nested typedefs and groupings.
156 * Typedefs and groupings may appear nested under many YANG statements,
157 * allowing these to be lexically scoped by the hierarchy under which
158 * they appear. This allows types and groupings to be defined near
159 * where they are used, rather than placing them at the top level of the
160 * hierarchy. The close proximity increases readability.
161 *
162 * Scoping also allows types to be defined without concern for naming
163 * conflicts between types in different submodules. Type names can be
164 * specified without adding leading strings designed to prevent name
165 * collisions within large modules.
166 *
167 * Finally, scoping allows the module author to keep types and groupings
168 * private to their module or submodule, preventing their reuse. Since
169 * only top-level types and groupings (i.e., those appearing as
170 * sub-statements to a module or submodule statement) can be used outside
171 * the module or submodule, the developer has more control over what
172 * pieces of their module are presented to the outside world, supporting
173 * the need to hide internal information and maintaining a boundary
174 * between what is shared with the outside world and what is kept
175 * private.
176 *
177 * Scoped definitions MUST NOT shadow definitions at a higher scope. A
178 * type or grouping cannot be defined if a higher level in the schema
179 * hierarchy has a definition with a matching identifier.
180 *
181 * A reference to an unprefixed type or grouping, or one which uses the
182 * prefix of the current module, is resolved by locating the closest
183 * matching "typedef" or "grouping" statement among the immediate
184 * sub-statements of each ancestor statement.
185 */
186 private List<YangResolutionInfo> unresolvedResolutionList;
Gaurav Agrawal56527662016-04-20 15:49:17 +0530187
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530188 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530189 * Creates a sub module node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530190 */
191 public YangSubModule() {
192 super(YangNodeType.SUB_MODULE_NODE);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530193 unresolvedResolutionList = new LinkedList<YangResolutionInfo>();
194 importList = new LinkedList<YangImport>();
195 includeList = new LinkedList<YangInclude>();
196 listOfLeaf = new LinkedList<YangLeaf>();
197 listOfLeafList = new LinkedList<YangLeafList>();
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530198 }
199
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530200 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530201 * Returns the YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530202 *
203 * @return YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530204 */
205 @Override
206 public String getName() {
207 return name;
208 }
209
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530210 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530211 * Sets YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530212 *
213 * @param subModuleName YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530214 */
215 @Override
216 public void setName(String subModuleName) {
217 name = subModuleName;
218 }
219
220 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530221 * Returns the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530222 *
223 * @return the belongs to info
224 */
225 public YangBelongsTo getBelongsTo() {
226 return belongsTo;
227 }
228
229 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530230 * Sets the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530231 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530232 * @param belongsTo module info to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530233 */
234 public void setBelongsTo(YangBelongsTo belongsTo) {
235 this.belongsTo = belongsTo;
236 }
237
238 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530239 * Returns the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530240 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530241 * @return the contact
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530242 */
243 public String getContact() {
244 return contact;
245 }
246
247 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530248 * Sets the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530249 *
250 * @param contact the contact to set
251 */
252 public void setContact(String contact) {
253 this.contact = contact;
254 }
255
256 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530257 * Returns the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530258 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530259 * @return the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530260 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530261 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530262 public String getDescription() {
263 return description;
264 }
265
266 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530267 * Sets the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530268 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530269 * @param description set the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530270 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530271 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530272 public void setDescription(String description) {
273 this.description = description;
274 }
275
276 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530277 * Returns the list of imported modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530278 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530279 * @return the list of imported modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530280 */
281 public List<YangImport> getImportList() {
282 return importList;
283 }
284
285 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530286 * Adds the imported module information to the import list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530287 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530288 * @param importedModule module being imported
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530289 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530290 public void addToImportList(YangImport importedModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530291 getImportList().add(importedModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530292 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530293
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530294 @Override
295 public void setImportList(List<YangImport> importList) {
296 this.importList = importList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530297 }
298
299 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530300 * Returns the list of included sub modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530301 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530302 * @return the included list of sub modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530303 */
304 public List<YangInclude> getIncludeList() {
305 return includeList;
306 }
307
308 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530309 * Returns the included sub module information to the include list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530310 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530311 * @param includeModule submodule being included
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530312 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530313 public void addToIncludeList(YangInclude includeModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530314 getIncludeList().add(includeModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530315 }
316
317 @Override
318 public void setIncludeList(List<YangInclude> includeList) {
319 this.includeList = includeList;
320 }
321
322 @Override
323 public String getPrefix() {
324 return prefix;
325 }
326
327 @Override
328 public void setPrefix(String prefix) {
329 this.prefix = prefix;
330 }
331
332 @Override
333 public void resolveSelfFileLinking() throws DataModelException {
334 // Get the list to be resolved.
335 List<YangResolutionInfo> resolutionList = getUnresolvedResolutionList();
336 // Resolve linking for a resolution list.
337 resolveLinkingForResolutionList(resolutionList, this);
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530338 }
339
340 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530341 * Returns the list of leaves.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530342 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530343 * @return the list of leaves
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530344 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530345 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530346 public List<YangLeaf> getListOfLeaf() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530347 return listOfLeaf;
348 }
349
350 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530351 * Adds a leaf.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530352 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530353 * @param leaf the leaf to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530354 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530355 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530356 public void addLeaf(YangLeaf leaf) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530357 getListOfLeaf().add(leaf);
358 }
359
360 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530361 * Returns the list of leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530362 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530363 * @return the list of leaf-list
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530364 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530365 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530366 public List<YangLeafList> getListOfLeafList() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530367 return listOfLeafList;
368 }
369
370 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530371 * Adds a leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530372 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530373 * @param leafList the leaf-list to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530374 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530375 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530376 public void addLeafList(YangLeafList leafList) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530377 getListOfLeafList().add(leafList);
378 }
379
380 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530381 * Returns the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530382 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530383 * @return the organization
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530384 */
385 public String getOrganization() {
386 return organization;
387 }
388
389 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530390 * Sets the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530391 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530392 * @param org the organization to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530393 */
394 public void setOrganization(String org) {
395 organization = org;
396 }
397
398 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530399 * Returns the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530400 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530401 * @return the reference
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530402 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530403 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530404 public String getReference() {
405 return reference;
406 }
407
408 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530409 * Sets the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530410 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530411 * @param reference the reference to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530412 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530413 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530414 public void setReference(String reference) {
415 this.reference = reference;
416 }
417
418 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530419 * Returns the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530420 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530421 * @return the revision
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530422 */
423 public YangRevision getRevision() {
424 return revision;
425 }
426
427 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530428 * Sets the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530429 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530430 * @param revision the revision to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530431 */
432 public void setRevision(YangRevision revision) {
433 this.revision = revision;
434 }
435
436 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530437 * Returns the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530438 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530439 * @return the version
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530440 */
441 public byte getVersion() {
442 return version;
443 }
444
445 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530446 * Sets the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530447 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530448 * @param version the version to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530449 */
450 public void setVersion(byte version) {
451 this.version = version;
452 }
453
454 /**
455 * Returns the type of the parsed data.
456 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530457 * @return returns SUB_MODULE_DATA
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530458 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530459 @Override
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530460 public YangConstructType getYangConstructType() {
461 return YangConstructType.SUB_MODULE_DATA;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530462 }
463
464 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530465 * Validates the data on entering the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530466 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530467 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530468 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530469 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530470 public void validateDataOnEntry() throws DataModelException {
471 // TODO auto-generated method stub, to be implemented by parser
472 }
473
474 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530475 * Validates the data on exiting the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530476 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530477 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530478 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530479 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530480 public void validateDataOnExit() throws DataModelException {
481 // TODO auto-generated method stub, to be implemented by parser
482 }
483
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530484 @Override
485 public void detectCollidingChild(String identifierName, YangConstructType dataType) throws DataModelException {
486 // Asks helper to detect colliding child.
487 detectCollidingChildUtil(identifierName, dataType, this);
488 }
489
490 @Override
491 public void detectSelfCollision(String identifierName, YangConstructType dataType) throws DataModelException {
492 // Not required as module doesn't have any parent.
493 }
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530494
495 @Override
496 public List<YangResolutionInfo> getUnresolvedResolutionList() {
497 return unresolvedResolutionList;
498 }
499
500 @Override
501 public void addToResolutionList(YangResolutionInfo resolutionInfo) {
502 this.unresolvedResolutionList.add(resolutionInfo);
503 }
504
505 @Override
506 public void setResolutionList(List<YangResolutionInfo> resolutionList) {
507 this.unresolvedResolutionList = resolutionList;
508 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530509}