blob: 68c2ea44723069396415be7a6725d20c66871ef5 [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;
Bharat saraswald9822e92016-04-05 15:13:44 +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 */
75/**
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 Agrawald9d6cc82016-03-29 02:17:23 +053079 implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo {
Vinod Kumar S67e7be62016-02-11 20:13:28 +053080
81 /**
82 * Name of sub module.
83 */
84 private String name;
85
86 /**
87 * Module to which it belongs to.
88 */
89 private YangBelongsTo belongsTo;
90
91 /**
92 * Reference RFC 6020.
93 *
94 * The "contact" statement provides contact information for the module. The
95 * argument is a string that is used to specify contact information for the
96 * person or persons to whom technical queries concerning this module should
97 * be sent, such as their name, postal address, telephone number, and
98 * electronic mail address.
99 */
100 private String contact;
101
102 /**
103 * Description.
104 */
105 private String description;
106
107 /**
108 * List of YANG modules imported.
109 */
110 private List<YangImport> importList;
111
112 /**
113 * List of YANG sub-modules included.
114 */
115 private List<YangInclude> includeList;
116
117 /**
118 * List of leaves at root level in the sub-module.
119 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530120 private List<YangLeaf> listOfLeaf;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530121
122 /**
123 * List of leaf-lists at root level in the sub-module.
124 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530125 private List<YangLeafList> listOfLeafList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530126
127 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530128 * Organization owner of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530129 */
130 private String organization;
131
132 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530133 * Reference of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530134 */
135 private String reference;
136
137 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530138 * Revision info of the sub-module.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530139 */
140 private YangRevision revision;
141
142 /**
143 * YANG version.
144 */
145 private byte version;
146
147 /**
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530148 * Prefix of parent module.
149 */
150 private String prefix;
151 /*-
152 * Reference RFC 6020.
153 *
154 * Nested typedefs and groupings.
155 * Typedefs and groupings may appear nested under many YANG statements,
156 * allowing these to be lexically scoped by the hierarchy under which
157 * they appear. This allows types and groupings to be defined near
158 * where they are used, rather than placing them at the top level of the
159 * hierarchy. The close proximity increases readability.
160 *
161 * Scoping also allows types to be defined without concern for naming
162 * conflicts between types in different submodules. Type names can be
163 * specified without adding leading strings designed to prevent name
164 * collisions within large modules.
165 *
166 * Finally, scoping allows the module author to keep types and groupings
167 * private to their module or submodule, preventing their reuse. Since
168 * only top-level types and groupings (i.e., those appearing as
169 * sub-statements to a module or submodule statement) can be used outside
170 * the module or submodule, the developer has more control over what
171 * pieces of their module are presented to the outside world, supporting
172 * the need to hide internal information and maintaining a boundary
173 * between what is shared with the outside world and what is kept
174 * private.
175 *
176 * Scoped definitions MUST NOT shadow definitions at a higher scope. A
177 * type or grouping cannot be defined if a higher level in the schema
178 * hierarchy has a definition with a matching identifier.
179 *
180 * A reference to an unprefixed type or grouping, or one which uses the
181 * prefix of the current module, is resolved by locating the closest
182 * matching "typedef" or "grouping" statement among the immediate
183 * sub-statements of each ancestor statement.
184 */
185 private List<YangResolutionInfo> unresolvedResolutionList;
186 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530187 * Creates a sub module node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530188 */
189 public YangSubModule() {
190 super(YangNodeType.SUB_MODULE_NODE);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530191 unresolvedResolutionList = new LinkedList<YangResolutionInfo>();
192 importList = new LinkedList<YangImport>();
193 includeList = new LinkedList<YangInclude>();
194 listOfLeaf = new LinkedList<YangLeaf>();
195 listOfLeafList = new LinkedList<YangLeafList>();
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530196 }
197
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530198 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530199 * Returns the YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530200 *
201 * @return YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530202 */
203 @Override
204 public String getName() {
205 return name;
206 }
207
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530208 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530209 * Sets YANG name of the sub module.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530210 *
211 * @param subModuleName YANG name of the sub module
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530212 */
213 @Override
214 public void setName(String subModuleName) {
215 name = subModuleName;
216 }
217
218 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530219 * Returns the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530220 *
221 * @return the belongs to info
222 */
223 public YangBelongsTo getBelongsTo() {
224 return belongsTo;
225 }
226
227 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530228 * Sets the module info.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530229 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530230 * @param belongsTo module info to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530231 */
232 public void setBelongsTo(YangBelongsTo belongsTo) {
233 this.belongsTo = belongsTo;
234 }
235
236 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530237 * Returns the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530238 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530239 * @return the contact
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530240 */
241 public String getContact() {
242 return contact;
243 }
244
245 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530246 * Sets the contact.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530247 *
248 * @param contact the contact to set
249 */
250 public void setContact(String contact) {
251 this.contact = contact;
252 }
253
254 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530255 * Returns the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530256 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530257 * @return the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530258 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530259 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530260 public String getDescription() {
261 return description;
262 }
263
264 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530265 * Sets the description.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530266 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530267 * @param description set the description
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530268 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530269 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530270 public void setDescription(String description) {
271 this.description = description;
272 }
273
274 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530275 * Returns the list of imported modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530276 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530277 * @return the list of imported modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530278 */
279 public List<YangImport> getImportList() {
280 return importList;
281 }
282
283 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530284 * Adds the imported module information to the import list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530285 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530286 * @param importedModule module being imported
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530287 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530288 public void addToImportList(YangImport importedModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530289 getImportList().add(importedModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530290 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530291
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530292 @Override
293 public void setImportList(List<YangImport> importList) {
294 this.importList = importList;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530295 }
296
297 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530298 * Returns the list of included sub modules.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530299 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530300 * @return the included list of sub modules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530301 */
302 public List<YangInclude> getIncludeList() {
303 return includeList;
304 }
305
306 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530307 * Returns the included sub module information to the include list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530308 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530309 * @param includeModule submodule being included
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530310 */
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530311 public void addToIncludeList(YangInclude includeModule) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530312 getIncludeList().add(includeModule);
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530313 }
314
315 @Override
316 public void setIncludeList(List<YangInclude> includeList) {
317 this.includeList = includeList;
318 }
319
320 @Override
321 public String getPrefix() {
322 return prefix;
323 }
324
325 @Override
326 public void setPrefix(String prefix) {
327 this.prefix = prefix;
328 }
329
330 @Override
331 public void resolveSelfFileLinking() throws DataModelException {
332 // Get the list to be resolved.
333 List<YangResolutionInfo> resolutionList = getUnresolvedResolutionList();
334 // Resolve linking for a resolution list.
335 resolveLinkingForResolutionList(resolutionList, this);
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530336 }
337
338 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530339 * Returns the list of leaves.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530340 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530341 * @return the list of leaves
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530342 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530343 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530344 public List<YangLeaf> getListOfLeaf() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530345 return listOfLeaf;
346 }
347
348 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530349 * Adds a leaf.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530350 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530351 * @param leaf the leaf to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530352 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530353 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530354 public void addLeaf(YangLeaf leaf) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530355 getListOfLeaf().add(leaf);
356 }
357
358 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530359 * Returns the list of leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530360 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530361 * @return the list of leaf-list
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530362 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530363 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530364 public List<YangLeafList> getListOfLeafList() {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530365 return listOfLeafList;
366 }
367
368 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530369 * Adds a leaf-list.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530370 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530371 * @param leafList the leaf-list to be added
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530372 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530373 @Override
Vinod Kumar S0c330cd2016-02-23 22:36:57 +0530374 public void addLeafList(YangLeafList leafList) {
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530375 getListOfLeafList().add(leafList);
376 }
377
378 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530379 * Returns the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530380 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530381 * @return the organization
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530382 */
383 public String getOrganization() {
384 return organization;
385 }
386
387 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530388 * Sets the sub-modules organization.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530389 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530390 * @param org the organization to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530391 */
392 public void setOrganization(String org) {
393 organization = org;
394 }
395
396 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530397 * Returns the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530398 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530399 * @return the reference
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530400 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530401 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530402 public String getReference() {
403 return reference;
404 }
405
406 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530407 * Sets the textual reference.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530408 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530409 * @param reference the reference to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530410 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530411 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530412 public void setReference(String reference) {
413 this.reference = reference;
414 }
415
416 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530417 * Returns the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530418 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530419 * @return the revision
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530420 */
421 public YangRevision getRevision() {
422 return revision;
423 }
424
425 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530426 * Sets the revision.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530427 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530428 * @param revision the revision to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530429 */
430 public void setRevision(YangRevision revision) {
431 this.revision = revision;
432 }
433
434 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530435 * Returns the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530436 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530437 * @return the version
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530438 */
439 public byte getVersion() {
440 return version;
441 }
442
443 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530444 * Sets the version.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530445 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530446 * @param version the version to set
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530447 */
448 public void setVersion(byte version) {
449 this.version = version;
450 }
451
452 /**
453 * Returns the type of the parsed data.
454 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530455 * @return returns SUB_MODULE_DATA
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530456 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530457 @Override
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530458 public YangConstructType getYangConstructType() {
459 return YangConstructType.SUB_MODULE_DATA;
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530460 }
461
462 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530463 * Validates the data on entering the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530464 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530465 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530466 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530467 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530468 public void validateDataOnEntry() throws DataModelException {
469 // TODO auto-generated method stub, to be implemented by parser
470 }
471
472 /**
Bharat saraswald9822e92016-04-05 15:13:44 +0530473 * Validates the data on exiting the corresponding parse tree node.
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530474 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530475 * @throws DataModelException a violation of data model rules
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530476 */
Bharat saraswal870c56f2016-02-20 21:57:16 +0530477 @Override
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530478 public void validateDataOnExit() throws DataModelException {
479 // TODO auto-generated method stub, to be implemented by parser
480 }
481
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +0530482 @Override
483 public void detectCollidingChild(String identifierName, YangConstructType dataType) throws DataModelException {
484 // Asks helper to detect colliding child.
485 detectCollidingChildUtil(identifierName, dataType, this);
486 }
487
488 @Override
489 public void detectSelfCollision(String identifierName, YangConstructType dataType) throws DataModelException {
490 // Not required as module doesn't have any parent.
491 }
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +0530492
493 @Override
494 public List<YangResolutionInfo> getUnresolvedResolutionList() {
495 return unresolvedResolutionList;
496 }
497
498 @Override
499 public void addToResolutionList(YangResolutionInfo resolutionInfo) {
500 this.unresolvedResolutionList.add(resolutionInfo);
501 }
502
503 @Override
504 public void setResolutionList(List<YangResolutionInfo> resolutionList) {
505 this.unresolvedResolutionList = resolutionList;
506 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530507}