blob: cd359cd317c47cf73da80611de8f4e185b3e09e0 [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 saraswald532a4c2016-03-25 18:19:46 +0530170 * JavaDocs's statement for builder object.
171 */
172 public static final String BUILDER_OBJECT = "builder object of ";
173
174 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530175 * JavaDocs's statement for rpc method.
176 */
177 public static final String JAVA_DOC_RPC = " * Service interface of ";
178
179 /**
180 * JavaDocs's statement for rpc's input string.
181 */
182 public static final String RPC_INPUT_STRING = "input of service interface ";
183
184 /**
185 * JavaDocs's statement for rpc's output string.
186 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530187 public static final String RPC_OUTPUT_STRING =
188 "output of service interface ";
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530189
190 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530191 * Static attribute for new line.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530192 */
193 public static final String NEW_LINE = "\n";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530194
195 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530196 * Static attribute for default.
197 */
198 public static final String DEFAULT = "default";
199
200 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530201 * Static attribute for default.
202 */
203 public static final String DEFAULT_CAPS = "Default";
204
205 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530206 * Static attribute for java code generation for sbi.
207 */
208 public static final String SBI = "sbi";
209
210 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530211 * Static attribute for multiple new line.
212 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530213 public static final String MULTIPLE_NEW_LINE = "\n\n";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530214
215 /**
216 * Static attribute for empty line.
217 */
b.jananie6d43af2016-03-04 12:29:05 +0530218 public static final String EMPTY_STRING = "";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530219
220 /**
221 * Static attribute for new line with asterisk.
222 */
223 public static final String NEW_LINE_ASTERISK = " *\n";
224
225 /**
226 * Static attribute for period.
227 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530228 public static final String PERIOD = ".";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530229
230 /**
Bharat saraswal127461c2016-11-24 12:43:46 +0530231 * Static attribute for lib.
232 */
233 public static final String LIB = "lib__";
234
235 /**
236 * Static attribute for lib path.
237 */
238 public static final String LIB_PATH = "//lib:";
239
240 /**
241 * Static attribute for output.
242 */
243 public static final String OUT = "__output";
244
245 /**
Bharat saraswala5c28512016-11-10 21:09:23 +0530246 * Static attribute for period.
247 */
248 public static final String ENTRY = "Entry";
249
250 /**
251 * Static attribute for period.
252 */
253 public static final String ENTRY_SET = "entrySet()";
254
255 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530256 * Static attribute for compare to.
257 */
258 public static final String COMPARE_TO = "compareTo";
259
260 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530261 * Static attribute for parse byte.
262 */
263 public static final String PARSE_BYTE = "parseByte";
264
265 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530266 * Static attribute for parse boolean.
267 */
268 public static final String PARSE_BOOLEAN = "parseBoolean";
269
270 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530271 * Static attribute for parse short.
272 */
273 public static final String PARSE_SHORT = "parseShort";
274
275 /**
276 * Static attribute for parse int.
277 */
278 public static final String PARSE_INT = "parseInt";
279
280 /**
281 * Static attribute for parse long.
282 */
283 public static final String PARSE_LONG = "parseLong";
284
285 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530286 * Static attribute for base64.
287 */
288 public static final String BASE64 = "Base64";
289
290 /**
291 * Static attribute for getEncoder.
292 */
293 public static final String GET_ENCODER = "getEncoder";
294
295 /**
296 * Static attribute for encodeToString.
297 */
298 public static final String ENCODE_TO_STRING = "encodeToString";
299
300 /**
301 * Static attribute for getDecoder.
302 */
303 public static final String GET_DECODER = "getDecoder";
304
305 /**
306 * Static attribute for decode.
307 */
308 public static final String DECODE = "decode";
309
310 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530311 * Static attribute for omit null value.
312 */
313 public static final String OMIT_NULL_VALUE_STRING = "omitNullValues()";
314
315 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530316 * Static attribute for underscore.
317 */
b.jananie6d43af2016-03-04 12:29:05 +0530318 public static final String UNDER_SCORE = "_";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530319
320 /**
321 * Static attribute for semi-colan.
322 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530323 public static final String SEMI_COLON = ";";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530324
325 /**
326 * Static attribute for hyphen.
327 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530328 public static final String HYPHEN = "-";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530329
330 /**
331 * Static attribute for space.
332 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530333 public static final String SPACE = " ";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530334 /**
335 * Static attribute for space.
336 */
337 public static final String TWO = "2";
338 /**
339 * Static attribute for space.
340 */
341 public static final String FLAG = "flag";
342 /**
343 * Static attribute for result.
344 */
345 public static final String RESULT = "result";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530346
347 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530348 * Static attribute for isSelectAllSchemaChild.
349 */
350 public static final String SELECT_ALL_CHILD = "isSelectAllSchemaChild";
351
352 /**
Bharat saraswal748fc3c2016-09-06 16:38:20 +0530353 * Static attribute for schema name.
354 */
355 public static final String SCHEMA_NAME = "schemaName";
356
357 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530358 * Static attribute for validateRange.
359 */
360 public static final String VALIDATE_RANGE = "validateRange";
361
362 /**
363 * Static attribute for minRange.
364 */
365 public static final String MIN_RANGE = "minRange";
366
367 /**
368 * Static attribute for maxRange.
369 */
370 public static final String MAX_RANGE = "maxRange";
371
372 /**
373 * Static attribute for minRange.
374 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530375 public static final String SHORT_MIN_RANGE_ATTR =
376 "static final int INT16_MIN_RANGE = -32768;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530377
378 /**
379 * Static attribute for minRange.
380 */
381 public static final String SHORT_MIN_RANGE = "INT16_MIN_RANGE";
382
383 /**
384 * Static attribute for minRange.
385 */
386 public static final String SHORT_MAX_RANGE = "INT16_MAX_RANGE";
387
388 /**
389 * Static attribute for maxRange.
390 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530391 public static final String SHORT_MAX_RANGE_ATTR =
392 "static final int INT16_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530393
394
395 /**
396 * Static attribute for minRange.
397 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530398 public static final String UINT8_MIN_RANGE_ATTR =
399 "static final int UINT8_MIN_RANGE = 0;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530400
401 /**
402 * Static attribute for maxRange.
403 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530404 public static final String UINT8_MAX_RANGE_ATTR =
405 "static final int UINT8_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530406
407
408 /**
409 * Static attribute for minRange.
410 */
411 public static final String UINT8_MIN_RANGE = "UINT8_MIN_RANGE";
412
413 /**
414 * Static attribute for maxRange.
415 */
416 public static final String UINT8_MAX_RANGE = "UINT8_MAX_RANGE";
417
418 /**
419 * Static attribute for minRange.
420 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530421 public static final String INT_MIN_RANGE_ATTR =
422 "static final int INT32_MIN_RANGE = -2147483648;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530423
424 /**
425 * Static attribute for minRange.
426 */
427 public static final String INT_MIN_RANGE = "INT32_MIN_RANGE";
428
429 /**
430 * Static attribute for minRange.
431 */
432 public static final String INT_MAX_RANGE = "INT32_MAX_RANGE";
433
434 /**
435 * Static attribute for maxRange.
436 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530437 public static final String INT_MAX_RANGE_ATTR =
438 "static final int INT32_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530439
440
441 /**
442 * Static attribute for minRange.
443 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530444 public static final String UINT_MIN_RANGE_ATTR =
445 "static final int UINT16_MIN_RANGE = 0;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530446
447 /**
448 * Static attribute for maxRange.
449 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530450 public static final String UINT_MAX_RANGE_ATTR =
451 "static final int UINT16_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530452
453
454 /**
455 * Static attribute for minRange.
456 */
457 public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE";
458
459 /**
460 * Static attribute for maxRange.
461 */
462 public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE";
463
464 /**
465 * Static attribute for minRange.
466 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530467 public static final String LONG_MIN_RANGE_ATTR =
468 "static final BigInteger INT64_MIN_RANGE =" +
469 " new BigInteger(\"-9223372036854775808\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530470
471 /**
472 * Static attribute for maxRange.
473 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530474 public static final String LONG_MAX_RANGE_ATTR =
475 "static final BigInteger INT64_MAX_RANGE =" +
476 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530477
478 /**
479 * Static attribute for minRange.
480 */
481 public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE";
482
483 /**
484 * Static attribute for maxRange.
485 */
486 public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE";
487
488 /**
489 * Static attribute for minRange.
490 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530491 public static final String ULONG_MIN_RANGE_ATTR =
492 "static final BigInteger UINT32_MIN_RANGE =" +
493 " new BigInteger(\"0\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530494
495 /**
496 * Static attribute for maxRange.
497 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530498 public static final String ULONG_MAX_RANGE_ATTR =
499 "static final BigInteger UINT32_MAX_RANGE =" +
500 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530501
502
503 /**
504 * Static attribute for minRange.
505 */
506 public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE";
507
508 /**
509 * Static attribute for maxRange.
510 */
511 public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE";
512
513 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530514 * Static attribute for subject.
515 */
516 public static final String SUBJECT = "Subject";
517
518 /**
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530519 * Static attribute for ListenerService.
520 */
521 public static final String LISTENER_SERVICE = "ListenerService";
522
523 /**
524 * Static attribute for listener package.
525 */
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530526 public static final String ONOS_EVENT_PKG = "org.onosproject.event";
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530527
528 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +0530529 * Static attribute for colon.
530 */
531 public static final String COLON = ":";
532
533 /**
534 * Static attribute for caret.
535 */
536 public static final String CARET = "^";
537
538 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530539 * Static attribute for input string.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530540 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530541 public static final String INPUT = "input";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530542
543 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530544 * Static attribute for output string.
545 */
546 public static final String OUTPUT = "output";
547
548 /**
549 * Static attribute for current string.
550 */
551 public static final String CURRENT = "current";
552
553 /**
janani bb08850e2016-05-17 18:20:33 +0530554 * Static attribute for leafref string.
555 */
556 public static final String LEAFREF = "leafref";
557
558 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530559 * Static attribute for output variable of rpc.
560 */
561 public static final String RPC_INPUT_VAR_NAME = "inputVar";
562
563 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530564 * Static attribute for new line.
565 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530566 public static final String EQUAL = "=";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530567
568 /**
569 * Static attribute for slash syntax.
570 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530571 public static final String SLASH = File.separator;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530572
573 /**
574 * Static attribute for add syntax.
575 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530576 public static final String ADD = "+";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530577
578 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530579 * Static attribute for quotes.
580 */
b.jananie6d43af2016-03-04 12:29:05 +0530581 public static final String QUOTES = "\"";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530582
583 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530584 * Static attribute for zero.
585 */
586 public static final String ZERO = "0";
587
588 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530589 * Static attribute for ampersand.
590 */
b.jananie6d43af2016-03-04 12:29:05 +0530591 public static final String AND = "&";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530592
593 /**
594 * Static attribute for comma.
595 */
b.jananie6d43af2016-03-04 12:29:05 +0530596 public static final String COMMA = ",";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530597
598 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +0530599 * Static attribute for class.
600 */
601 public static final String CLASS_STRING = "Class";
602
603 /**
604 * Static attribute for put.
605 */
606 public static final String PUT = "put";
607
608 /**
609 * Static attribute for get.
610 */
611 public static final String GET = "get";
612
613 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530614 * Static attribute for slash character.
615 */
616 public static final char CHAR_OF_SLASH = '/';
617
618 /**
619 * Static attribute for open square bracket character.
620 */
621 public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '[';
622
623 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530624 * Static attribute for slash string.
625 */
626 public static final String SLASH_FOR_STRING = "/";
627
628 /**
629 * Static attribute for open square bracket.
630 */
631 public static final String OPEN_SQUARE_BRACKET = "[";
632
633 /**
634 * Static attribute for ancestor accessor.
635 */
janani b3a3e3262016-10-19 00:23:28 +0530636 public static final String ANCESTOR = "..";
janani b0e4e8ae2016-07-13 21:06:41 +0530637
638 /**
639 * Static attribute for ancestor accessor along with path.
640 */
janani b3a3e3262016-10-19 00:23:28 +0530641 public static final String SLASH_ANCESTOR = "../";
janani b0e4e8ae2016-07-13 21:06:41 +0530642
643 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530644 * Static attribute for add syntax.
645 */
b.jananie6d43af2016-03-04 12:29:05 +0530646 public static final String ADD_STRING = "add";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530647
648 /**
Bharat saraswala5c28512016-11-10 21:09:23 +0530649 * Static attribute for key syntax.
650 */
651 public static final String KEYS = "Keys";
652
653 /**
654 * Static attribute for key syntax.
655 */
656 public static final String GET_KEY = "getKey()";
657
658 /**
659 * Static attribute for key syntax.
660 */
661 public static final String GET_VALUE = "getValue()";
662
663 /**
664 * Static attribute for -1 to syntax.
665 */
666 public static final String NEG_ONE = "-1";
667
668 /**
669 * Static attribute for Comparable to syntax.
670 */
671 public static final String COMPARABLE = "Comparable";
672
673 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530674 * Static attribute for string trim syntax.
675 */
676 public static final String TRIM_STRING = "trim";
677
678 /**
679 * Static attribute for string split syntax.
680 */
681 public static final String SPLIT_STRING = "split";
682
683 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530684 * Static attribute for Pattern.
685 */
686 public static final String PATTERN = "Pattern";
687
688 /**
689 * Static attribute for Quote.
690 */
691 public static final String QUOTE_STRING = "quote";
692
693 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530694 * Static attribute for from syntax.
695 */
696 public static final String FROM_STRING_METHOD_NAME = "fromString";
697
698 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530699 * Static attribute for check not null syntax.
700 */
b.jananie6d43af2016-03-04 12:29:05 +0530701 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530702
703 /**
704 * Static attribute for hash code syntax.
705 */
b.jananie6d43af2016-03-04 12:29:05 +0530706 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530707
708 /**
709 * Static attribute for equals syntax.
710 */
b.jananie6d43af2016-03-04 12:29:05 +0530711 public static final String EQUALS_STRING = "equals";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530712
713 /**
714 * Static attribute for object.
715 */
b.jananie6d43af2016-03-04 12:29:05 +0530716 public static final String OBJECT_STRING = "Object";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530717
718 /**
719 * Static attribute for instance of syntax.
720 */
b.jananie6d43af2016-03-04 12:29:05 +0530721 public static final String INSTANCE_OF = " instanceof ";
722
Bharat saraswald532a4c2016-03-25 18:19:46 +0530723 /**
724 * Static attribute for value syntax.
725 */
b.jananie6d43af2016-03-04 12:29:05 +0530726 public static final String VALUE = "value";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530727
728 /**
Bharat saraswala5c28512016-11-10 21:09:23 +0530729 * Static attribute for value syntax.
730 */
731 public static final String VALUE_CAPS = "Value";
732
733 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530734 * Static attribute for suffix s.
735 */
Bharat saraswal84366c52016-03-23 19:40:35 +0530736 public static final String SUFFIX_S = "s";
b.jananie6d43af2016-03-04 12:29:05 +0530737
Bharat saraswald532a4c2016-03-25 18:19:46 +0530738 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530739 * Static attribute for string builder var.
740 */
741 public static final String STRING_BUILDER_VAR = "sBuild";
742 /**
743 * Static attribute for string builder var.
744 */
745 public static final String APPEND = "append";
746
747 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530748 * Static attribute for if.
749 */
b.jananie6d43af2016-03-04 12:29:05 +0530750 public static final String IF = "if";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530751
752 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530753 * Static attribute for of.
754 */
b.jananie6d43af2016-03-04 12:29:05 +0530755 public static final String OF = "of";
Bharat saraswal94844d62016-10-13 13:28:03 +0530756 /**
757 * Static attribute for of.
758 */
759 public static final String OF_CAPS = "Of";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530760
761 /**
762 * Static attribute for other.
763 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530764 public static final String OTHER = "other";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530765
766 /**
767 * Static attribute for obj syntax.
768 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530769 public static final String OBJ = "obj";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530770
771 /**
772 * Static attribute for hash syntax.
773 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530774 public static final String HASH = "hash";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530775
776 /**
777 * Static attribute for to syntax.
778 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530779 public static final String TO = "to";
b.jananie6d43af2016-03-04 12:29:05 +0530780
Bharat saraswald532a4c2016-03-25 18:19:46 +0530781 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530782 * Static attribute for to syntax.
783 */
784 public static final String TO_CAPS = "To";
785
786 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530787 * Static attribute for true syntax.
788 */
b.jananie6d43af2016-03-04 12:29:05 +0530789 public static final String TRUE = "true";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530790
791 /**
792 * Static attribute for false syntax.
793 */
b.jananie6d43af2016-03-04 12:29:05 +0530794 public static final String FALSE = "false";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530795
796 /**
797 * Static attribute for org.
798 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530799 public static final String ORG = "org";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530800
801 /**
802 * Static attribute for temp.
803 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530804 public static final String TEMP = "Temp";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530805
806 /**
807 * Static attribute for YANG file directory.
808 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530809 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530810
811 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530812 * Static attribute for diamond close bracket syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530813 */
814 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530815
816 /**
817 * Static attribute for diamond close bracket syntax.
818 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530819 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530820
821 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530822 * Static attribute for event type.
823 */
824 public static final String EVENT_TYPE = ".Type";
825
826 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530827 * Static attribute for exception syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530828 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530829 public static final String EXCEPTION = "Exception";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530830
831 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530832 * Static attribute for exception variable syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530833 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530834 public static final String EXCEPTION_VAR = "e";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530835
836 /**
837 * Static attribute for open parenthesis syntax.
838 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530839 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530840
841 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530842 * Static attribute for switch syntax.
843 */
844 public static final String SWITCH = "switch";
845
846 /**
847 * Static attribute for case syntax.
848 */
849 public static final String CASE = "case";
850
851 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530852 * Static attribute for temp val syntax.
853 */
854 public static final String TMP_VAL = "tmpVal";
855
856 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530857 * Static attribute for close curly bracket syntax.
858 */
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530859 public static final String ELSE = " else ";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530860
861 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530862 * From string parameter name.
863 */
864 public static final String FROM_STRING_PARAM_NAME = "valInString";
865
866 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530867 * Static attribute for close parenthesis syntax.
868 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530869 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530870
871 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530872 * Static attribute for empty parameter function call.
873 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530874 public static final String OPEN_CLOSE_BRACKET_STRING = "()";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530875
876 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530877 * Static attribute for empty parameter function call.
878 */
879 public static final String OPEN_CLOSE_DIAMOND_STRING = "<>";
880
881 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530882 * Static attribute for open curly bracket syntax.
883 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530884 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530885
886 /**
887 * Static attribute for close curly bracket syntax.
888 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530889 public static final String CLOSE_CURLY_BRACKET = "}";
890
891 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +0530892 * Static attribute for square brackets syntax.
893 */
894 public static final String SQUARE_BRACKETS = "[]";
895
896 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530897 * Static attribute for getter method prefix.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530898 */
899 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530900
901 /**
902 * Static attribute for setter method prefix.
903 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530904 public static final String SET_METHOD_PREFIX = "set";
905
906 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530907 * Static attribute for op param.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530908 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530909 public static final String OP_PARAM = "OpParam";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530910
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530911
912 /**
913 * Static attribute for is filter content match method prefix.
914 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530915 public static final String PROCESS_SUBTREE_FILTERING =
916 "processSubtreeFiltering";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530917
918 /**
919 * variable name of the subtree filtering result builder.
920 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530921 public static final String SUBTREE_FILTERING_RESULT_BUILDER =
922 "subTreeFilteringResultBuilder";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530923
924 /**
925 * variable name of the subtree filtering result flag.
926 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530927 public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG =
928 "isAnySelectOrContainmentNode";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530929
930 /**
931 * variable name of the subtree filtering to select all child.
932 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530933 public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG =
934 "isSelectAllSchemaChild";
Bharat saraswal8beac342016-08-04 02:00:03 +0530935
936 /**
937 * Static attribute for break prefix.
938 */
939 public static final String BREAK = "break";
940
941 /**
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530942 * Static attribute for isEmpty.
Bharat saraswal8beac342016-08-04 02:00:03 +0530943 */
944 public static final String IS_EMPTY = "isEmpty()";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530945 /**
946 * Static attribute for exception string in bits enum class.
947 */
Bharat saraswala5c28512016-11-10 21:09:23 +0530948 public static final String EXCEPTION_STRING = "IllegalArgumentException" +
949 "(\"not a valid input element\");\n";
950
951 /**
952 * Static attribute for priority queue.
953 */
954 public static final String PRIORITY_QUEUE = "java.util.PriorityQueue<>()";
955
956 /**
957 * Static attribute for linked hash set.
958 */
959 public static final String LINKED_HASH_SET = "java.util.LinkedHashSet<>()";
960
961 /**
962 * Static attribute for priority queue.
963 */
964 public static final String LINKED_HASH_MAP = "java.util.LinkedHashMap<>()";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530965
966 /**
967 * Static attribute for "throw new ".
968 */
969 public static final String THROW_NEW = "throw new ";
Bharat saraswal8beac342016-08-04 02:00:03 +0530970
971 /**
972 * Static attribute for is isLeafValueSet method prefix.
973 */
974 public static final String VALUE_LEAF_SET = "isLeafValueSet";
975
976 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530977 * Static attribute for is valueLeafFlags method prefix.
978 */
979 public static final String VALUE_LEAF = "valueLeafFlags";
980
981 /**
982 * Static attribute for is selectLeafFlags method prefix.
983 */
984 public static final String SELECT_LEAF = "selectLeafFlags";
985
986 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530987 * Static attribute for is isSelectLeaf method prefix.
988 */
989 public static final String IS_SELECT_LEAF = "isSelectLeaf";
990
991 /**
992 * Static attribute for is selectLeaf method prefix.
993 */
994 public static final String SET_SELECT_LEAF = "selectLeaf";
995
996 /**
997 * Static attribute for is LeafIdentifier enum prefix.
998 */
999 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301000 /**
1001 * Static attribute for is leaf.
1002 */
1003 public static final String LEAF = "leaf";
Bharat saraswal8beac342016-08-04 02:00:03 +05301004
1005 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301006 * Static attribute for four space indentation.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301007 */
1008 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301009
1010 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301011 * Static attribute for not syntax.
1012 */
1013 public static final String NOT = "!";
1014
1015 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +05301016 * Static attribute for try syntax.
1017 */
1018 public static final String TRY = "try";
1019
1020 /**
1021 * Static attribute for catch syntax.
1022 */
1023 public static final String CATCH = "catch";
1024
1025 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301026 * Static attribute for eight space indentation.
1027 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301028 public static final String EIGHT_SPACE_INDENTATION =
1029 FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301030
1031 /**
1032 * Static attribute for twelve space indentation.
1033 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301034 public static final String TWELVE_SPACE_INDENTATION =
1035 EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301036
1037 /**
1038 * Static attribute for sixteen space indentation.
1039 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301040 public static final String SIXTEEN_SPACE_INDENTATION =
1041 TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301042
1043 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301044 * Static attribute for twenty space indentation.
1045 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301046 public static final String TWENTY_SPACE_INDENTATION =
1047 SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal8beac342016-08-04 02:00:03 +05301048
1049 /**
1050 * Static attribute for twenty four space indentation.
1051 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301052 public static final String TWENTY_FOUR_SPACE_INDENTATION =
1053 TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301054
1055 /**
1056 * Static attribute for twenty eight space indentation.
1057 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301058 public static final String TWENTY_EIGHT_SPACE_INDENTATION =
1059 TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301060
1061 /**
1062 * Static attribute for thirty two space indentation.
1063 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301064 public static final String THIRTY_TWO_SPACE_INDENTATION =
1065 TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301066
1067 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301068 * Static attribute for generated code path.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301069 */
Bharat saraswal5600f0f2016-03-09 18:34:56 +05301070 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301071
1072 /**
1073 * Static attribute for base package.
1074 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301075 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301076
1077 /**
1078 * Static attribute for YANG date prefix.
1079 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301080 public static final String REVISION_PREFIX = "rev";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301081
1082 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301083 * Static attribute for YANG automatic prefix for identifiers with keywords
1084 * and beginning with digits.
janani b1c6acc42016-04-15 16:18:30 +05301085 */
1086 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
1087
1088 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301089 * Static attribute for YANG version prefix.
Bharat saraswald532a4c2016-03-25 18:19:46 +05301090 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301091 public static final String VERSION_PREFIX = "v";
1092
1093 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301094 * Static attribute for private modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301095 */
1096 public static final String PRIVATE = "private";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301097
1098 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301099 * Static attribute for public modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301100 */
Bharat saraswald532a4c2016-03-25 18:19:46 +05301101 public static final String PUBLIC = "public";
1102
1103 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301104 * Static attribute for abstract modifier.
1105 */
1106 public static final String ABSTRACT = "abstract";
1107
1108 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301109 * Static attribute for protected modifier.
1110 */
1111 public static final String PROTECTED = "protected";
1112
1113 /**
Vinod Kumar S08710982016-03-03 19:55:30 +05301114 * Void java type.
1115 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301116 public static final String VOID = "void";
Vinod Kumar S08710982016-03-03 19:55:30 +05301117
1118 /**
1119 * String built in java type.
1120 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301121 public static final String STRING_DATA_TYPE = "String";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301122
Vinod Kumar S08710982016-03-03 19:55:30 +05301123 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301124 * String built in java type.
1125 */
1126 public static final String STRING_BUILDER = "StringBuilder";
1127 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301128 * Java.lang.* packages.
Vinod Kumar S08710982016-03-03 19:55:30 +05301129 */
1130 public static final String JAVA_LANG = "java.lang";
1131
1132 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301133 * Java.math.* packages.
1134 */
1135 public static final String JAVA_MATH = "java.math";
1136
1137 /**
1138 * Boolean built in java type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301139 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301140 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar S08710982016-03-03 19:55:30 +05301141
1142 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301143 * BigInteger built in java type.
1144 */
1145 public static final String BIG_INTEGER = "BigInteger";
1146
1147 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301148 * BigDecimal built in java type.
1149 */
1150 public static final String BIG_DECIMAL = "BigDecimal";
1151
1152 /**
1153 * BitSet built in java type.
1154 */
1155 public static final String BIT_SET = "BitSet";
1156
1157 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301158 * Flag for subtree filtering in augment.
1159 */
1160 public static final String SUBTREE_FILTERED = "isSubTreeFiltered";
1161
1162 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301163 * Augment map type.
1164 */
1165 public static final String AUGMENT_MAP_TYPE = "Map<Class<?>, Object>";
1166
1167 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301168 * Byte java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301169 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301170 public static final String BYTE = "byte";
Vinod Kumar S08710982016-03-03 19:55:30 +05301171
1172 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301173 * Short java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301174 */
1175 public static final String SHORT = "short";
1176
1177 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301178 * Int java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301179 */
1180 public static final String INT = "int";
1181
1182 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301183 * Long java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301184 */
1185 public static final String LONG = "long";
1186
1187 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301188 * Double java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301189 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301190 public static final String DOUBLE = "double";
1191
1192 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301193 * Boolean built in java wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301194 */
1195 public static final String BOOLEAN_WRAPPER = "Boolean";
1196
1197 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301198 * Byte java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301199 */
1200 public static final String BYTE_WRAPPER = "Byte";
1201
1202 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301203 * Short java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301204 */
1205 public static final String SHORT_WRAPPER = "Short";
1206
1207 /**
1208 * Integer java built in wrapper type.
1209 */
1210 public static final String INTEGER_WRAPPER = "Integer";
1211
1212 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301213 * Long java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301214 */
1215 public static final String LONG_WRAPPER = "Long";
1216
1217 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301218 * Static variable for question mark.
Vinod Kumar S08710982016-03-03 19:55:30 +05301219 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301220 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301221
1222 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301223 * Static variable for forType string.
1224 */
1225 public static final String FOR_TYPE_STRING = " for type ";
1226
1227 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301228 * List of keywords in java, this is used for checking if the input does not
1229 * contain these keywords.
b.jananie6d43af2016-03-04 12:29:05 +05301230 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301231 public static final List<String> JAVA_KEY_WORDS =
1232 Arrays.asList("abstract", "assert", "boolean", "break", "byte",
1233 "case", "catch", "char", "class", "const", "continue",
1234 "default", "do", "double", "else", "extends", "false",
1235 "final", "finally", "float", "for", "goto", "if",
1236 "implements", "import", "instanceof", "enum", "int",
1237 "interface", "long", "native", "new", "null",
1238 "package", "private", "protected", "public", "return",
1239 "short", "static", "strictfp", "super", "switch",
1240 "synchronized", "this", "throw", "throws", "transient",
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301241 "true", "try", "void", "volatile", "while", "list",
Bharat saraswal51c5d672016-11-13 09:03:48 +05301242 "map", "arrayList", "hashMap", "linkedList", "notify",
1243 "notifyAll", "Method",
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301244 "collections");
b.jananie6d43af2016-03-04 12:29:05 +05301245
1246 /**
janani b1c6acc42016-04-15 16:18:30 +05301247 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301248 */
janani b1c6acc42016-04-15 16:18:30 +05301249 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1250
1251 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301252 * Static attribute for regex for three special characters used in
1253 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301254 */
1255 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1256
1257 /**
1258 * Static attribute for regex for period.
1259 */
1260 public static final String REGEX_FOR_PERIOD = "[.]";
1261
1262 /**
1263 * Static attribute for regex for underscore.
1264 */
1265 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1266
1267 /**
1268 * Static attribute for regex for hyphen.
1269 */
1270 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301271
1272 /**
1273 * Static attribute for regex for digits.
1274 */
b.jananie6d43af2016-03-04 12:29:05 +05301275 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1276
1277 /**
janani b703cfe42016-05-17 13:12:22 +05301278 * Static attribute for regex with digits.
1279 */
1280 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1281
1282 /**
janani b1c6acc42016-04-15 16:18:30 +05301283 * Static attribute for regex for single letter.
1284 */
1285 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1286
1287 /**
1288 * Static attribute for regex for digits with single letter.
1289 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301290 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1291 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301292
1293 /**
janani b703cfe42016-05-17 13:12:22 +05301294 * Static attribute for regex with uppercase.
1295 */
1296 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1297
1298 /**
1299 * Static attribute for regex for single capital case letter.
1300 */
1301 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1302
1303 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301304 * Static attribute for regex for capital case letter with any number of
1305 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301306 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301307 public static final String
1308 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1309 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301310
1311 /**
janani b3e357f62016-05-19 17:39:50 +05301312 * Static attribute for regex for any string ending with service.
1313 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301314 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1315 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301316
1317 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301318 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301319 */
1320 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301321
1322 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301323 * Static attribute for builder syntax.
1324 */
1325 public static final String BUILDER = "Builder";
1326
1327 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301328 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301329 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301330 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301331
1332 /**
1333 * Static attribute for service syntax.
1334 */
1335 public static final String SERVICE = "Service";
1336
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301337 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301338 * Static attribute for interface syntax.
1339 */
1340 public static final String INTERFACE = "interface";
1341
1342 /**
1343 * Static attribute for enum syntax.
1344 */
1345 public static final String ENUM = "enum";
1346
1347 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301348 * Static attribute for type syntax.
1349 */
1350 public static final String TYPE = "Type";
1351
1352 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301353 * Static attribute for static syntax.
1354 */
1355 public static final String STATIC = "static";
1356
1357 /**
1358 * Static attribute for final syntax.
1359 */
1360 public static final String FINAL = "final";
1361
1362 /**
1363 * Static attribute for package syntax.
1364 */
1365 public static final String PACKAGE = "package";
1366
1367 /**
1368 * Static attribute for import syntax.
1369 */
1370 public static final String IMPORT = "import ";
1371
1372 /**
1373 * Static attribute for null syntax.
1374 */
1375 public static final String NULL = "null";
1376
1377 /**
1378 * Static attribute for return syntax.
1379 */
1380 public static final String RETURN = "return";
1381
1382 /**
1383 * Static attribute for java new syntax.
1384 */
1385 public static final String NEW = "new";
1386
1387 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301388 * Static attribute for java new syntax.
1389 */
1390 public static final String TO_STRING_METHOD = "toString";
1391
1392 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301393 * Static attribute for this syntax.
1394 */
1395 public static final String THIS = "this";
1396
1397 /**
1398 * Static attribute for implements syntax.
1399 */
1400 public static final String IMPLEMENTS = "implements";
1401
1402 /**
1403 * Static attribute for extends syntax.
1404 */
1405 public static final String EXTEND = "extends";
1406
1407 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301408 * Static attribute for service interface suffix syntax.
1409 */
1410 public static final String SERVICE_METHOD_STRING = "Service";
1411
1412 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301413 * For event file generation.
1414 */
1415 public static final String EVENT_STRING = "Event";
1416
1417 /**
1418 * For event listener file generation.
1419 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301420 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301421
1422 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301423 * For event subject file generation.
1424 */
1425 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1426
1427 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301428 * Static attribute for build method syntax.
1429 */
1430 public static final String BUILD = "build";
1431
1432 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301433 * Static attribute for build for filter in augment method syntax.
1434 */
1435 public static final String BUILD_FOR_FILTER = "buildForFilter";
1436
1437 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301438 * Static attribute for object.
1439 */
1440 public static final String OBJECT = "Object";
1441
1442 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301443 * Static attribute for app instance.
1444 */
1445 public static final String APP_INSTANCE = "appInstance";
1446
1447 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301448 * Static attribute for instance.
1449 */
1450 public static final String INSTANCE = "instance";
1451
1452 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301453 * Static attribute for override annotation.
1454 */
1455 public static final String OVERRIDE = "@Override";
1456
1457 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301458 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301459 */
b.jananie6d43af2016-03-04 12:29:05 +05301460 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301461
1462 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301463 * Static attribute for reflect.
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301464 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301465 public static final String REFLECT_IMPORTS = "java.lang.reflect";
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301466
1467 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301468 * Static attribute for map.
1469 */
1470 public static final String MAP = "Map";
1471
1472 /**
1473 * Static attribute for hash map.
1474 */
1475 public static final String HASH_MAP = "HashMap";
1476
1477
1478 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301479 * Static attribute for more object import package.
1480 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301481 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1482 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301483
1484 /**
1485 * Static attribute for more object import class.
1486 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301487 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301488 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301489
1490 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301491 * Static attribute for more object import class.
1492 */
1493 public static final String MORE_OBJ_ATTR =
1494 "MoreObjects.ToStringHelper helper = ";
1495
1496 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301497 * Static attribute for to string method.
1498 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301499 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301500 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301501
1502 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301503 * Static attribute for to string method.
1504 */
1505 public static final String GOOGLE_MORE_OBJECT_METHOD_STATIC_STRING =
1506 "MoreObjects.toStringHelper";
1507
1508 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301509 * Static attribute for java utilities import package.
1510 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301511 public static final String JAVA_UTIL_PKG = "java.util";
1512
1513 /**
1514 * Static attribute for java utilities import package.
1515 */
1516 public static final String JAVA_UTIL_REGEX_PKG = "java.util.regex";
1517
1518 /**
1519 * Static attribute for java utilities import package.
1520 */
1521 public static final String SET_VALUE_PARA = "setValue";
1522
1523 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301524 * Static attribute for Method.
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301525 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301526 public static final String METHOD = "Method";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301527
1528 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301529 * Static attribute for bitset.
1530 */
1531 public static final String BITSET = "BitSet";
1532
1533 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301534 * Static attribute for java utilities objects import class.
1535 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301536 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301537
1538 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301539 * Static attribute for AugmentedInfo class.
1540 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301541 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301542
1543 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301544 * Static attribute for AugmentedInfo class.
1545 */
1546 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1547 "yangAugmentedInfo";
1548
1549 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301550 * Static attribute for AugmentedInfo class.
1551 */
1552 public static final String YANG_AUGMENTED_INFO_MAP =
1553 "yangAugmentedInfoMap";
1554
1555 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301556 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301557 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301558 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301559
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301560 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301561 * Static attribute for list.
1562 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301563 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301564
1565 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301566 * Static attribute for queue.
1567 */
1568 public static final String QUEUE = "Queue";
1569
1570 /**
1571 * Static attribute for set.
1572 */
1573 public static final String SET = "Set";
1574
1575 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301576 * Comment to be added for auto generated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301577 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301578 public static final String YANG_UTILS_TODO =
1579 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301580
1581 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301582 * Static attribute for AbstractEvent.
1583 */
1584 public static final String ABSTRACT_EVENT = "AbstractEvent";
1585
1586 /**
1587 * Static attribute for EventListener.
1588 */
1589 public static final String EVENT_LISTENER = "EventListener";
1590
1591 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301592 * Static attribute for or operator.
1593 */
1594 public static final String OR_OPERATION = "||";
1595
1596 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301597 * Static attribute for or operator.
1598 */
1599 public static final String AND_OPERATION = "&&";
1600
1601 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301602 * Static attribute for YANG file error.
1603 */
1604 public static final String YANG_FILE_ERROR = "YANG file error : ";
1605
1606 /**
1607 * Static attribute for unsupported error information.
1608 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301609 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1610 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301611
1612 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301613 * Static attribute for "is invalid" information.
1614 */
1615 public static final String IS_INVALID = " is invalid.";
1616
1617 /**
1618 * Static attribute for data model tree error information.
1619 */
1620 public static final String INVALID_TREE = "Internal datamodel error: " +
1621 "Datamodel tree is not correct";
1622
1623 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301624 * Static attribute for currently unsupported error information.
1625 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301626 public static final String CURRENTLY_UNSUPPORTED =
1627 " is not supported in current version, please check wiki" +
1628 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301629
1630 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301631 * Static attribute for leaf ref target node error information.
1632 */
1633 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1634 " node, in the leafref path ";
1635
1636 /**
1637 * Static attribute for leaf holder error information.
1638 */
1639 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1640 " type leaves holder in ";
1641
1642 /**
1643 * Static attribute for invalid resolve entity error information.
1644 */
1645 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1646 "Exception: Entity to resolved is other than type/uses";
1647
1648 /**
1649 * Static attribute for invalid resolve entity error information.
1650 */
1651 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1652 "to resolved is other than identityref";
1653
1654 /**
1655 * Static attribute for invalid state error information.
1656 */
1657 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1658 "Unsupported, linker state";
1659
1660 /**
1661 * Static attribute for leaf ref resolve entity error information.
1662 */
1663 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1664 "error: Unable to find base leaf/leaf-list for given leafref path ";
1665
1666 /**
1667 * Static attribute for compiler annotation resolve entity error
1668 * information.
1669 */
1670 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1671 "compiler annotation ";
1672
1673 /**
1674 * Static attribute for failed to link entity error information.
1675 */
1676 public static final String FAILED_TO_LINK = "Failed to link ";
1677
1678 /**
1679 * Static attribute for un-resolve entity error information.
1680 */
1681 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1682 "to resolved is not Resolvable";
1683
1684 /**
1685 * Static attribute for invalid resolve entity error information.
1686 */
1687 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1688 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1689
1690 /**
1691 * Static attribute for invalid resolve entity error information.
1692 */
1693 public static final String INVALID_TARGET = "Invalid target node type ";
1694 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301695 * Static attribute for typedef linker error information.
1696 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301697 public static final String TYPEDEF_LINKER_ERROR =
1698 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301699
1700 /**
1701 * Static attribute for grouping linker error information.
1702 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301703 public static final String GROUPING_LINKER_ERROR =
1704 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301705
1706 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301707 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301708 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301709 public static final String FEATURE_LINKER_ERROR =
1710 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301711
1712 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301713 * Static attribute for leafref linker error information.
1714 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301715 public static final String LEAFREF_LINKER_ERROR =
1716 "YANG file error: Unable to find base leaf/leaf-list for given " +
1717 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301718
1719 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301720 * Static attribute for base linker error information.
1721 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301722 public static final String BASE_LINKER_ERROR =
1723 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301724
1725 /**
1726 * Static attribute for identityref linker error information.
1727 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301728 public static final String IDENTITYREF_LINKER_ERROR =
1729 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301730
1731 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301732 * Static attribute for jar.
1733 */
1734 public static final String JAR = "jar";
1735
1736 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301737 * Static attribute for for.
1738 */
1739 public static final String FOR = "for";
1740
1741 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301742 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301743 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301744 public static final String INVOCATION_TARGET_EXCEPTION =
1745 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301746 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301747 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301748 */
Bharat saraswal51c5d672016-11-13 09:03:48 +05301749 public static final String ARRAY_LIST_INIT = "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 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301830 * Static attribute for bits.
1831 */
1832 public static final String BITS = "bits";
1833
1834 /**
1835 * Static attribute for YANG.
1836 */
1837 public static final String YANG = "yang";
1838
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301839 /**
1840 * Static attribute for error msg.
1841 */
1842 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1843 "multiple yang" + " files has same module/submodule" +
1844 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1845 " previous build present in your directory.";
1846
1847 /**
1848 * Static attribute for error msg.
1849 */
1850 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1851 "identity instance node ";
Bharat saraswal94844d62016-10-13 13:28:03 +05301852
1853 /**
1854 * Static attribute for error msg.
1855 */
1856 public static final String ERROR_MSG_FOR_AUGMENT_LINKING = "Augment " +
1857 "linking does not support linking when path contains " +
1858 "notification/grouping for path: ";
1859
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301860 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301861 * Static attribute for error msg.
1862 */
1863 public static final String VERSION_ERROR = "Onos-yang-tools " +
1864 "does not support maven version below \"3.3.9\" , your current " +
1865 "version is ";
1866
1867 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301868 * Static attribute for in.
1869 */
1870 public static final String IN = " in ";
1871
1872 /**
1873 * Static attribute for at.
1874 */
1875 public static final String AT = " at ";
1876
Bharat saraswal0663aff2016-10-18 23:16:14 +05301877 /**
1878 * Static param for processChildNodesSubTreeFiltering.
1879 */
1880 public static final String PROCESS_CHILD_NODE_STF_PARAM =
1881 "processChildNodesSubTreeFiltering";
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301882
1883 /**
1884 * Static param for processLeafListSubTreeFiltering.
1885 */
1886 public static final String PROCESS_LEAF_LIST_STF_PARAM =
1887 "processLeafListSubTreeFiltering";
1888 /**
1889 * Static param for processLeafListSubTreeFiltering.
1890 */
1891 public static final String PROCESS_LEAF_STF_PARAM =
1892 "processLeafSubtreeFiltering";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301893 /**
1894 * Static param for subTreeFilteringResultBuilder.
1895 */
1896 public static final String STF_BUILDER_PARAM =
1897 "subTreeFilteringResultBuilder";
1898
1899 /**
1900 * Static param for isAnySelectOrContainmentNode.
1901 */
1902 public static final String SELECT_OR_CONTAINMENT_NODE_PARAM =
1903 "isAnySelectOrContainmentNode";
1904 /**
1905 * Static param for isSelectAllSchemaChild.
1906 */
1907 public static final String SELECT_ALL_CHILD_SCHEMA_PARAM =
1908 "isSelectAllSchemaChild";
1909
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301910 //File type extension for java classes.
1911 public static final String JAVA_FILE_EXTENSION = ".java";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301912
Bharat saraswal51c5d672016-11-13 09:03:48 +05301913 /**
1914 * Static param for typedef.
1915 */
1916 public static final String HOLDER_TYPE_DEF = "typedef";
1917
1918 /**
1919 * Static param for last.
1920 */
1921 public static final String LAST = "last";
1922
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301923 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301924 private UtilConstants() {
1925 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301926
1927 /**
1928 * Represents operation type.
1929 */
1930 public enum Operation {
1931 /**
1932 * Represents add operation.
1933 */
1934 ADD,
1935
1936 /**
1937 * Represents remove operation.
1938 */
1939 REMOVE
1940 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301941}