Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 0f7908b | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 3 | * |
| 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 | */ |
| 16 | |
| 17 | package org.onosproject.yangutils.datamodel; |
| 18 | |
| 19 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
| 20 | import org.onosproject.yangutils.parser.Parsable; |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 21 | import org.onosproject.yangutils.utils.YangConstructType; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 22 | |
| 23 | /* |
| 24 | * Reference:RFC 6020. |
| 25 | * Where the "leaf" statement is used to define a simple scalar variable |
| 26 | * of a particular type, the "leaf-list" statement is used to define an |
| 27 | * array of a particular type. The "leaf-list" statement takes one |
| 28 | * argument, which is an identifier, followed by a block of |
| 29 | * sub-statements that holds detailed leaf-list information. |
| 30 | * |
| 31 | * The values in a leaf-list MUST be unique. |
| 32 | * |
| 33 | * The leaf-list's sub-statements |
| 34 | * |
| 35 | * +--------------+---------+-------------+------------------+ |
| 36 | * | substatement | section | cardinality |data model mapping| |
| 37 | * +--------------+---------+-------------+------------------+ |
| 38 | * | config | 7.19.1 | 0..1 | -boolean | |
| 39 | * | description | 7.19.3 | 0..1 | -string | |
| 40 | * | if-feature | 7.18.2 | 0..n | -TODO | |
| 41 | * | max-elements | 7.7.4 | 0..1 | -int | |
| 42 | * | min-elements | 7.7.3 | 0..1 | -int | |
| 43 | * | must | 7.5.3 | 0..n | -TODO | |
| 44 | * | ordered-by | 7.7.5 | 0..1 | -TODO | |
| 45 | * | reference | 7.19.4 | 0..1 | -string | |
| 46 | * | status | 7.19.2 | 0..1 | -YangStatus | |
| 47 | * | type | 7.4 | 1 | -YangType | |
| 48 | * | units | 7.3.3 | 0..1 | -string | |
| 49 | * | when | 7.19.5 | 0..1 | -TODO | |
| 50 | * +--------------+---------+-------------+------------------+ |
| 51 | */ |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 52 | |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 53 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 54 | * Represents leaf-list data represented in YANG. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 55 | */ |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 56 | public class YangLeafList |
VinodKumarS-Huawei | d81eccb | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 57 | implements YangCommonInfo, Parsable, Cloneable { |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 58 | |
| 59 | /** |
| 60 | * Name of leaf-list. |
| 61 | */ |
| 62 | private String name; |
| 63 | |
| 64 | /** |
| 65 | * If the leaf-list is a config parameter. |
| 66 | */ |
Vidyashree Rama | f67c4ba | 2016-02-24 12:28:22 +0530 | [diff] [blame] | 67 | private Boolean isConfig; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 68 | |
| 69 | /** |
| 70 | * Description of leaf-list. |
| 71 | */ |
| 72 | private String description; |
| 73 | |
| 74 | /** |
| 75 | * Reference:RFC 6020. |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 76 | * |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 77 | * The "max-elements" statement, which is optional, takes as an argument a |
| 78 | * positive integer or the string "unbounded", which puts a constraint on |
| 79 | * valid list entries. A valid leaf-list or list always has at most |
| 80 | * max-elements entries. |
| 81 | * |
| 82 | * If no "max-elements" statement is present, it defaults to "unbounded". |
| 83 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 84 | private int maxElelements = Integer.MAX_VALUE; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 85 | |
| 86 | /** |
| 87 | * Reference:RFC 6020. |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 88 | * |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 89 | * The "min-elements" statement, which is optional, takes as an argument a |
| 90 | * non-negative integer that puts a constraint on valid list entries. A |
| 91 | * valid leaf-list or list MUST have at least min-elements entries. |
| 92 | * |
| 93 | * If no "min-elements" statement is present, it defaults to zero. |
| 94 | * |
| 95 | * The behavior of the constraint depends on the type of the leaf-list's or |
| 96 | * list's closest ancestor node in the schema tree that is not a non- |
| 97 | * presence container: |
| 98 | * |
| 99 | * o If this ancestor is a case node, the constraint is enforced if any |
| 100 | * other node from the case exists. |
| 101 | * |
| 102 | * o Otherwise, it is enforced if the ancestor node exists. |
| 103 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 104 | private int minElements = 0; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 105 | |
| 106 | /** |
| 107 | * The textual reference to this leaf-list. |
| 108 | */ |
| 109 | private String reference; |
| 110 | |
| 111 | /** |
| 112 | * Status of the leaf-list in the YANG definition. |
| 113 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 114 | private YangStatusType status = YangStatusType.CURRENT; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 115 | |
| 116 | /** |
| 117 | * Textual units. |
| 118 | */ |
| 119 | private String units; |
| 120 | |
| 121 | /** |
| 122 | * Data type of leaf-list. |
| 123 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 124 | private YangType<?> dataType; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 125 | |
| 126 | /** |
VinodKumarS-Huawei | d81eccb | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 127 | * YANG Node in which the leaf is contained. |
| 128 | */ |
| 129 | YangLeavesHolder containedIn; |
| 130 | |
| 131 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 132 | * Creates a YANG leaf-list. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 133 | */ |
| 134 | public YangLeafList() { |
| 135 | } |
| 136 | |
| 137 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 138 | * Returns the leaf-list name. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 139 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 140 | * @return the leaf-list name |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 141 | */ |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 142 | public String getName() { |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 143 | return name; |
| 144 | } |
| 145 | |
| 146 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 147 | * Sets the leaf-list name. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 148 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 149 | * @param leafListName the leaf-list name to set |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 150 | */ |
| 151 | public void setLeafName(String leafListName) { |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 152 | name = leafListName; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 153 | } |
| 154 | |
| 155 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 156 | * Returns the config flag. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 157 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 158 | * @return the config flag |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 159 | */ |
Vidyashree Rama | f67c4ba | 2016-02-24 12:28:22 +0530 | [diff] [blame] | 160 | public Boolean isConfig() { |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 161 | return isConfig; |
| 162 | } |
| 163 | |
| 164 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 165 | * Sets the config flag. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 166 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 167 | * @param isCfg the config flag |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 168 | */ |
| 169 | public void setConfig(boolean isCfg) { |
| 170 | isConfig = isCfg; |
| 171 | } |
| 172 | |
| 173 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 174 | * Returns the description. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 175 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 176 | * @return the description |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 177 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 178 | @Override |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 179 | public String getDescription() { |
| 180 | return description; |
| 181 | } |
| 182 | |
| 183 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 184 | * Sets the description. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 185 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 186 | * @param description set the description |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 187 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 188 | @Override |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 189 | public void setDescription(String description) { |
| 190 | this.description = description; |
| 191 | } |
| 192 | |
| 193 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 194 | * Returns the max elements no. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 195 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 196 | * @return the max elements no |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 197 | */ |
| 198 | public int getMaxElelements() { |
| 199 | return maxElelements; |
| 200 | } |
| 201 | |
| 202 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 203 | * Sets the max elements no. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 204 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 205 | * @param maxElelements max elements no |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 206 | */ |
| 207 | public void setMaxElelements(int maxElelements) { |
| 208 | this.maxElelements = maxElelements; |
| 209 | } |
| 210 | |
| 211 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 212 | * Returns the min elements no. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 213 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 214 | * @return the min elements no |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 215 | */ |
| 216 | public int getMinElements() { |
| 217 | return minElements; |
| 218 | } |
| 219 | |
| 220 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 221 | * Sets the min elements no. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 222 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 223 | * @param minElements the min elements no |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 224 | */ |
| 225 | public void setMinElements(int minElements) { |
| 226 | this.minElements = minElements; |
| 227 | } |
| 228 | |
| 229 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 230 | * Returns the textual reference. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 231 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 232 | * @return the reference |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 233 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 234 | @Override |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 235 | public String getReference() { |
| 236 | return reference; |
| 237 | } |
| 238 | |
| 239 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 240 | * Sets the textual reference. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 241 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 242 | * @param reference the reference to set |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 243 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 244 | @Override |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 245 | public void setReference(String reference) { |
| 246 | this.reference = reference; |
| 247 | } |
| 248 | |
| 249 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 250 | * Returns the status. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 251 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 252 | * @return the status |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 253 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 254 | @Override |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 255 | public YangStatusType getStatus() { |
| 256 | return status; |
| 257 | } |
| 258 | |
| 259 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 260 | * Sets the status. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 261 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 262 | * @param status the status to set |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 263 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 264 | @Override |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 265 | public void setStatus(YangStatusType status) { |
| 266 | this.status = status; |
| 267 | } |
| 268 | |
| 269 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 270 | * Returns the units. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 271 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 272 | * @return the units |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 273 | */ |
| 274 | public String getUnits() { |
| 275 | return units; |
| 276 | } |
| 277 | |
| 278 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 279 | * Sets the units. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 280 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 281 | * @param units the units to set |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 282 | */ |
| 283 | public void setUnits(String units) { |
| 284 | this.units = units; |
| 285 | } |
| 286 | |
| 287 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 288 | * Returns the data type. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 289 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 290 | * @return the data type |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 291 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 292 | public YangType<?> getDataType() { |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 293 | return dataType; |
| 294 | } |
| 295 | |
| 296 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 297 | * Sets the data type. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 298 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 299 | * @param dataType the data type to set |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 300 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 301 | public void setDataType(YangType<?> dataType) { |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 302 | this.dataType = dataType; |
| 303 | } |
| 304 | |
| 305 | /** |
VinodKumarS-Huawei | d81eccb | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 306 | * Retrieves the YANG node in which the leaf is defined. |
| 307 | * |
| 308 | * @return the YANG node in which the leaf is defined |
| 309 | */ |
| 310 | public YangLeavesHolder getContainedIn() { |
| 311 | return containedIn; |
| 312 | } |
| 313 | |
| 314 | /** |
| 315 | * Assigns the YANG node in which the leaf is defined. |
| 316 | * |
| 317 | * @param containedIn the YANG node in which the leaf is defined |
| 318 | */ |
| 319 | public void setContainedIn(YangLeavesHolder containedIn) { |
| 320 | this.containedIn = containedIn; |
| 321 | } |
| 322 | |
| 323 | @Override |
| 324 | public YangLeafList clone() |
| 325 | throws CloneNotSupportedException { |
| 326 | return (YangLeafList) super.clone(); |
| 327 | } |
| 328 | |
| 329 | /** |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 330 | * Returns the type of the parsed data. |
| 331 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 332 | * @return returns LEAF_LIST_DATA |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 333 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 334 | @Override |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 335 | public YangConstructType getYangConstructType() { |
| 336 | return YangConstructType.LEAF_LIST_DATA; |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 337 | } |
| 338 | |
| 339 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 340 | * Validates the data on entering the corresponding parse tree node. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 341 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 342 | * @throws DataModelException a violation of data model rules |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 343 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 344 | @Override |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 345 | public void validateDataOnEntry() |
| 346 | throws DataModelException { |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 347 | // TODO auto-generated method stub, to be implemented by parser |
| 348 | |
| 349 | } |
| 350 | |
| 351 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 352 | * Validates the data on exiting the corresponding parse tree node. |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 353 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 354 | * @throws DataModelException a violation of data model rules |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 355 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 356 | @Override |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 357 | public void validateDataOnExit() |
| 358 | throws DataModelException { |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 359 | // TODO auto-generated method stub, to be implemented by parser |
| 360 | |
| 361 | } |
| 362 | } |