blob: 6bfd9a80e02f298193b014491f056100e68f0cb2 [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 saraswald532a4c2016-03-25 18:19:46 +0530734
735 /**
736 * Static attribute for other.
737 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530738 public static final String OTHER = "other";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530739
740 /**
741 * Static attribute for obj syntax.
742 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530743 public static final String OBJ = "obj";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530744
745 /**
746 * Static attribute for hash syntax.
747 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530748 public static final String HASH = "hash";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530749
750 /**
751 * Static attribute for to syntax.
752 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530753 public static final String TO = "to";
b.jananie6d43af2016-03-04 12:29:05 +0530754
Bharat saraswald532a4c2016-03-25 18:19:46 +0530755 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530756 * Static attribute for to syntax.
757 */
758 public static final String TO_CAPS = "To";
759
760 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530761 * Static attribute for true syntax.
762 */
b.jananie6d43af2016-03-04 12:29:05 +0530763 public static final String TRUE = "true";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530764
765 /**
766 * Static attribute for false syntax.
767 */
b.jananie6d43af2016-03-04 12:29:05 +0530768 public static final String FALSE = "false";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530769
770 /**
771 * Static attribute for org.
772 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530773 public static final String ORG = "org";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530774
775 /**
776 * Static attribute for temp.
777 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530778 public static final String TEMP = "Temp";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530779
780 /**
781 * Static attribute for YANG file directory.
782 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530783 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530784
785 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530786 * Static attribute for diamond close bracket syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530787 */
788 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530789
790 /**
791 * Static attribute for diamond close bracket syntax.
792 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530793 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530794
795 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530796 * Static attribute for event type.
797 */
798 public static final String EVENT_TYPE = ".Type";
799
800 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530801 * Static attribute for exception syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530802 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530803 public static final String EXCEPTION = "Exception";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530804
805 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530806 * Static attribute for exception variable syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530807 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530808 public static final String EXCEPTION_VAR = "e";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530809
810 /**
811 * Static attribute for open parenthesis syntax.
812 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530813 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530814
815 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530816 * Static attribute for switch syntax.
817 */
818 public static final String SWITCH = "switch";
819
820 /**
821 * Static attribute for case syntax.
822 */
823 public static final String CASE = "case";
824
825 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530826 * Static attribute for temp val syntax.
827 */
828 public static final String TMP_VAL = "tmpVal";
829
830 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530831 * Static attribute for close curly bracket syntax.
832 */
833 public static final String ELSE = "else";
834
835 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530836 * From string parameter name.
837 */
838 public static final String FROM_STRING_PARAM_NAME = "valInString";
839
840 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530841 * Static attribute for close parenthesis syntax.
842 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530843 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530844
845 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530846 * Static attribute for empty parameter function call.
847 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530848 public static final String OPEN_CLOSE_BRACKET_STRING = "()";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530849
850 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530851 * Static attribute for open curly bracket syntax.
852 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530853 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530854
855 /**
856 * Static attribute for close curly bracket syntax.
857 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530858 public static final String CLOSE_CURLY_BRACKET = "}";
859
860 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +0530861 * Static attribute for square brackets syntax.
862 */
863 public static final String SQUARE_BRACKETS = "[]";
864
865 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530866 * Static attribute for getter method prefix.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530867 */
868 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530869
870 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530871 * Static attribute for getter method prefix.
872 */
873 public static final String GET_METHOD = "getMethod";
874
875 /**
876 * Static attribute for getter method prefix.
877 */
878 public static final String GET_CLASS = "getClass()";
879
880 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530881 * Static attribute for setter method prefix.
882 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530883 public static final String SET_METHOD_PREFIX = "set";
884
885 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530886 * Static attribute for get filter leaf flags.
887 */
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530888 public static final String GET_VALUE_LEAF_FLAGS = "getValueLeafFlags";
889
890 /**
891 * Static attribute for get select filter leaf flags.
892 */
893 public static final String GET_SELECT_LEAF_FLAGS = "getSelectLeafFlags";
894
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530895
896 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530897 * Static attribute for getLeafIndex.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530898 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530899 public static final String GET_LEAF_INDEX = "getLeafIndex()";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530900
901 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530902 * Static attribute for op param.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530903 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530904 public static final String OP_PARAM = "OpParam";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530905
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530906
907 /**
908 * Static attribute for is filter content match method prefix.
909 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530910 public static final String PROCESS_SUBTREE_FILTERING =
911 "processSubtreeFiltering";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530912
913 /**
914 * variable name of the subtree filtering result builder.
915 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530916 public static final String SUBTREE_FILTERING_RESULT_BUILDER =
917 "subTreeFilteringResultBuilder";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530918
919 /**
920 * variable name of the subtree filtering result flag.
921 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530922 public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG =
923 "isAnySelectOrContainmentNode";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530924
925 /**
926 * variable name of the subtree filtering to select all child.
927 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530928 public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG =
929 "isSelectAllSchemaChild";
Bharat saraswal8beac342016-08-04 02:00:03 +0530930
931 /**
932 * Static attribute for break prefix.
933 */
934 public static final String BREAK = "break";
935
936 /**
937 * Static attribute for break prefix.
938 */
939 public static final String IS_EMPTY = "isEmpty()";
940
941 /**
942 * Static attribute for is isLeafValueSet method prefix.
943 */
944 public static final String VALUE_LEAF_SET = "isLeafValueSet";
945
946 /**
947 * Static attribute for is isSelectLeaf method prefix.
948 */
949 public static final String IS_SELECT_LEAF = "isSelectLeaf";
950
951 /**
952 * Static attribute for is selectLeaf method prefix.
953 */
954 public static final String SET_SELECT_LEAF = "selectLeaf";
955
956 /**
957 * Static attribute for is LeafIdentifier enum prefix.
958 */
959 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530960 /**
961 * Static attribute for is leaf.
962 */
963 public static final String LEAF = "leaf";
Bharat saraswal8beac342016-08-04 02:00:03 +0530964
965 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530966 * Static attribute for four space indentation.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530967 */
968 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530969
970 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530971 * Static attribute for not syntax.
972 */
973 public static final String NOT = "!";
974
975 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530976 * Static attribute for try syntax.
977 */
978 public static final String TRY = "try";
979
980 /**
981 * Static attribute for catch syntax.
982 */
983 public static final String CATCH = "catch";
984
985 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530986 * Static attribute for eight space indentation.
987 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530988 public static final String EIGHT_SPACE_INDENTATION =
989 FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530990
991 /**
992 * Static attribute for twelve space indentation.
993 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530994 public static final String TWELVE_SPACE_INDENTATION =
995 EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530996
997 /**
998 * Static attribute for sixteen space indentation.
999 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301000 public static final String SIXTEEN_SPACE_INDENTATION =
1001 TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301002
1003 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301004 * Static attribute for twenty space indentation.
1005 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301006 public static final String TWENTY_SPACE_INDENTATION =
1007 SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal8beac342016-08-04 02:00:03 +05301008
1009 /**
1010 * Static attribute for twenty four space indentation.
1011 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301012 public static final String TWENTY_FOUR_SPACE_INDENTATION =
1013 TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301014
1015 /**
1016 * Static attribute for twenty eight space indentation.
1017 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301018 public static final String TWENTY_EIGHT_SPACE_INDENTATION =
1019 TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301020
1021 /**
1022 * Static attribute for thirty two space indentation.
1023 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301024 public static final String THIRTY_TWO_SPACE_INDENTATION =
1025 TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301026
1027 /**
1028 * continue.
1029 */
1030 public static final String CONTINUE = "continue";
Bharat saraswal8beac342016-08-04 02:00:03 +05301031
1032 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301033 * Static attribute for generated code path.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301034 */
Bharat saraswal5600f0f2016-03-09 18:34:56 +05301035 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301036
1037 /**
1038 * Static attribute for base package.
1039 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301040 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301041
1042 /**
1043 * Static attribute for YANG date prefix.
1044 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301045 public static final String REVISION_PREFIX = "rev";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301046
1047 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301048 * Static attribute for YANG automatic prefix for identifiers with keywords
1049 * and beginning with digits.
janani b1c6acc42016-04-15 16:18:30 +05301050 */
1051 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
1052
1053 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301054 * Static attribute for YANG version prefix.
Bharat saraswald532a4c2016-03-25 18:19:46 +05301055 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301056 public static final String VERSION_PREFIX = "v";
1057
1058 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301059 * Static attribute for private modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301060 */
1061 public static final String PRIVATE = "private";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301062
1063 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301064 * Static attribute for public modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301065 */
Bharat saraswald532a4c2016-03-25 18:19:46 +05301066 public static final String PUBLIC = "public";
1067
1068 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301069 * Static attribute for abstract modifier.
1070 */
1071 public static final String ABSTRACT = "abstract";
1072
1073 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301074 * Static attribute for protected modifier.
1075 */
1076 public static final String PROTECTED = "protected";
1077
1078 /**
Vinod Kumar S08710982016-03-03 19:55:30 +05301079 * Void java type.
1080 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301081 public static final String VOID = "void";
Vinod Kumar S08710982016-03-03 19:55:30 +05301082
1083 /**
1084 * String built in java type.
1085 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301086 public static final String STRING_DATA_TYPE = "String";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301087
Vinod Kumar S08710982016-03-03 19:55:30 +05301088 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301089 * String built in java type.
1090 */
1091 public static final String STRING_BUILDER = "StringBuilder";
1092 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301093 * Java.lang.* packages.
Vinod Kumar S08710982016-03-03 19:55:30 +05301094 */
1095 public static final String JAVA_LANG = "java.lang";
1096
1097 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301098 * Java.math.* packages.
1099 */
1100 public static final String JAVA_MATH = "java.math";
1101
1102 /**
1103 * Boolean built in java type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301104 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301105 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar S08710982016-03-03 19:55:30 +05301106
1107 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301108 * BigInteger built in java type.
1109 */
1110 public static final String BIG_INTEGER = "BigInteger";
1111
1112 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301113 * BigDecimal built in java type.
1114 */
1115 public static final String BIG_DECIMAL = "BigDecimal";
1116
1117 /**
1118 * BitSet built in java type.
1119 */
1120 public static final String BIT_SET = "BitSet";
1121
1122 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301123 * Byte java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301124 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301125 public static final String BYTE = "byte";
Vinod Kumar S08710982016-03-03 19:55:30 +05301126
1127 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301128 * Short java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301129 */
1130 public static final String SHORT = "short";
1131
1132 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301133 * Int java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301134 */
1135 public static final String INT = "int";
1136
1137 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301138 * Long java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301139 */
1140 public static final String LONG = "long";
1141
1142 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301143 * Double java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301144 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301145 public static final String DOUBLE = "double";
1146
1147 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301148 * Boolean built in java wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301149 */
1150 public static final String BOOLEAN_WRAPPER = "Boolean";
1151
1152 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301153 * Byte java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301154 */
1155 public static final String BYTE_WRAPPER = "Byte";
1156
1157 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301158 * Short java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301159 */
1160 public static final String SHORT_WRAPPER = "Short";
1161
1162 /**
1163 * Integer java built in wrapper type.
1164 */
1165 public static final String INTEGER_WRAPPER = "Integer";
1166
1167 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301168 * Long java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301169 */
1170 public static final String LONG_WRAPPER = "Long";
1171
1172 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301173 * Static variable for question mark.
Vinod Kumar S08710982016-03-03 19:55:30 +05301174 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301175 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301176
1177 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301178 * Static variable for forType string.
1179 */
1180 public static final String FOR_TYPE_STRING = " for type ";
1181
1182 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301183 * List of keywords in java, this is used for checking if the input does not
1184 * contain these keywords.
b.jananie6d43af2016-03-04 12:29:05 +05301185 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301186 public static final List<String> JAVA_KEY_WORDS =
1187 Arrays.asList("abstract", "assert", "boolean", "break", "byte",
1188 "case", "catch", "char", "class", "const", "continue",
1189 "default", "do", "double", "else", "extends", "false",
1190 "final", "finally", "float", "for", "goto", "if",
1191 "implements", "import", "instanceof", "enum", "int",
1192 "interface", "long", "native", "new", "null",
1193 "package", "private", "protected", "public", "return",
1194 "short", "static", "strictfp", "super", "switch",
1195 "synchronized", "this", "throw", "throws", "transient",
1196 "true", "try", "void", "volatile", "while");
b.jananie6d43af2016-03-04 12:29:05 +05301197
1198 /**
janani b1c6acc42016-04-15 16:18:30 +05301199 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301200 */
janani b1c6acc42016-04-15 16:18:30 +05301201 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1202
1203 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301204 * Static attribute for regex for three special characters used in
1205 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301206 */
1207 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1208
1209 /**
1210 * Static attribute for regex for period.
1211 */
1212 public static final String REGEX_FOR_PERIOD = "[.]";
1213
1214 /**
1215 * Static attribute for regex for underscore.
1216 */
1217 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1218
1219 /**
1220 * Static attribute for regex for hyphen.
1221 */
1222 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301223
1224 /**
1225 * Static attribute for regex for digits.
1226 */
b.jananie6d43af2016-03-04 12:29:05 +05301227 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1228
1229 /**
janani b703cfe42016-05-17 13:12:22 +05301230 * Static attribute for regex with digits.
1231 */
1232 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1233
1234 /**
janani b1c6acc42016-04-15 16:18:30 +05301235 * Static attribute for regex for single letter.
1236 */
1237 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1238
1239 /**
1240 * Static attribute for regex for digits with single letter.
1241 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301242 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1243 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301244
1245 /**
janani b703cfe42016-05-17 13:12:22 +05301246 * Static attribute for regex with uppercase.
1247 */
1248 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1249
1250 /**
1251 * Static attribute for regex for single capital case letter.
1252 */
1253 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1254
1255 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301256 * Static attribute for regex for capital case letter with any number of
1257 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301258 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301259 public static final String
1260 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1261 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301262
1263 /**
janani b3e357f62016-05-19 17:39:50 +05301264 * Static attribute for regex for any string ending with service.
1265 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301266 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1267 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301268
1269 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301270 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301271 */
1272 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301273
1274 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301275 * Static attribute for builder syntax.
1276 */
1277 public static final String BUILDER = "Builder";
1278
1279 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301280 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301281 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301282 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301283
1284 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301285 * Static attribute for manager syntax.
1286 */
1287 public static final String MANAGER = "Manager";
1288
1289 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301290 * Static attribute for service syntax.
1291 */
1292 public static final String SERVICE = "Service";
1293
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301294 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301295 * Static attribute for interface syntax.
1296 */
1297 public static final String INTERFACE = "interface";
1298
1299 /**
1300 * Static attribute for enum syntax.
1301 */
1302 public static final String ENUM = "enum";
1303
1304 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301305 * Static attribute for type syntax.
1306 */
1307 public static final String TYPE = "Type";
1308
1309 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301310 * Static attribute for static syntax.
1311 */
1312 public static final String STATIC = "static";
1313
1314 /**
1315 * Static attribute for final syntax.
1316 */
1317 public static final String FINAL = "final";
1318
1319 /**
1320 * Static attribute for package syntax.
1321 */
1322 public static final String PACKAGE = "package";
1323
1324 /**
1325 * Static attribute for import syntax.
1326 */
1327 public static final String IMPORT = "import ";
1328
1329 /**
1330 * Static attribute for null syntax.
1331 */
1332 public static final String NULL = "null";
1333
1334 /**
1335 * Static attribute for return syntax.
1336 */
1337 public static final String RETURN = "return";
1338
1339 /**
1340 * Static attribute for java new syntax.
1341 */
1342 public static final String NEW = "new";
1343
1344 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301345 * Static attribute for java new syntax.
1346 */
1347 public static final String TO_STRING_METHOD = "toString";
1348
1349 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301350 * Static attribute for this syntax.
1351 */
1352 public static final String THIS = "this";
1353
1354 /**
1355 * Static attribute for implements syntax.
1356 */
1357 public static final String IMPLEMENTS = "implements";
1358
1359 /**
1360 * Static attribute for extends syntax.
1361 */
1362 public static final String EXTEND = "extends";
1363
1364 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301365 * Static attribute for service interface suffix syntax.
1366 */
1367 public static final String SERVICE_METHOD_STRING = "Service";
1368
1369 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301370 * For event file generation.
1371 */
1372 public static final String EVENT_STRING = "Event";
1373
1374 /**
1375 * For event listener file generation.
1376 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301377 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301378
1379 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301380 * For event subject file generation.
1381 */
1382 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1383
1384 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301385 * Static attribute for build method syntax.
1386 */
1387 public static final String BUILD = "build";
1388
1389 /**
1390 * Static attribute for object.
1391 */
1392 public static final String OBJECT = "Object";
1393
1394 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301395 * Static attribute for app instance.
1396 */
1397 public static final String APP_INSTANCE = "appInstance";
1398
1399 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301400 * Static attribute for instance.
1401 */
1402 public static final String INSTANCE = "instance";
1403
1404 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301405 * Static attribute for override annotation.
1406 */
1407 public static final String OVERRIDE = "@Override";
1408
1409 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301410 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301411 */
b.jananie6d43af2016-03-04 12:29:05 +05301412 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301413
1414 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301415 * Static attribute for regex.
1416 */
1417 public static final String REGEX_IMPORTS = "java.util.regex";
1418
1419 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301420 * Static attribute for map.
1421 */
1422 public static final String MAP = "Map";
1423
1424 /**
1425 * Static attribute for hash map.
1426 */
1427 public static final String HASH_MAP = "HashMap";
1428
1429
1430 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301431 * Static attribute for more object import package.
1432 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301433 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1434 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301435
1436 /**
1437 * Static attribute for more object import class.
1438 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301439 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301440 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301441
1442 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301443 * Static attribute for more object import class.
1444 */
1445 public static final String MORE_OBJ_ATTR =
1446 "MoreObjects.ToStringHelper helper = ";
1447
1448 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301449 * Static attribute for to string method.
1450 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301451 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301452 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301453
1454 /**
1455 * Static attribute for java utilities import package.
1456 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301457 public static final String JAVA_UTIL_PKG = "java.util";
1458
1459 /**
1460 * Static attribute for java utilities import package.
1461 */
1462 public static final String JAVA_UTIL_REGEX_PKG = "java.util.regex";
1463
1464 /**
1465 * Static attribute for java utilities import package.
1466 */
1467 public static final String SET_VALUE_PARA = "setValue";
1468
1469 /**
1470 * Static attribute for java utilities import package.
1471 */
1472 public static final String HELPER = "helper";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301473
1474 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301475 * Static attribute for bitset.
1476 */
1477 public static final String BITSET = "BitSet";
1478
1479 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301480 * Static attribute for java utilities objects import class.
1481 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301482 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301483
1484 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301485 * Static attribute for AugmentedInfo class.
1486 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301487 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301488
1489 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301490 * Static attribute for AugmentedInfo class.
1491 */
1492 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1493 "yangAugmentedInfo";
1494
1495 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301496 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301497 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301498 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301499
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301500 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301501 * Static attribute for list.
1502 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301503 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301504
1505 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301506 * Static attribute for queue.
1507 */
1508 public static final String QUEUE = "Queue";
1509
1510 /**
1511 * Static attribute for set.
1512 */
1513 public static final String SET = "Set";
1514
1515 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301516 * Comment to be added for autogenerated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301517 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301518 public static final String YANG_UTILS_TODO =
1519 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301520
1521 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301522 * Static attribute for AbstractEvent.
1523 */
1524 public static final String ABSTRACT_EVENT = "AbstractEvent";
1525
1526 /**
1527 * Static attribute for EventListener.
1528 */
1529 public static final String EVENT_LISTENER = "EventListener";
1530
1531 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301532 * Static attribute for or operator.
1533 */
1534 public static final String OR_OPERATION = "||";
1535
1536 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301537 * Static attribute for or operator.
1538 */
1539 public static final String AND_OPERATION = "&&";
1540
1541 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301542 * Static attribute for YANG file error.
1543 */
1544 public static final String YANG_FILE_ERROR = "YANG file error : ";
1545
1546 /**
1547 * Static attribute for unsupported error information.
1548 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301549 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1550 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301551
1552 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301553 * Static attribute for "is invalid" information.
1554 */
1555 public static final String IS_INVALID = " is invalid.";
1556
1557 /**
1558 * Static attribute for data model tree error information.
1559 */
1560 public static final String INVALID_TREE = "Internal datamodel error: " +
1561 "Datamodel tree is not correct";
1562
1563 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301564 * Static attribute for currently unsupported error information.
1565 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301566 public static final String CURRENTLY_UNSUPPORTED =
1567 " is not supported in current version, please check wiki" +
1568 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301569
1570 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301571 * Static attribute for leaf ref target node error information.
1572 */
1573 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1574 " node, in the leafref path ";
1575
1576 /**
1577 * Static attribute for leaf holder error information.
1578 */
1579 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1580 " type leaves holder in ";
1581
1582 /**
1583 * Static attribute for invalid resolve entity error information.
1584 */
1585 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1586 "Exception: Entity to resolved is other than type/uses";
1587
1588 /**
1589 * Static attribute for invalid resolve entity error information.
1590 */
1591 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1592 "to resolved is other than identityref";
1593
1594 /**
1595 * Static attribute for invalid state error information.
1596 */
1597 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1598 "Unsupported, linker state";
1599
1600 /**
1601 * Static attribute for leaf ref resolve entity error information.
1602 */
1603 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1604 "error: Unable to find base leaf/leaf-list for given leafref path ";
1605
1606 /**
1607 * Static attribute for compiler annotation resolve entity error
1608 * information.
1609 */
1610 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1611 "compiler annotation ";
1612
1613 /**
1614 * Static attribute for failed to link entity error information.
1615 */
1616 public static final String FAILED_TO_LINK = "Failed to link ";
1617
1618 /**
1619 * Static attribute for un-resolve entity error information.
1620 */
1621 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1622 "to resolved is not Resolvable";
1623
1624 /**
1625 * Static attribute for invalid resolve entity error information.
1626 */
1627 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1628 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1629
1630 /**
1631 * Static attribute for invalid resolve entity error information.
1632 */
1633 public static final String INVALID_TARGET = "Invalid target node type ";
1634 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301635 * Static attribute for typedef linker error information.
1636 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301637 public static final String TYPEDEF_LINKER_ERROR =
1638 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301639
1640 /**
1641 * Static attribute for grouping linker error information.
1642 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301643 public static final String GROUPING_LINKER_ERROR =
1644 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301645
1646 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301647 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301648 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301649 public static final String FEATURE_LINKER_ERROR =
1650 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301651
1652 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301653 * Static attribute for leafref linker error information.
1654 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301655 public static final String LEAFREF_LINKER_ERROR =
1656 "YANG file error: Unable to find base leaf/leaf-list for given " +
1657 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301658
1659 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301660 * Static attribute for base linker error information.
1661 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301662 public static final String BASE_LINKER_ERROR =
1663 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301664
1665 /**
1666 * Static attribute for identityref linker error information.
1667 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301668 public static final String IDENTITYREF_LINKER_ERROR =
1669 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301670
1671 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301672 * Static attribute for jar.
1673 */
1674 public static final String JAR = "jar";
1675
1676 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301677 * Static attribute for for.
1678 */
1679 public static final String FOR = "for";
1680
1681 /**
1682 * Static attribute for YangAugmentedOpParamInfo.
1683 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301684 public static final String YANG_AUGMENTED_OP_PARAM_INFO =
1685 "YangAugmentedOpParamInfo";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301686
1687 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301688 * Static attribute for NoSuchMethodException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301689 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301690 public static final String NO_SUCH_METHOD_EXCEPTION =
1691 "NoSuchMethodException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301692
1693 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301694 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301695 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301696 public static final String INVOCATION_TARGET_EXCEPTION =
1697 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301698
1699 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301700 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301701 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301702 public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" +
1703 " java.lang.reflect.InvocationTargetException;\n";
1704 /**
1705 * Static attribute for IllegalAccessException.
1706 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301707 public static final String ILLEGAL_ACCESS_EXCEPTION =
1708 "IllegalAccessException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301709
1710 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301711 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301712 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301713 public static final String ARRAY_LIST = "ArrayList<>()";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301714
1715 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301716 * Static attribute for arrayList import.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301717 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301718 public static final String ARRAY_LIST_IMPORT =
1719 IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301720
1721 /**
1722 * Static attribute for unused keyword.
1723 */
1724 public static final String UNUSED = "UNUSED";
1725
1726 /**
1727 * Static attribute for 1 keyword.
1728 */
1729 public static final String ONE = "1";
1730
1731 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301732 * Static attribute for YANG node operation type class.
Vidyashree Rama13960652016-04-26 15:06:06 +05301733 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301734 public static final String OPERATION_TYPE_CLASS =
1735 "OnosYangNodeOperationType";
1736
1737 /**
1738 * Static attribute for YANG node operation type attribute.
1739 */
1740 public static final String OPERATION_TYPE_ATTRIBUTE =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301741 "OpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301742
1743 /**
janani b3c396f02016-09-27 18:45:23 +05301744 * Static attribute for input keyword to be suffixed with rpc name.
1745 */
1746 public static final String INPUT_KEYWORD = "_input";
1747
1748 /**
1749 * Static attribute for output keyword to be suffixed with rpc name.
1750 */
1751 public static final String OUTPUT_KEYWORD = "_output";
1752
1753 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301754 * Static attribute for event class.
1755 */
1756 public static final String EVENT_CLASS = "event class";
1757
1758 /**
1759 * Static attribute for typedef class.
1760 */
1761 public static final String TYPEDEF_CLASS = "typedef class";
1762
1763 /**
1764 * Static attribute for impl class.
1765 */
1766 public static final String IMPL_CLASS = "impl class";
1767
1768 /**
1769 * Static attribute for union class.
1770 */
1771 public static final String UNION_CLASS = "union class";
1772
1773 /**
1774 * Static attribute for enum class.
1775 */
1776 public static final String ENUM_CLASS = "enum class";
1777
1778 /**
1779 * Static attribute for rpc class.
1780 */
1781 public static final String RPC_CLASS = "rpc class";
1782
1783 /**
1784 * Static attribute for builder class.
1785 */
1786 public static final String BUILDER_CLASS = "builder class";
1787
1788 /**
1789 * Static attribute for builder interface.
1790 */
1791 public static final String BUILDER_INTERFACE = "builder interface";
1792
1793 /**
1794 * Static attribute for binary.
1795 */
1796 public static final String BINARY = "binary";
1797
1798 /**
1799 * Static attribute for bits.
1800 */
1801 public static final String BITS = "bits";
1802
1803 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301804 * Static attribute for bits.
1805 */
1806 public static final String BITS_CAPS = "Bits";
1807
1808 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301809 * Static attribute for YANG.
1810 */
1811 public static final String YANG = "yang";
1812
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301813 /**
1814 * Static attribute for error msg.
1815 */
1816 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1817 "multiple yang" + " files has same module/submodule" +
1818 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1819 " previous build present in your directory.";
1820
1821 /**
1822 * Static attribute for error msg.
1823 */
1824 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1825 "identity instance node ";
1826 /**
1827 * Static attribute for in.
1828 */
1829 public static final String IN = " in ";
1830
1831 /**
1832 * Static attribute for at.
1833 */
1834 public static final String AT = " at ";
1835
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301836 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301837 private UtilConstants() {
1838 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301839
1840 /**
1841 * Represents operation type.
1842 */
1843 public enum Operation {
1844 /**
1845 * Represents add operation.
1846 */
1847 ADD,
1848
1849 /**
1850 * Represents remove operation.
1851 */
1852 REMOVE
1853 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301854}