blob: d73a0d6e948985d7e37c6a6fe311688a89e4e23d [file] [log] [blame]
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301/*
Brian O'Connor0f7908b2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Bharat saraswaldedf9f82016-02-12 20:48:30 +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 */
16
17package org.onosproject.yangutils.utils;
18
Vinod Kumar S9f26ae52016-03-23 15:30:27 +053019import java.io.File;
b.jananie6d43af2016-03-04 12:29:05 +053020import java.util.Arrays;
21import java.util.List;
22
Bharat saraswaldedf9f82016-02-12 20:48:30 +053023/**
Bharat saraswal63f26fb2016-04-05 15:13:44 +053024 * Represents utilities constants which are used while generating java files.
Bharat saraswaldedf9f82016-02-12 20:48:30 +053025 */
26public final class UtilConstants {
27
28 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +053029 * JavaDocs for impl class.
Bharat saraswaldedf9f82016-02-12 20:48:30 +053030 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053031 public static final String IMPL_CLASS_JAVA_DOC =
32 " * Represents the implementation of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +053033
34 /**
35 * JavaDocs for builder class.
36 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053037 public static final String BUILDER_CLASS_JAVA_DOC =
38 " * Represents the builder implementation of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +053039
40 /**
41 * JavaDocs for interface class.
42 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053043 public static final String INTERFACE_JAVA_DOC =
44 " * Abstraction of an entity which represents the functionality " +
45 "of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +053046
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +053047 /**
48 * JavaDocs for event.
49 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053050 public static final String EVENT_JAVA_DOC =
51 " * Represents event implementation of ";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +053052
53 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +053054 * JavaDocs for op param class.
55 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053056 public static final String OP_PARAM_JAVA_DOC =
57 " * Represents operation parameter implementation of ";
Shankara-Huaweia1039e52016-07-14 16:53:09 +053058
59 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +053060 * JavaDocs for event listener.
61 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053062 public static final String EVENT_LISTENER_JAVA_DOC =
63 " * Abstraction for event listener of ";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +053064
Bharat saraswald532a4c2016-03-25 18:19:46 +053065 /**
66 * JavaDocs for builder interface class.
67 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +053068 public static final String BUILDER_INTERFACE_JAVA_DOC = " * Builder for ";
Bharat saraswald532a4c2016-03-25 18:19:46 +053069
70 /**
Bharat saraswal68fa0d12016-04-19 01:00:16 +053071 * JavaDocs for enum class.
72 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053073 public static final String ENUM_CLASS_JAVADOC =
74 " * Represents ENUM data of ";
Bharat saraswal68fa0d12016-04-19 01:00:16 +053075
76 /**
77 * JavaDocs for enum attribute.
78 */
79 public static final String ENUM_ATTRIBUTE_JAVADOC = " * Represents ";
80
81 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +053082 * JavaDocs for package info class.
83 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053084 public static final String PACKAGE_INFO_JAVADOC =
85 " * Implementation of YANG node ";
Bharat saraswal68fa0d12016-04-19 01:00:16 +053086
87 /**
88 * JavaDocs for package info class.
89 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +053090 public static final String PACKAGE_INFO_JAVADOC_OF_CHILD =
91 "'s children nodes";
Bharat saraswald532a4c2016-03-25 18:19:46 +053092
93 /**
94 * JavaDocs's first line.
95 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +053096 public static final String JAVA_DOC_FIRST_LINE = "/**\n";
Bharat saraswald532a4c2016-03-25 18:19:46 +053097
98 /**
99 * JavaDocs's last line.
100 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530101 public static final String JAVA_DOC_END_LINE = " */\n";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530102
103 /**
104 * JavaDocs's param annotation.
105 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530106 public static final String JAVA_DOC_PARAM = " * @param ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530107
108 /**
109 * JavaDocs's return annotation.
110 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530111 public static final String JAVA_DOC_RETURN = " * @return ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530112
113 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530114 * JavaDocs's description for setter method.
115 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530116 public static final String JAVA_DOC_SETTERS =
117 " * Returns the builder object of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530118
119 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530120 * JavaDocs's description for add to list method.
121 */
122 public static final String JAVA_DOC_ADD_TO_LIST = " * Adds to the list of ";
123
124 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +0530125 * JavaDocs's description for setter method.
126 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530127 public static final String JAVA_DOC_MANAGER_SETTERS =
128 " * Sets the value to attribute ";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +0530129
130 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530131 * JavaDocs's description for OF method.
132 */
b.jananie6d43af2016-03-04 12:29:05 +0530133 public static final String JAVA_DOC_OF = " * Returns the object of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530134
135 /**
136 * JavaDocs's description for typedef' setter method.
137 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530138 public static final String JAVA_DOC_SETTERS_COMMON =
139 " * Sets the value of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530140
141 /**
142 * JavaDocs's description for getter method.
143 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530144 public static final String JAVA_DOC_GETTERS = " * Returns the attribute ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530145
146 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530147 * JavaDocs's description for getter method.
148 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530149 public static final String JAVA_DOC_FOR_VALIDATOR =
150 " * Validates if value is in given range.";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530151
152 /**
153 * JavaDocs's description for getter method.
154 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530155 public static final String JAVA_DOC_FOR_VALIDATOR_RETURN =
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530156 " true if value is in range";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530157
158 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530159 * JavaDocs's description for constructor.
160 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530161 public static final String JAVA_DOC_CONSTRUCTOR =
162 " * Creates an instance of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530163
164 /**
165 * JavaDocs's description for build method.
166 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530167 public static final String JAVA_DOC_BUILD = " * Builds object of ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530168
169 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530170 * JavaDocs's return statement for build method.
171 */
172 public static final String JAVA_DOC_BUILD_RETURN = "object of ";
173
174 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530175 * JavaDocs's statement for builder object.
176 */
177 public static final String BUILDER_OBJECT = "builder object of ";
178
179 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530180 * JavaDocs's statement for rpc method.
181 */
182 public static final String JAVA_DOC_RPC = " * Service interface of ";
183
184 /**
185 * JavaDocs's statement for rpc's input string.
186 */
187 public static final String RPC_INPUT_STRING = "input of service interface ";
188
189 /**
190 * JavaDocs's statement for rpc's output string.
191 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530192 public static final String RPC_OUTPUT_STRING =
193 "output of service interface ";
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530194
195 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530196 * Static attribute for new line.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530197 */
198 public static final String NEW_LINE = "\n";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530199
200 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530201 * Static attribute for default.
202 */
203 public static final String DEFAULT = "default";
204
205 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530206 * Static attribute for default.
207 */
208 public static final String DEFAULT_CAPS = "Default";
209
210 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530211 * Static attribute for java code generation for sbi.
212 */
213 public static final String SBI = "sbi";
214
215 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530216 * Static attribute for multiple new line.
217 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530218 public static final String MULTIPLE_NEW_LINE = "\n\n";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530219
220 /**
221 * Static attribute for empty line.
222 */
b.jananie6d43af2016-03-04 12:29:05 +0530223 public static final String EMPTY_STRING = "";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530224
225 /**
226 * Static attribute for new line with asterisk.
227 */
228 public static final String NEW_LINE_ASTERISK = " *\n";
229
230 /**
231 * Static attribute for period.
232 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530233 public static final String PERIOD = ".";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530234
235 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530236 * Static attribute for compare to.
237 */
238 public static final String COMPARE_TO = "compareTo";
239
240 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530241 * Static attribute for period.
242 */
243 public static final String INVOKE = "invoke";
244
245 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530246 * Static attribute for parse byte.
247 */
248 public static final String PARSE_BYTE = "parseByte";
249
250 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530251 * Static attribute for parse boolean.
252 */
253 public static final String PARSE_BOOLEAN = "parseBoolean";
254
255 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530256 * Static attribute for parse short.
257 */
258 public static final String PARSE_SHORT = "parseShort";
259
260 /**
261 * Static attribute for parse int.
262 */
263 public static final String PARSE_INT = "parseInt";
264
265 /**
266 * Static attribute for parse long.
267 */
268 public static final String PARSE_LONG = "parseLong";
269
270 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530271 * Static attribute for base64.
272 */
273 public static final String BASE64 = "Base64";
274
275 /**
276 * Static attribute for getEncoder.
277 */
278 public static final String GET_ENCODER = "getEncoder";
279
280 /**
281 * Static attribute for encodeToString.
282 */
283 public static final String ENCODE_TO_STRING = "encodeToString";
284
285 /**
286 * Static attribute for getDecoder.
287 */
288 public static final String GET_DECODER = "getDecoder";
289
290 /**
291 * Static attribute for decode.
292 */
293 public static final String DECODE = "decode";
294
295 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530296 * Static attribute for omit null value.
297 */
298 public static final String OMIT_NULL_VALUE_STRING = "omitNullValues()";
299
300 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530301 * Static attribute for underscore.
302 */
b.jananie6d43af2016-03-04 12:29:05 +0530303 public static final String UNDER_SCORE = "_";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530304
305 /**
306 * Static attribute for semi-colan.
307 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530308 public static final String SEMI_COLON = ";";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530309
310 /**
311 * Static attribute for hyphen.
312 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530313 public static final String HYPHEN = "-";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530314
315 /**
316 * Static attribute for space.
317 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530318 public static final String SPACE = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530319
320 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530321 * Static attribute for isSelectAllSchemaChild.
322 */
323 public static final String SELECT_ALL_CHILD = "isSelectAllSchemaChild";
324
325 /**
Bharat saraswal748fc3c2016-09-06 16:38:20 +0530326 * Static attribute for schema name.
327 */
328 public static final String SCHEMA_NAME = "schemaName";
329
330 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530331 * Static attribute for schema name value.
332 */
333 public static final String STR_VAL = "stringValue";
334
335 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530336 * Static attribute for validateRange.
337 */
338 public static final String VALIDATE_RANGE = "validateRange";
339
340 /**
341 * Static attribute for minRange.
342 */
343 public static final String MIN_RANGE = "minRange";
344
345 /**
346 * Static attribute for maxRange.
347 */
348 public static final String MAX_RANGE = "maxRange";
349
350 /**
351 * Static attribute for minRange.
352 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530353 public static final String SHORT_MIN_RANGE_ATTR =
354 "static final int INT16_MIN_RANGE = -32768;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530355
356 /**
357 * Static attribute for minRange.
358 */
359 public static final String SHORT_MIN_RANGE = "INT16_MIN_RANGE";
360
361 /**
362 * Static attribute for minRange.
363 */
364 public static final String SHORT_MAX_RANGE = "INT16_MAX_RANGE";
365
366 /**
367 * Static attribute for maxRange.
368 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530369 public static final String SHORT_MAX_RANGE_ATTR =
370 "static final int INT16_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530371
372
373 /**
374 * Static attribute for minRange.
375 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530376 public static final String UINT8_MIN_RANGE_ATTR =
377 "static final int UINT8_MIN_RANGE = 0;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530378
379 /**
380 * Static attribute for maxRange.
381 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530382 public static final String UINT8_MAX_RANGE_ATTR =
383 "static final int UINT8_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530384
385
386 /**
387 * Static attribute for minRange.
388 */
389 public static final String UINT8_MIN_RANGE = "UINT8_MIN_RANGE";
390
391 /**
392 * Static attribute for maxRange.
393 */
394 public static final String UINT8_MAX_RANGE = "UINT8_MAX_RANGE";
395
396 /**
397 * Static attribute for minRange.
398 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530399 public static final String INT_MIN_RANGE_ATTR =
400 "static final int INT32_MIN_RANGE = -2147483648;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530401
402 /**
403 * Static attribute for minRange.
404 */
405 public static final String INT_MIN_RANGE = "INT32_MIN_RANGE";
406
407 /**
408 * Static attribute for minRange.
409 */
410 public static final String INT_MAX_RANGE = "INT32_MAX_RANGE";
411
412 /**
413 * Static attribute for maxRange.
414 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530415 public static final String INT_MAX_RANGE_ATTR =
416 "static final int INT32_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530417
418
419 /**
420 * Static attribute for minRange.
421 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530422 public static final String UINT_MIN_RANGE_ATTR =
423 "static final int UINT16_MIN_RANGE = 0;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530424
425 /**
426 * Static attribute for maxRange.
427 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530428 public static final String UINT_MAX_RANGE_ATTR =
429 "static final int UINT16_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530430
431
432 /**
433 * Static attribute for minRange.
434 */
435 public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE";
436
437 /**
438 * Static attribute for maxRange.
439 */
440 public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE";
441
442 /**
443 * Static attribute for minRange.
444 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530445 public static final String LONG_MIN_RANGE_ATTR =
446 "static final BigInteger INT64_MIN_RANGE =" +
447 " new BigInteger(\"-9223372036854775808\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530448
449 /**
450 * Static attribute for maxRange.
451 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530452 public static final String LONG_MAX_RANGE_ATTR =
453 "static final BigInteger INT64_MAX_RANGE =" +
454 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530455
456 /**
457 * Static attribute for minRange.
458 */
459 public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE";
460
461 /**
462 * Static attribute for maxRange.
463 */
464 public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE";
465
466 /**
467 * Static attribute for minRange.
468 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530469 public static final String ULONG_MIN_RANGE_ATTR =
470 "static final BigInteger UINT32_MIN_RANGE =" +
471 " new BigInteger(\"0\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530472
473 /**
474 * Static attribute for maxRange.
475 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530476 public static final String ULONG_MAX_RANGE_ATTR =
477 "static final BigInteger UINT32_MAX_RANGE =" +
478 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530479
480
481 /**
482 * Static attribute for minRange.
483 */
484 public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE";
485
486 /**
487 * Static attribute for maxRange.
488 */
489 public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE";
490
491 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530492 * Static attribute for subject.
493 */
494 public static final String SUBJECT = "Subject";
495
496 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530497 * Static attribute for ListenerRegistry.
498 */
499 public static final String LISTENER_REG = "ListenerRegistry";
500
501 /**
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530502 * Static attribute for ListenerService.
503 */
504 public static final String LISTENER_SERVICE = "ListenerService";
505
506 /**
507 * Static attribute for listener package.
508 */
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530509 public static final String ONOS_EVENT_PKG = "org.onosproject.event";
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530510
511 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +0530512 * Static attribute for colon.
513 */
514 public static final String COLON = ":";
515
516 /**
517 * Static attribute for caret.
518 */
519 public static final String CARET = "^";
520
521 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530522 * Static attribute for input string.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530523 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530524 public static final String INPUT = "input";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530525
526 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530527 * Static attribute for output string.
528 */
529 public static final String OUTPUT = "output";
530
531 /**
532 * Static attribute for current string.
533 */
534 public static final String CURRENT = "current";
535
536 /**
janani bb08850e2016-05-17 18:20:33 +0530537 * Static attribute for leafref string.
538 */
539 public static final String LEAFREF = "leafref";
540
541 /**
542 * Static attribute for identityref string.
543 */
544 public static final String IDENTITYREF = "identityref";
545
546 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530547 * Static attribute for output variable of rpc.
548 */
549 public static final String RPC_INPUT_VAR_NAME = "inputVar";
550
551 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530552 * Static attribute for new line.
553 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530554 public static final String EQUAL = "=";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530555
556 /**
557 * Static attribute for slash syntax.
558 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530559 public static final String SLASH = File.separator;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530560
561 /**
562 * Static attribute for add syntax.
563 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530564 public static final String ADD = "+";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530565
566 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530567 * Static attribute for single quote.
568 */
569 public static final String SINGLE_QUOTE = "\'";
570
571 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530572 * Static attribute for quotes.
573 */
b.jananie6d43af2016-03-04 12:29:05 +0530574 public static final String QUOTES = "\"";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530575
576 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530577 * Static attribute for zero.
578 */
579 public static final String ZERO = "0";
580
581 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530582 * Static attribute for ampersand.
583 */
b.jananie6d43af2016-03-04 12:29:05 +0530584 public static final String AND = "&";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530585
586 /**
587 * Static attribute for comma.
588 */
b.jananie6d43af2016-03-04 12:29:05 +0530589 public static final String COMMA = ",";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530590
591 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +0530592 * Static attribute for class.
593 */
594 public static final String CLASS_STRING = "Class";
595
596 /**
597 * Static attribute for put.
598 */
599 public static final String PUT = "put";
600
601 /**
602 * Static attribute for get.
603 */
604 public static final String GET = "get";
605
606 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530607 * Static attribute for slash character.
608 */
609 public static final char CHAR_OF_SLASH = '/';
610
611 /**
612 * Static attribute for open square bracket character.
613 */
614 public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '[';
615
616 /**
617 * Static attribute for close square bracket character.
618 */
619 public static final char CHAR_OF_CLOSE_SQUARE_BRACKET = ']';
620
621 /**
622 * Static attribute for slash string.
623 */
624 public static final String SLASH_FOR_STRING = "/";
625
626 /**
627 * Static attribute for open square bracket.
628 */
629 public static final String OPEN_SQUARE_BRACKET = "[";
630
631 /**
632 * Static attribute for ancestor accessor.
633 */
634 public static final String ANCESTOR_ACCESSOR = "..";
635
636 /**
637 * Static attribute for ancestor accessor along with path.
638 */
639 public static final String ANCESTOR_ACCESSOR_IN_PATH = "../";
640
641 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530642 * Static attribute for add syntax.
643 */
b.jananie6d43af2016-03-04 12:29:05 +0530644 public static final String ADD_STRING = "add";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530645
646 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530647 * Static attribute for string replace syntax.
648 */
649 public static final String REPLACE_STRING = "replace";
650
651 /**
652 * Static attribute for string trim syntax.
653 */
654 public static final String TRIM_STRING = "trim";
655
656 /**
657 * Static attribute for string split syntax.
658 */
659 public static final String SPLIT_STRING = "split";
660
661 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530662 * Static attribute for Pattern.
663 */
664 public static final String PATTERN = "Pattern";
665
666 /**
667 * Static attribute for Quote.
668 */
669 public static final String QUOTE_STRING = "quote";
670
671 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530672 * Static attribute for from syntax.
673 */
674 public static final String FROM_STRING_METHOD_NAME = "fromString";
675
676 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530677 * Static attribute for check not null syntax.
678 */
b.jananie6d43af2016-03-04 12:29:05 +0530679 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530680
681 /**
682 * Static attribute for hash code syntax.
683 */
b.jananie6d43af2016-03-04 12:29:05 +0530684 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530685
686 /**
687 * Static attribute for equals syntax.
688 */
b.jananie6d43af2016-03-04 12:29:05 +0530689 public static final String EQUALS_STRING = "equals";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530690
691 /**
692 * Static attribute for object.
693 */
b.jananie6d43af2016-03-04 12:29:05 +0530694 public static final String OBJECT_STRING = "Object";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530695
696 /**
697 * Static attribute for instance of syntax.
698 */
b.jananie6d43af2016-03-04 12:29:05 +0530699 public static final String INSTANCE_OF = " instanceof ";
700
Bharat saraswald532a4c2016-03-25 18:19:46 +0530701 /**
702 * Static attribute for value syntax.
703 */
b.jananie6d43af2016-03-04 12:29:05 +0530704 public static final String VALUE = "value";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530705
706 /**
707 * Static attribute for suffix s.
708 */
Bharat saraswal84366c52016-03-23 19:40:35 +0530709 public static final String SUFFIX_S = "s";
b.jananie6d43af2016-03-04 12:29:05 +0530710
Bharat saraswald532a4c2016-03-25 18:19:46 +0530711 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530712 * Static attribute for string builder var.
713 */
714 public static final String STRING_BUILDER_VAR = "sBuild";
715 /**
716 * Static attribute for string builder var.
717 */
718 public static final String APPEND = "append";
719
720 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530721 * Static attribute for if.
722 */
b.jananie6d43af2016-03-04 12:29:05 +0530723 public static final String IF = "if";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530724
725 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530726 * Static attribute for else-if.
727 */
728 public static final String ELSE_IF = "else if";
729
730 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530731 * Static attribute for of.
732 */
b.jananie6d43af2016-03-04 12:29:05 +0530733 public static final String OF = "of";
Bharat saraswal94844d62016-10-13 13:28:03 +0530734 /**
735 * Static attribute for of.
736 */
737 public static final String OF_CAPS = "Of";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530738
739 /**
740 * Static attribute for other.
741 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530742 public static final String OTHER = "other";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530743
744 /**
745 * Static attribute for obj syntax.
746 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530747 public static final String OBJ = "obj";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530748
749 /**
750 * Static attribute for hash syntax.
751 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530752 public static final String HASH = "hash";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530753
754 /**
755 * Static attribute for to syntax.
756 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530757 public static final String TO = "to";
b.jananie6d43af2016-03-04 12:29:05 +0530758
Bharat saraswald532a4c2016-03-25 18:19:46 +0530759 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530760 * Static attribute for to syntax.
761 */
762 public static final String TO_CAPS = "To";
763
764 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530765 * Static attribute for true syntax.
766 */
b.jananie6d43af2016-03-04 12:29:05 +0530767 public static final String TRUE = "true";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530768
769 /**
770 * Static attribute for false syntax.
771 */
b.jananie6d43af2016-03-04 12:29:05 +0530772 public static final String FALSE = "false";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530773
774 /**
775 * Static attribute for org.
776 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530777 public static final String ORG = "org";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530778
779 /**
780 * Static attribute for temp.
781 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530782 public static final String TEMP = "Temp";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530783
784 /**
785 * Static attribute for YANG file directory.
786 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530787 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530788
789 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530790 * Static attribute for diamond close bracket syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530791 */
792 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530793
794 /**
795 * Static attribute for diamond close bracket syntax.
796 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530797 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530798
799 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530800 * Static attribute for event type.
801 */
802 public static final String EVENT_TYPE = ".Type";
803
804 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530805 * Static attribute for exception syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530806 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530807 public static final String EXCEPTION = "Exception";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530808
809 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530810 * Static attribute for exception variable syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530811 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530812 public static final String EXCEPTION_VAR = "e";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530813
814 /**
815 * Static attribute for open parenthesis syntax.
816 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530817 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530818
819 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530820 * Static attribute for switch syntax.
821 */
822 public static final String SWITCH = "switch";
823
824 /**
825 * Static attribute for case syntax.
826 */
827 public static final String CASE = "case";
828
829 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530830 * Static attribute for temp val syntax.
831 */
832 public static final String TMP_VAL = "tmpVal";
833
834 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530835 * Static attribute for close curly bracket syntax.
836 */
837 public static final String ELSE = "else";
838
839 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530840 * From string parameter name.
841 */
842 public static final String FROM_STRING_PARAM_NAME = "valInString";
843
844 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530845 * Static attribute for close parenthesis syntax.
846 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530847 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530848
849 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530850 * Static attribute for empty parameter function call.
851 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530852 public static final String OPEN_CLOSE_BRACKET_STRING = "()";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530853
854 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530855 * Static attribute for empty parameter function call.
856 */
857 public static final String OPEN_CLOSE_DIAMOND_STRING = "<>";
858
859 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530860 * Static attribute for open curly bracket syntax.
861 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530862 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530863
864 /**
865 * Static attribute for close curly bracket syntax.
866 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530867 public static final String CLOSE_CURLY_BRACKET = "}";
868
869 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +0530870 * Static attribute for square brackets syntax.
871 */
872 public static final String SQUARE_BRACKETS = "[]";
873
874 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530875 * Static attribute for getter method prefix.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530876 */
877 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530878
879 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530880 * Static attribute for getter method prefix.
881 */
882 public static final String GET_METHOD = "getMethod";
883
884 /**
885 * Static attribute for getter method prefix.
886 */
887 public static final String GET_CLASS = "getClass()";
888
889 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530890 * Static attribute for setter method prefix.
891 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530892 public static final String SET_METHOD_PREFIX = "set";
893
894 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530895 * Static attribute for get filter leaf flags.
896 */
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530897 public static final String GET_VALUE_LEAF_FLAGS = "getValueLeafFlags";
898
899 /**
900 * Static attribute for get select filter leaf flags.
901 */
902 public static final String GET_SELECT_LEAF_FLAGS = "getSelectLeafFlags";
903
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530904
905 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530906 * Static attribute for getLeafIndex.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530907 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530908 public static final String GET_LEAF_INDEX = "getLeafIndex()";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530909
910 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530911 * Static attribute for op param.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530912 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530913 public static final String OP_PARAM = "OpParam";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530914
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530915
916 /**
917 * Static attribute for is filter content match method prefix.
918 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530919 public static final String PROCESS_SUBTREE_FILTERING =
920 "processSubtreeFiltering";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530921
922 /**
923 * variable name of the subtree filtering result builder.
924 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530925 public static final String SUBTREE_FILTERING_RESULT_BUILDER =
926 "subTreeFilteringResultBuilder";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530927
928 /**
929 * variable name of the subtree filtering result flag.
930 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530931 public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG =
932 "isAnySelectOrContainmentNode";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530933
934 /**
935 * variable name of the subtree filtering to select all child.
936 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530937 public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG =
938 "isSelectAllSchemaChild";
Bharat saraswal8beac342016-08-04 02:00:03 +0530939
940 /**
941 * Static attribute for break prefix.
942 */
943 public static final String BREAK = "break";
944
945 /**
946 * Static attribute for break prefix.
947 */
948 public static final String IS_EMPTY = "isEmpty()";
949
950 /**
951 * Static attribute for is isLeafValueSet method prefix.
952 */
953 public static final String VALUE_LEAF_SET = "isLeafValueSet";
954
955 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530956 * Static attribute for is valueLeafFlags method prefix.
957 */
958 public static final String VALUE_LEAF = "valueLeafFlags";
959
960 /**
961 * Static attribute for is selectLeafFlags method prefix.
962 */
963 public static final String SELECT_LEAF = "selectLeafFlags";
964
965 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530966 * Static attribute for is isSelectLeaf method prefix.
967 */
968 public static final String IS_SELECT_LEAF = "isSelectLeaf";
969
970 /**
971 * Static attribute for is selectLeaf method prefix.
972 */
973 public static final String SET_SELECT_LEAF = "selectLeaf";
974
975 /**
976 * Static attribute for is LeafIdentifier enum prefix.
977 */
978 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530979 /**
980 * Static attribute for is leaf.
981 */
982 public static final String LEAF = "leaf";
Bharat saraswal8beac342016-08-04 02:00:03 +0530983
984 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530985 * Static attribute for four space indentation.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530986 */
987 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530988
989 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530990 * Static attribute for not syntax.
991 */
992 public static final String NOT = "!";
993
994 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530995 * Static attribute for try syntax.
996 */
997 public static final String TRY = "try";
998
999 /**
1000 * Static attribute for catch syntax.
1001 */
1002 public static final String CATCH = "catch";
1003
1004 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301005 * Static attribute for eight space indentation.
1006 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301007 public static final String EIGHT_SPACE_INDENTATION =
1008 FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301009
1010 /**
1011 * Static attribute for twelve space indentation.
1012 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301013 public static final String TWELVE_SPACE_INDENTATION =
1014 EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301015
1016 /**
1017 * Static attribute for sixteen space indentation.
1018 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301019 public static final String SIXTEEN_SPACE_INDENTATION =
1020 TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301021
1022 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301023 * Static attribute for twenty space indentation.
1024 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301025 public static final String TWENTY_SPACE_INDENTATION =
1026 SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal8beac342016-08-04 02:00:03 +05301027
1028 /**
1029 * Static attribute for twenty four space indentation.
1030 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301031 public static final String TWENTY_FOUR_SPACE_INDENTATION =
1032 TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301033
1034 /**
1035 * Static attribute for twenty eight space indentation.
1036 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301037 public static final String TWENTY_EIGHT_SPACE_INDENTATION =
1038 TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301039
1040 /**
1041 * Static attribute for thirty two space indentation.
1042 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301043 public static final String THIRTY_TWO_SPACE_INDENTATION =
1044 TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301045
1046 /**
1047 * continue.
1048 */
1049 public static final String CONTINUE = "continue";
Bharat saraswal8beac342016-08-04 02:00:03 +05301050
1051 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301052 * Static attribute for generated code path.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301053 */
Bharat saraswal5600f0f2016-03-09 18:34:56 +05301054 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301055
1056 /**
1057 * Static attribute for base package.
1058 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301059 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301060
1061 /**
1062 * Static attribute for YANG date prefix.
1063 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301064 public static final String REVISION_PREFIX = "rev";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301065
1066 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301067 * Static attribute for YANG automatic prefix for identifiers with keywords
1068 * and beginning with digits.
janani b1c6acc42016-04-15 16:18:30 +05301069 */
1070 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
1071
1072 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301073 * Static attribute for YANG version prefix.
Bharat saraswald532a4c2016-03-25 18:19:46 +05301074 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301075 public static final String VERSION_PREFIX = "v";
1076
1077 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301078 * Static attribute for private modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301079 */
1080 public static final String PRIVATE = "private";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301081
1082 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301083 * Static attribute for public modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301084 */
Bharat saraswald532a4c2016-03-25 18:19:46 +05301085 public static final String PUBLIC = "public";
1086
1087 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301088 * Static attribute for abstract modifier.
1089 */
1090 public static final String ABSTRACT = "abstract";
1091
1092 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301093 * Static attribute for protected modifier.
1094 */
1095 public static final String PROTECTED = "protected";
1096
1097 /**
Vinod Kumar S08710982016-03-03 19:55:30 +05301098 * Void java type.
1099 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301100 public static final String VOID = "void";
Vinod Kumar S08710982016-03-03 19:55:30 +05301101
1102 /**
1103 * String built in java type.
1104 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301105 public static final String STRING_DATA_TYPE = "String";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301106
Vinod Kumar S08710982016-03-03 19:55:30 +05301107 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301108 * String built in java type.
1109 */
1110 public static final String STRING_BUILDER = "StringBuilder";
1111 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301112 * Java.lang.* packages.
Vinod Kumar S08710982016-03-03 19:55:30 +05301113 */
1114 public static final String JAVA_LANG = "java.lang";
1115
1116 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301117 * Java.math.* packages.
1118 */
1119 public static final String JAVA_MATH = "java.math";
1120
1121 /**
1122 * Boolean built in java type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301123 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301124 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar S08710982016-03-03 19:55:30 +05301125
1126 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301127 * BigInteger built in java type.
1128 */
1129 public static final String BIG_INTEGER = "BigInteger";
1130
1131 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301132 * BigDecimal built in java type.
1133 */
1134 public static final String BIG_DECIMAL = "BigDecimal";
1135
1136 /**
1137 * BitSet built in java type.
1138 */
1139 public static final String BIT_SET = "BitSet";
1140
1141 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301142 * Augment map type.
1143 */
1144 public static final String AUGMENT_MAP_TYPE = "Map<Class<?>, Object>";
1145
1146 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301147 * Byte java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301148 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301149 public static final String BYTE = "byte";
Vinod Kumar S08710982016-03-03 19:55:30 +05301150
1151 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301152 * Short java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301153 */
1154 public static final String SHORT = "short";
1155
1156 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301157 * Int java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301158 */
1159 public static final String INT = "int";
1160
1161 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301162 * Long java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301163 */
1164 public static final String LONG = "long";
1165
1166 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301167 * Double java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301168 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301169 public static final String DOUBLE = "double";
1170
1171 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301172 * Boolean built in java wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301173 */
1174 public static final String BOOLEAN_WRAPPER = "Boolean";
1175
1176 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301177 * Byte java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301178 */
1179 public static final String BYTE_WRAPPER = "Byte";
1180
1181 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301182 * Short java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301183 */
1184 public static final String SHORT_WRAPPER = "Short";
1185
1186 /**
1187 * Integer java built in wrapper type.
1188 */
1189 public static final String INTEGER_WRAPPER = "Integer";
1190
1191 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301192 * Long java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301193 */
1194 public static final String LONG_WRAPPER = "Long";
1195
1196 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301197 * Static variable for question mark.
Vinod Kumar S08710982016-03-03 19:55:30 +05301198 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301199 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301200
1201 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301202 * Static variable for forType string.
1203 */
1204 public static final String FOR_TYPE_STRING = " for type ";
1205
1206 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301207 * List of keywords in java, this is used for checking if the input does not
1208 * contain these keywords.
b.jananie6d43af2016-03-04 12:29:05 +05301209 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301210 public static final List<String> JAVA_KEY_WORDS =
1211 Arrays.asList("abstract", "assert", "boolean", "break", "byte",
1212 "case", "catch", "char", "class", "const", "continue",
1213 "default", "do", "double", "else", "extends", "false",
1214 "final", "finally", "float", "for", "goto", "if",
1215 "implements", "import", "instanceof", "enum", "int",
1216 "interface", "long", "native", "new", "null",
1217 "package", "private", "protected", "public", "return",
1218 "short", "static", "strictfp", "super", "switch",
1219 "synchronized", "this", "throw", "throws", "transient",
1220 "true", "try", "void", "volatile", "while");
b.jananie6d43af2016-03-04 12:29:05 +05301221
1222 /**
janani b1c6acc42016-04-15 16:18:30 +05301223 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301224 */
janani b1c6acc42016-04-15 16:18:30 +05301225 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1226
1227 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301228 * Static attribute for regex for three special characters used in
1229 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301230 */
1231 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1232
1233 /**
1234 * Static attribute for regex for period.
1235 */
1236 public static final String REGEX_FOR_PERIOD = "[.]";
1237
1238 /**
1239 * Static attribute for regex for underscore.
1240 */
1241 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1242
1243 /**
1244 * Static attribute for regex for hyphen.
1245 */
1246 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301247
1248 /**
1249 * Static attribute for regex for digits.
1250 */
b.jananie6d43af2016-03-04 12:29:05 +05301251 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1252
1253 /**
janani b703cfe42016-05-17 13:12:22 +05301254 * Static attribute for regex with digits.
1255 */
1256 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1257
1258 /**
janani b1c6acc42016-04-15 16:18:30 +05301259 * Static attribute for regex for single letter.
1260 */
1261 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1262
1263 /**
1264 * Static attribute for regex for digits with single letter.
1265 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301266 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1267 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301268
1269 /**
janani b703cfe42016-05-17 13:12:22 +05301270 * Static attribute for regex with uppercase.
1271 */
1272 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1273
1274 /**
1275 * Static attribute for regex for single capital case letter.
1276 */
1277 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1278
1279 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301280 * Static attribute for regex for capital case letter with any number of
1281 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301282 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301283 public static final String
1284 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1285 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301286
1287 /**
janani b3e357f62016-05-19 17:39:50 +05301288 * Static attribute for regex for any string ending with service.
1289 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301290 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1291 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301292
1293 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301294 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301295 */
1296 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301297
1298 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301299 * Static attribute for builder syntax.
1300 */
1301 public static final String BUILDER = "Builder";
1302
1303 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301304 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301305 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301306 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301307
1308 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301309 * Static attribute for manager syntax.
1310 */
1311 public static final String MANAGER = "Manager";
1312
1313 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301314 * Static attribute for service syntax.
1315 */
1316 public static final String SERVICE = "Service";
1317
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301318 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301319 * Static attribute for interface syntax.
1320 */
1321 public static final String INTERFACE = "interface";
1322
1323 /**
1324 * Static attribute for enum syntax.
1325 */
1326 public static final String ENUM = "enum";
1327
1328 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301329 * Static attribute for type syntax.
1330 */
1331 public static final String TYPE = "Type";
1332
1333 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301334 * Static attribute for static syntax.
1335 */
1336 public static final String STATIC = "static";
1337
1338 /**
1339 * Static attribute for final syntax.
1340 */
1341 public static final String FINAL = "final";
1342
1343 /**
1344 * Static attribute for package syntax.
1345 */
1346 public static final String PACKAGE = "package";
1347
1348 /**
1349 * Static attribute for import syntax.
1350 */
1351 public static final String IMPORT = "import ";
1352
1353 /**
1354 * Static attribute for null syntax.
1355 */
1356 public static final String NULL = "null";
1357
1358 /**
1359 * Static attribute for return syntax.
1360 */
1361 public static final String RETURN = "return";
1362
1363 /**
1364 * Static attribute for java new syntax.
1365 */
1366 public static final String NEW = "new";
1367
1368 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301369 * Static attribute for java new syntax.
1370 */
1371 public static final String TO_STRING_METHOD = "toString";
1372
1373 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301374 * Static attribute for this syntax.
1375 */
1376 public static final String THIS = "this";
1377
1378 /**
1379 * Static attribute for implements syntax.
1380 */
1381 public static final String IMPLEMENTS = "implements";
1382
1383 /**
1384 * Static attribute for extends syntax.
1385 */
1386 public static final String EXTEND = "extends";
1387
1388 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301389 * Static attribute for service interface suffix syntax.
1390 */
1391 public static final String SERVICE_METHOD_STRING = "Service";
1392
1393 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301394 * For event file generation.
1395 */
1396 public static final String EVENT_STRING = "Event";
1397
1398 /**
1399 * For event listener file generation.
1400 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301401 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301402
1403 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301404 * For event subject file generation.
1405 */
1406 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1407
1408 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301409 * Static attribute for build method syntax.
1410 */
1411 public static final String BUILD = "build";
1412
1413 /**
1414 * Static attribute for object.
1415 */
1416 public static final String OBJECT = "Object";
1417
1418 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301419 * Static attribute for app instance.
1420 */
1421 public static final String APP_INSTANCE = "appInstance";
1422
1423 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301424 * Static attribute for instance.
1425 */
1426 public static final String INSTANCE = "instance";
1427
1428 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301429 * Static attribute for override annotation.
1430 */
1431 public static final String OVERRIDE = "@Override";
1432
1433 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301434 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301435 */
b.jananie6d43af2016-03-04 12:29:05 +05301436 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301437
1438 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301439 * Static attribute for regex.
1440 */
1441 public static final String REGEX_IMPORTS = "java.util.regex";
1442
1443 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301444 * Static attribute for map.
1445 */
1446 public static final String MAP = "Map";
1447
1448 /**
1449 * Static attribute for hash map.
1450 */
1451 public static final String HASH_MAP = "HashMap";
1452
1453
1454 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301455 * Static attribute for more object import package.
1456 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301457 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1458 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301459
1460 /**
1461 * Static attribute for more object import class.
1462 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301463 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301464 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301465
1466 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301467 * Static attribute for more object import class.
1468 */
1469 public static final String MORE_OBJ_ATTR =
1470 "MoreObjects.ToStringHelper helper = ";
1471
1472 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301473 * Static attribute for to string method.
1474 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301475 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301476 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301477
1478 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301479 * Static attribute for to string method.
1480 */
1481 public static final String GOOGLE_MORE_OBJECT_METHOD_STATIC_STRING =
1482 "MoreObjects.toStringHelper";
1483
1484 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301485 * Static attribute for java utilities import package.
1486 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301487 public static final String JAVA_UTIL_PKG = "java.util";
1488
1489 /**
1490 * Static attribute for java utilities import package.
1491 */
1492 public static final String JAVA_UTIL_REGEX_PKG = "java.util.regex";
1493
1494 /**
1495 * Static attribute for java utilities import package.
1496 */
1497 public static final String SET_VALUE_PARA = "setValue";
1498
1499 /**
1500 * Static attribute for java utilities import package.
1501 */
1502 public static final String HELPER = "helper";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301503
1504 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301505 * Static attribute for bitset.
1506 */
1507 public static final String BITSET = "BitSet";
1508
1509 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301510 * Static attribute for java utilities objects import class.
1511 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301512 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301513
1514 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301515 * Static attribute for AugmentedInfo class.
1516 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301517 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301518
1519 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301520 * Static attribute for AugmentedInfo class.
1521 */
1522 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1523 "yangAugmentedInfo";
1524
1525 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301526 * Static attribute for AugmentedInfo class.
1527 */
1528 public static final String YANG_AUGMENTED_INFO_MAP =
1529 "yangAugmentedInfoMap";
1530
1531 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301532 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301533 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301534 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301535
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301536 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301537 * Static attribute for list.
1538 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301539 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301540
1541 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301542 * Static attribute for queue.
1543 */
1544 public static final String QUEUE = "Queue";
1545
1546 /**
1547 * Static attribute for set.
1548 */
1549 public static final String SET = "Set";
1550
1551 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301552 * Comment to be added for autogenerated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301553 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301554 public static final String YANG_UTILS_TODO =
1555 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301556
1557 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301558 * Static attribute for AbstractEvent.
1559 */
1560 public static final String ABSTRACT_EVENT = "AbstractEvent";
1561
1562 /**
1563 * Static attribute for EventListener.
1564 */
1565 public static final String EVENT_LISTENER = "EventListener";
1566
1567 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301568 * Static attribute for or operator.
1569 */
1570 public static final String OR_OPERATION = "||";
1571
1572 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301573 * Static attribute for or operator.
1574 */
1575 public static final String AND_OPERATION = "&&";
1576
1577 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301578 * Static attribute for YANG file error.
1579 */
1580 public static final String YANG_FILE_ERROR = "YANG file error : ";
1581
1582 /**
1583 * Static attribute for unsupported error information.
1584 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301585 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1586 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301587
1588 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301589 * Static attribute for "is invalid" information.
1590 */
1591 public static final String IS_INVALID = " is invalid.";
1592
1593 /**
1594 * Static attribute for data model tree error information.
1595 */
1596 public static final String INVALID_TREE = "Internal datamodel error: " +
1597 "Datamodel tree is not correct";
1598
1599 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301600 * Static attribute for currently unsupported error information.
1601 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301602 public static final String CURRENTLY_UNSUPPORTED =
1603 " is not supported in current version, please check wiki" +
1604 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301605
1606 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301607 * Static attribute for leaf ref target node error information.
1608 */
1609 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1610 " node, in the leafref path ";
1611
1612 /**
1613 * Static attribute for leaf holder error information.
1614 */
1615 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1616 " type leaves holder in ";
1617
1618 /**
1619 * Static attribute for invalid resolve entity error information.
1620 */
1621 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1622 "Exception: Entity to resolved is other than type/uses";
1623
1624 /**
1625 * Static attribute for invalid resolve entity error information.
1626 */
1627 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1628 "to resolved is other than identityref";
1629
1630 /**
1631 * Static attribute for invalid state error information.
1632 */
1633 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1634 "Unsupported, linker state";
1635
1636 /**
1637 * Static attribute for leaf ref resolve entity error information.
1638 */
1639 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1640 "error: Unable to find base leaf/leaf-list for given leafref path ";
1641
1642 /**
1643 * Static attribute for compiler annotation resolve entity error
1644 * information.
1645 */
1646 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1647 "compiler annotation ";
1648
1649 /**
1650 * Static attribute for failed to link entity error information.
1651 */
1652 public static final String FAILED_TO_LINK = "Failed to link ";
1653
1654 /**
1655 * Static attribute for un-resolve entity error information.
1656 */
1657 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1658 "to resolved is not Resolvable";
1659
1660 /**
1661 * Static attribute for invalid resolve entity error information.
1662 */
1663 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1664 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1665
1666 /**
1667 * Static attribute for invalid resolve entity error information.
1668 */
1669 public static final String INVALID_TARGET = "Invalid target node type ";
1670 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301671 * Static attribute for typedef linker error information.
1672 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301673 public static final String TYPEDEF_LINKER_ERROR =
1674 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301675
1676 /**
1677 * Static attribute for grouping linker error information.
1678 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301679 public static final String GROUPING_LINKER_ERROR =
1680 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301681
1682 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301683 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301684 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301685 public static final String FEATURE_LINKER_ERROR =
1686 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301687
1688 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301689 * Static attribute for leafref linker error information.
1690 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301691 public static final String LEAFREF_LINKER_ERROR =
1692 "YANG file error: Unable to find base leaf/leaf-list for given " +
1693 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301694
1695 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301696 * Static attribute for base linker error information.
1697 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301698 public static final String BASE_LINKER_ERROR =
1699 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301700
1701 /**
1702 * Static attribute for identityref linker error information.
1703 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301704 public static final String IDENTITYREF_LINKER_ERROR =
1705 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301706
1707 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301708 * Static attribute for jar.
1709 */
1710 public static final String JAR = "jar";
1711
1712 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301713 * Static attribute for for.
1714 */
1715 public static final String FOR = "for";
1716
1717 /**
1718 * Static attribute for YangAugmentedOpParamInfo.
1719 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301720 public static final String YANG_AUGMENTED_OP_PARAM_INFO =
1721 "YangAugmentedOpParamInfo";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301722
1723 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301724 * Static attribute for NoSuchMethodException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301725 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301726 public static final String NO_SUCH_METHOD_EXCEPTION =
1727 "NoSuchMethodException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301728
1729 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301730 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301731 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301732 public static final String INVOCATION_TARGET_EXCEPTION =
1733 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301734
1735 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301736 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301737 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301738 public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" +
1739 " java.lang.reflect.InvocationTargetException;\n";
1740 /**
1741 * Static attribute for IllegalAccessException.
1742 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301743 public static final String ILLEGAL_ACCESS_EXCEPTION =
1744 "IllegalAccessException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301745
1746 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301747 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301748 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301749 public static final String ARRAY_LIST = "ArrayList<>()";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301750
1751 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301752 * Static attribute for arrayList import.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301753 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301754 public static final String ARRAY_LIST_IMPORT =
1755 IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301756
1757 /**
1758 * Static attribute for unused keyword.
1759 */
1760 public static final String UNUSED = "UNUSED";
1761
1762 /**
1763 * Static attribute for 1 keyword.
1764 */
1765 public static final String ONE = "1";
1766
1767 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301768 * Static attribute for YANG node operation type class.
Vidyashree Rama13960652016-04-26 15:06:06 +05301769 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301770 public static final String OPERATION_TYPE_CLASS =
Bharat saraswal94844d62016-10-13 13:28:03 +05301771 "OnosYangOpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301772
1773 /**
1774 * Static attribute for YANG node operation type attribute.
1775 */
1776 public static final String OPERATION_TYPE_ATTRIBUTE =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301777 "OpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301778
1779 /**
janani b3c396f02016-09-27 18:45:23 +05301780 * Static attribute for input keyword to be suffixed with rpc name.
1781 */
1782 public static final String INPUT_KEYWORD = "_input";
1783
1784 /**
1785 * Static attribute for output keyword to be suffixed with rpc name.
1786 */
1787 public static final String OUTPUT_KEYWORD = "_output";
1788
1789 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301790 * Static attribute for event class.
1791 */
1792 public static final String EVENT_CLASS = "event class";
1793
1794 /**
1795 * Static attribute for typedef class.
1796 */
1797 public static final String TYPEDEF_CLASS = "typedef class";
1798
1799 /**
1800 * Static attribute for impl class.
1801 */
1802 public static final String IMPL_CLASS = "impl class";
1803
1804 /**
1805 * Static attribute for union class.
1806 */
1807 public static final String UNION_CLASS = "union class";
1808
1809 /**
1810 * Static attribute for enum class.
1811 */
1812 public static final String ENUM_CLASS = "enum class";
1813
1814 /**
1815 * Static attribute for rpc class.
1816 */
1817 public static final String RPC_CLASS = "rpc class";
1818
1819 /**
1820 * Static attribute for builder class.
1821 */
1822 public static final String BUILDER_CLASS = "builder class";
1823
1824 /**
1825 * Static attribute for builder interface.
1826 */
1827 public static final String BUILDER_INTERFACE = "builder interface";
1828
1829 /**
1830 * Static attribute for binary.
1831 */
1832 public static final String BINARY = "binary";
1833
1834 /**
1835 * Static attribute for bits.
1836 */
1837 public static final String BITS = "bits";
1838
1839 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301840 * Static attribute for bits.
1841 */
1842 public static final String BITS_CAPS = "Bits";
1843
1844 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301845 * Static attribute for YANG.
1846 */
1847 public static final String YANG = "yang";
1848
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301849 /**
1850 * Static attribute for error msg.
1851 */
1852 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1853 "multiple yang" + " files has same module/submodule" +
1854 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1855 " previous build present in your directory.";
1856
1857 /**
1858 * Static attribute for error msg.
1859 */
1860 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1861 "identity instance node ";
Bharat saraswal94844d62016-10-13 13:28:03 +05301862
1863 /**
1864 * Static attribute for error msg.
1865 */
1866 public static final String ERROR_MSG_FOR_AUGMENT_LINKING = "Augment " +
1867 "linking does not support linking when path contains " +
1868 "notification/grouping for path: ";
1869
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301870 /**
1871 * Static attribute for in.
1872 */
1873 public static final String IN = " in ";
1874
1875 /**
1876 * Static attribute for at.
1877 */
1878 public static final String AT = " at ";
1879
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301880 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301881 private UtilConstants() {
1882 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301883
1884 /**
1885 * Represents operation type.
1886 */
1887 public enum Operation {
1888 /**
1889 * Represents add operation.
1890 */
1891 ADD,
1892
1893 /**
1894 * Represents remove operation.
1895 */
1896 REMOVE
1897 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301898}