blob: 8266eca3f39b0993a791139d6c7e9bfae55e0ae6 [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 saraswalc2fd3222016-10-19 16:10:27 +0530319 /**
320 * Static attribute for space.
321 */
322 public static final String TWO = "2";
323 /**
324 * Static attribute for space.
325 */
326 public static final String FLAG = "flag";
327 /**
328 * Static attribute for result.
329 */
330 public static final String RESULT = "result";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530331
332 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530333 * Static attribute for isSelectAllSchemaChild.
334 */
335 public static final String SELECT_ALL_CHILD = "isSelectAllSchemaChild";
336
337 /**
Bharat saraswal748fc3c2016-09-06 16:38:20 +0530338 * Static attribute for schema name.
339 */
340 public static final String SCHEMA_NAME = "schemaName";
341
342 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530343 * Static attribute for schema name value.
344 */
345 public static final String STR_VAL = "stringValue";
346
347 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530348 * Static attribute for validateRange.
349 */
350 public static final String VALIDATE_RANGE = "validateRange";
351
352 /**
353 * Static attribute for minRange.
354 */
355 public static final String MIN_RANGE = "minRange";
356
357 /**
358 * Static attribute for maxRange.
359 */
360 public static final String MAX_RANGE = "maxRange";
361
362 /**
363 * Static attribute for minRange.
364 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530365 public static final String SHORT_MIN_RANGE_ATTR =
366 "static final int INT16_MIN_RANGE = -32768;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530367
368 /**
369 * Static attribute for minRange.
370 */
371 public static final String SHORT_MIN_RANGE = "INT16_MIN_RANGE";
372
373 /**
374 * Static attribute for minRange.
375 */
376 public static final String SHORT_MAX_RANGE = "INT16_MAX_RANGE";
377
378 /**
379 * Static attribute for maxRange.
380 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530381 public static final String SHORT_MAX_RANGE_ATTR =
382 "static final int INT16_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530383
384
385 /**
386 * Static attribute for minRange.
387 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530388 public static final String UINT8_MIN_RANGE_ATTR =
389 "static final int UINT8_MIN_RANGE = 0;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530390
391 /**
392 * Static attribute for maxRange.
393 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530394 public static final String UINT8_MAX_RANGE_ATTR =
395 "static final int UINT8_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530396
397
398 /**
399 * Static attribute for minRange.
400 */
401 public static final String UINT8_MIN_RANGE = "UINT8_MIN_RANGE";
402
403 /**
404 * Static attribute for maxRange.
405 */
406 public static final String UINT8_MAX_RANGE = "UINT8_MAX_RANGE";
407
408 /**
409 * Static attribute for minRange.
410 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530411 public static final String INT_MIN_RANGE_ATTR =
412 "static final int INT32_MIN_RANGE = -2147483648;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530413
414 /**
415 * Static attribute for minRange.
416 */
417 public static final String INT_MIN_RANGE = "INT32_MIN_RANGE";
418
419 /**
420 * Static attribute for minRange.
421 */
422 public static final String INT_MAX_RANGE = "INT32_MAX_RANGE";
423
424 /**
425 * Static attribute for maxRange.
426 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530427 public static final String INT_MAX_RANGE_ATTR =
428 "static final int INT32_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530429
430
431 /**
432 * Static attribute for minRange.
433 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530434 public static final String UINT_MIN_RANGE_ATTR =
435 "static final int UINT16_MIN_RANGE = 0;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530436
437 /**
438 * Static attribute for maxRange.
439 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530440 public static final String UINT_MAX_RANGE_ATTR =
441 "static final int UINT16_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530442
443
444 /**
445 * Static attribute for minRange.
446 */
447 public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE";
448
449 /**
450 * Static attribute for maxRange.
451 */
452 public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE";
453
454 /**
455 * Static attribute for minRange.
456 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530457 public static final String LONG_MIN_RANGE_ATTR =
458 "static final BigInteger INT64_MIN_RANGE =" +
459 " new BigInteger(\"-9223372036854775808\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530460
461 /**
462 * Static attribute for maxRange.
463 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530464 public static final String LONG_MAX_RANGE_ATTR =
465 "static final BigInteger INT64_MAX_RANGE =" +
466 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530467
468 /**
469 * Static attribute for minRange.
470 */
471 public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE";
472
473 /**
474 * Static attribute for maxRange.
475 */
476 public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE";
477
478 /**
479 * Static attribute for minRange.
480 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530481 public static final String ULONG_MIN_RANGE_ATTR =
482 "static final BigInteger UINT32_MIN_RANGE =" +
483 " new BigInteger(\"0\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530484
485 /**
486 * Static attribute for maxRange.
487 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530488 public static final String ULONG_MAX_RANGE_ATTR =
489 "static final BigInteger UINT32_MAX_RANGE =" +
490 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530491
492
493 /**
494 * Static attribute for minRange.
495 */
496 public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE";
497
498 /**
499 * Static attribute for maxRange.
500 */
501 public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE";
502
503 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530504 * Static attribute for subject.
505 */
506 public static final String SUBJECT = "Subject";
507
508 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530509 * Static attribute for ListenerRegistry.
510 */
511 public static final String LISTENER_REG = "ListenerRegistry";
512
513 /**
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530514 * Static attribute for ListenerService.
515 */
516 public static final String LISTENER_SERVICE = "ListenerService";
517
518 /**
519 * Static attribute for listener package.
520 */
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530521 public static final String ONOS_EVENT_PKG = "org.onosproject.event";
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530522
523 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +0530524 * Static attribute for colon.
525 */
526 public static final String COLON = ":";
527
528 /**
529 * Static attribute for caret.
530 */
531 public static final String CARET = "^";
532
533 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530534 * Static attribute for input string.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530535 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530536 public static final String INPUT = "input";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530537
538 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530539 * Static attribute for output string.
540 */
541 public static final String OUTPUT = "output";
542
543 /**
544 * Static attribute for current string.
545 */
546 public static final String CURRENT = "current";
547
548 /**
janani bb08850e2016-05-17 18:20:33 +0530549 * Static attribute for leafref string.
550 */
551 public static final String LEAFREF = "leafref";
552
553 /**
554 * Static attribute for identityref string.
555 */
556 public static final String IDENTITYREF = "identityref";
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 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530579 * Static attribute for single quote.
580 */
581 public static final String SINGLE_QUOTE = "\'";
582
583 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530584 * Static attribute for quotes.
585 */
b.jananie6d43af2016-03-04 12:29:05 +0530586 public static final String QUOTES = "\"";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530587
588 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530589 * Static attribute for zero.
590 */
591 public static final String ZERO = "0";
592
593 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530594 * Static attribute for ampersand.
595 */
b.jananie6d43af2016-03-04 12:29:05 +0530596 public static final String AND = "&";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530597
598 /**
599 * Static attribute for comma.
600 */
b.jananie6d43af2016-03-04 12:29:05 +0530601 public static final String COMMA = ",";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530602
603 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +0530604 * Static attribute for class.
605 */
606 public static final String CLASS_STRING = "Class";
607
608 /**
609 * Static attribute for put.
610 */
611 public static final String PUT = "put";
612
613 /**
614 * Static attribute for get.
615 */
616 public static final String GET = "get";
617
618 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530619 * Static attribute for slash character.
620 */
621 public static final char CHAR_OF_SLASH = '/';
622
623 /**
624 * Static attribute for open square bracket character.
625 */
626 public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '[';
627
628 /**
629 * Static attribute for close square bracket character.
630 */
631 public static final char CHAR_OF_CLOSE_SQUARE_BRACKET = ']';
632
633 /**
634 * Static attribute for slash string.
635 */
636 public static final String SLASH_FOR_STRING = "/";
637
638 /**
639 * Static attribute for open square bracket.
640 */
641 public static final String OPEN_SQUARE_BRACKET = "[";
642
643 /**
644 * Static attribute for ancestor accessor.
645 */
janani b3a3e3262016-10-19 00:23:28 +0530646 public static final String ANCESTOR = "..";
janani b0e4e8ae2016-07-13 21:06:41 +0530647
648 /**
649 * Static attribute for ancestor accessor along with path.
650 */
janani b3a3e3262016-10-19 00:23:28 +0530651 public static final String SLASH_ANCESTOR = "../";
janani b0e4e8ae2016-07-13 21:06:41 +0530652
653 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530654 * Static attribute for add syntax.
655 */
b.jananie6d43af2016-03-04 12:29:05 +0530656 public static final String ADD_STRING = "add";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530657
658 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530659 * Static attribute for string replace syntax.
660 */
661 public static final String REPLACE_STRING = "replace";
662
663 /**
664 * Static attribute for string trim syntax.
665 */
666 public static final String TRIM_STRING = "trim";
667
668 /**
669 * Static attribute for string split syntax.
670 */
671 public static final String SPLIT_STRING = "split";
672
673 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530674 * Static attribute for Pattern.
675 */
676 public static final String PATTERN = "Pattern";
677
678 /**
679 * Static attribute for Quote.
680 */
681 public static final String QUOTE_STRING = "quote";
682
683 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530684 * Static attribute for from syntax.
685 */
686 public static final String FROM_STRING_METHOD_NAME = "fromString";
687
688 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530689 * Static attribute for check not null syntax.
690 */
b.jananie6d43af2016-03-04 12:29:05 +0530691 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530692
693 /**
694 * Static attribute for hash code syntax.
695 */
b.jananie6d43af2016-03-04 12:29:05 +0530696 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530697
698 /**
699 * Static attribute for equals syntax.
700 */
b.jananie6d43af2016-03-04 12:29:05 +0530701 public static final String EQUALS_STRING = "equals";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530702
703 /**
704 * Static attribute for object.
705 */
b.jananie6d43af2016-03-04 12:29:05 +0530706 public static final String OBJECT_STRING = "Object";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530707
708 /**
709 * Static attribute for instance of syntax.
710 */
b.jananie6d43af2016-03-04 12:29:05 +0530711 public static final String INSTANCE_OF = " instanceof ";
712
Bharat saraswald532a4c2016-03-25 18:19:46 +0530713 /**
714 * Static attribute for value syntax.
715 */
b.jananie6d43af2016-03-04 12:29:05 +0530716 public static final String VALUE = "value";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530717
718 /**
719 * Static attribute for suffix s.
720 */
Bharat saraswal84366c52016-03-23 19:40:35 +0530721 public static final String SUFFIX_S = "s";
b.jananie6d43af2016-03-04 12:29:05 +0530722
Bharat saraswald532a4c2016-03-25 18:19:46 +0530723 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530724 * Static attribute for string builder var.
725 */
726 public static final String STRING_BUILDER_VAR = "sBuild";
727 /**
728 * Static attribute for string builder var.
729 */
730 public static final String APPEND = "append";
731
732 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530733 * Static attribute for if.
734 */
b.jananie6d43af2016-03-04 12:29:05 +0530735 public static final String IF = "if";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530736
737 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530738 * Static attribute for else-if.
739 */
740 public static final String ELSE_IF = "else if";
741
742 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530743 * Static attribute for of.
744 */
b.jananie6d43af2016-03-04 12:29:05 +0530745 public static final String OF = "of";
Bharat saraswal94844d62016-10-13 13:28:03 +0530746 /**
747 * Static attribute for of.
748 */
749 public static final String OF_CAPS = "Of";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530750
751 /**
752 * Static attribute for other.
753 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530754 public static final String OTHER = "other";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530755
756 /**
757 * Static attribute for obj syntax.
758 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530759 public static final String OBJ = "obj";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530760
761 /**
762 * Static attribute for hash syntax.
763 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530764 public static final String HASH = "hash";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530765
766 /**
767 * Static attribute for to syntax.
768 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530769 public static final String TO = "to";
b.jananie6d43af2016-03-04 12:29:05 +0530770
Bharat saraswald532a4c2016-03-25 18:19:46 +0530771 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530772 * Static attribute for to syntax.
773 */
774 public static final String TO_CAPS = "To";
775
776 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530777 * Static attribute for true syntax.
778 */
b.jananie6d43af2016-03-04 12:29:05 +0530779 public static final String TRUE = "true";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530780
781 /**
782 * Static attribute for false syntax.
783 */
b.jananie6d43af2016-03-04 12:29:05 +0530784 public static final String FALSE = "false";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530785
786 /**
787 * Static attribute for org.
788 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530789 public static final String ORG = "org";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530790
791 /**
792 * Static attribute for temp.
793 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530794 public static final String TEMP = "Temp";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530795
796 /**
797 * Static attribute for YANG file directory.
798 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530799 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530800
801 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530802 * Static attribute for diamond close bracket syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530803 */
804 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530805
806 /**
807 * Static attribute for diamond close bracket syntax.
808 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530809 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530810
811 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530812 * Static attribute for event type.
813 */
814 public static final String EVENT_TYPE = ".Type";
815
816 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530817 * Static attribute for exception syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530818 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530819 public static final String EXCEPTION = "Exception";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530820
821 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530822 * Static attribute for exception variable syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530823 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530824 public static final String EXCEPTION_VAR = "e";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530825
826 /**
827 * Static attribute for open parenthesis syntax.
828 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530829 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530830
831 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530832 * Static attribute for switch syntax.
833 */
834 public static final String SWITCH = "switch";
835
836 /**
837 * Static attribute for case syntax.
838 */
839 public static final String CASE = "case";
840
841 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530842 * Static attribute for temp val syntax.
843 */
844 public static final String TMP_VAL = "tmpVal";
845
846 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530847 * Static attribute for close curly bracket syntax.
848 */
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530849 public static final String ELSE = " else ";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530850
851 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530852 * From string parameter name.
853 */
854 public static final String FROM_STRING_PARAM_NAME = "valInString";
855
856 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530857 * Static attribute for close parenthesis syntax.
858 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530859 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530860
861 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530862 * Static attribute for empty parameter function call.
863 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530864 public static final String OPEN_CLOSE_BRACKET_STRING = "()";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530865
866 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530867 * Static attribute for empty parameter function call.
868 */
869 public static final String OPEN_CLOSE_DIAMOND_STRING = "<>";
870
871 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530872 * Static attribute for open curly bracket syntax.
873 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530874 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530875
876 /**
877 * Static attribute for close curly bracket syntax.
878 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530879 public static final String CLOSE_CURLY_BRACKET = "}";
880
881 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +0530882 * Static attribute for square brackets syntax.
883 */
884 public static final String SQUARE_BRACKETS = "[]";
885
886 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530887 * Static attribute for getter method prefix.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530888 */
889 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530890
891 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530892 * Static attribute for getter method prefix.
893 */
894 public static final String GET_METHOD = "getMethod";
895
896 /**
897 * Static attribute for getter method prefix.
898 */
899 public static final String GET_CLASS = "getClass()";
900
901 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530902 * 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 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530907 * Static attribute for get filter leaf flags.
908 */
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530909 public static final String GET_VALUE_LEAF_FLAGS = "getValueLeafFlags";
910
911 /**
912 * Static attribute for get select filter leaf flags.
913 */
914 public static final String GET_SELECT_LEAF_FLAGS = "getSelectLeafFlags";
915
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530916
917 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530918 * Static attribute for getLeafIndex.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530919 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530920 public static final String GET_LEAF_INDEX = "getLeafIndex()";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530921
922 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530923 * Static attribute for op param.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530924 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530925 public static final String OP_PARAM = "OpParam";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530926
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530927
928 /**
929 * Static attribute for is filter content match method prefix.
930 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530931 public static final String PROCESS_SUBTREE_FILTERING =
932 "processSubtreeFiltering";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530933
934 /**
935 * variable name of the subtree filtering result builder.
936 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530937 public static final String SUBTREE_FILTERING_RESULT_BUILDER =
938 "subTreeFilteringResultBuilder";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530939
940 /**
941 * variable name of the subtree filtering result flag.
942 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530943 public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG =
944 "isAnySelectOrContainmentNode";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530945
946 /**
947 * variable name of the subtree filtering to select all child.
948 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530949 public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG =
950 "isSelectAllSchemaChild";
Bharat saraswal8beac342016-08-04 02:00:03 +0530951
952 /**
953 * Static attribute for break prefix.
954 */
955 public static final String BREAK = "break";
956
957 /**
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530958 * Static attribute for isEmpty.
Bharat saraswal8beac342016-08-04 02:00:03 +0530959 */
960 public static final String IS_EMPTY = "isEmpty()";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530961 /**
962 * Static attribute for exception string in bits enum class.
963 */
964 public static final String EXCEPTION_STRING = "IllegalArgumentException(\"no" +
965 " such element found in bits\");\n";
966
967 /**
968 * Static attribute for "throw new ".
969 */
970 public static final String THROW_NEW = "throw new ";
Bharat saraswal8beac342016-08-04 02:00:03 +0530971
972 /**
973 * Static attribute for is isLeafValueSet method prefix.
974 */
975 public static final String VALUE_LEAF_SET = "isLeafValueSet";
976
977 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530978 * Static attribute for is valueLeafFlags method prefix.
979 */
980 public static final String VALUE_LEAF = "valueLeafFlags";
981
982 /**
983 * Static attribute for is selectLeafFlags method prefix.
984 */
985 public static final String SELECT_LEAF = "selectLeafFlags";
986
987 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530988 * Static attribute for is isSelectLeaf method prefix.
989 */
990 public static final String IS_SELECT_LEAF = "isSelectLeaf";
991
992 /**
993 * Static attribute for is selectLeaf method prefix.
994 */
995 public static final String SET_SELECT_LEAF = "selectLeaf";
996
997 /**
998 * Static attribute for is LeafIdentifier enum prefix.
999 */
1000 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301001 /**
1002 * Static attribute for is leaf.
1003 */
1004 public static final String LEAF = "leaf";
Bharat saraswal8beac342016-08-04 02:00:03 +05301005
1006 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301007 * Static attribute for four space indentation.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301008 */
1009 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301010
1011 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301012 * Static attribute for not syntax.
1013 */
1014 public static final String NOT = "!";
1015
1016 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +05301017 * Static attribute for try syntax.
1018 */
1019 public static final String TRY = "try";
1020
1021 /**
1022 * Static attribute for catch syntax.
1023 */
1024 public static final String CATCH = "catch";
1025
1026 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301027 * Static attribute for eight space indentation.
1028 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301029 public static final String EIGHT_SPACE_INDENTATION =
1030 FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301031
1032 /**
1033 * Static attribute for twelve space indentation.
1034 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301035 public static final String TWELVE_SPACE_INDENTATION =
1036 EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301037
1038 /**
1039 * Static attribute for sixteen space indentation.
1040 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301041 public static final String SIXTEEN_SPACE_INDENTATION =
1042 TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301043
1044 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301045 * Static attribute for twenty space indentation.
1046 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301047 public static final String TWENTY_SPACE_INDENTATION =
1048 SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal8beac342016-08-04 02:00:03 +05301049
1050 /**
1051 * Static attribute for twenty four space indentation.
1052 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301053 public static final String TWENTY_FOUR_SPACE_INDENTATION =
1054 TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301055
1056 /**
1057 * Static attribute for twenty eight space indentation.
1058 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301059 public static final String TWENTY_EIGHT_SPACE_INDENTATION =
1060 TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301061
1062 /**
1063 * Static attribute for thirty two space indentation.
1064 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301065 public static final String THIRTY_TWO_SPACE_INDENTATION =
1066 TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301067
1068 /**
1069 * continue.
1070 */
1071 public static final String CONTINUE = "continue";
Bharat saraswal8beac342016-08-04 02:00:03 +05301072
1073 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301074 * Static attribute for generated code path.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301075 */
Bharat saraswal5600f0f2016-03-09 18:34:56 +05301076 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301077
1078 /**
1079 * Static attribute for base package.
1080 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301081 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301082
1083 /**
1084 * Static attribute for YANG date prefix.
1085 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301086 public static final String REVISION_PREFIX = "rev";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301087
1088 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301089 * Static attribute for YANG automatic prefix for identifiers with keywords
1090 * and beginning with digits.
janani b1c6acc42016-04-15 16:18:30 +05301091 */
1092 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
1093
1094 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301095 * Static attribute for YANG version prefix.
Bharat saraswald532a4c2016-03-25 18:19:46 +05301096 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301097 public static final String VERSION_PREFIX = "v";
1098
1099 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301100 * Static attribute for private modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301101 */
1102 public static final String PRIVATE = "private";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301103
1104 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301105 * Static attribute for public modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301106 */
Bharat saraswald532a4c2016-03-25 18:19:46 +05301107 public static final String PUBLIC = "public";
1108
1109 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301110 * Static attribute for abstract modifier.
1111 */
1112 public static final String ABSTRACT = "abstract";
1113
1114 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301115 * Static attribute for protected modifier.
1116 */
1117 public static final String PROTECTED = "protected";
1118
1119 /**
Vinod Kumar S08710982016-03-03 19:55:30 +05301120 * Void java type.
1121 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301122 public static final String VOID = "void";
Vinod Kumar S08710982016-03-03 19:55:30 +05301123
1124 /**
1125 * String built in java type.
1126 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301127 public static final String STRING_DATA_TYPE = "String";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301128
Vinod Kumar S08710982016-03-03 19:55:30 +05301129 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301130 * String built in java type.
1131 */
1132 public static final String STRING_BUILDER = "StringBuilder";
1133 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301134 * Java.lang.* packages.
Vinod Kumar S08710982016-03-03 19:55:30 +05301135 */
1136 public static final String JAVA_LANG = "java.lang";
1137
1138 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301139 * Java.math.* packages.
1140 */
1141 public static final String JAVA_MATH = "java.math";
1142
1143 /**
1144 * Boolean built in java type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301145 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301146 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar S08710982016-03-03 19:55:30 +05301147
1148 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301149 * BigInteger built in java type.
1150 */
1151 public static final String BIG_INTEGER = "BigInteger";
1152
1153 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301154 * BigDecimal built in java type.
1155 */
1156 public static final String BIG_DECIMAL = "BigDecimal";
1157
1158 /**
1159 * BitSet built in java type.
1160 */
1161 public static final String BIT_SET = "BitSet";
1162
1163 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301164 * Flag for subtree filtering in augment.
1165 */
1166 public static final String SUBTREE_FILTERED = "isSubTreeFiltered";
1167
1168 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301169 * Augment map type.
1170 */
1171 public static final String AUGMENT_MAP_TYPE = "Map<Class<?>, Object>";
1172
1173 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301174 * Byte java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301175 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301176 public static final String BYTE = "byte";
Vinod Kumar S08710982016-03-03 19:55:30 +05301177
1178 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301179 * Short java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301180 */
1181 public static final String SHORT = "short";
1182
1183 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301184 * Int java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301185 */
1186 public static final String INT = "int";
1187
1188 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301189 * Long java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301190 */
1191 public static final String LONG = "long";
1192
1193 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301194 * Double java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301195 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301196 public static final String DOUBLE = "double";
1197
1198 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301199 * Boolean built in java wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301200 */
1201 public static final String BOOLEAN_WRAPPER = "Boolean";
1202
1203 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301204 * Byte java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301205 */
1206 public static final String BYTE_WRAPPER = "Byte";
1207
1208 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301209 * Short java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301210 */
1211 public static final String SHORT_WRAPPER = "Short";
1212
1213 /**
1214 * Integer java built in wrapper type.
1215 */
1216 public static final String INTEGER_WRAPPER = "Integer";
1217
1218 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301219 * Long java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301220 */
1221 public static final String LONG_WRAPPER = "Long";
1222
1223 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301224 * Static variable for question mark.
Vinod Kumar S08710982016-03-03 19:55:30 +05301225 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301226 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301227
1228 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301229 * Static variable for forType string.
1230 */
1231 public static final String FOR_TYPE_STRING = " for type ";
1232
1233 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301234 * List of keywords in java, this is used for checking if the input does not
1235 * contain these keywords.
b.jananie6d43af2016-03-04 12:29:05 +05301236 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301237 public static final List<String> JAVA_KEY_WORDS =
1238 Arrays.asList("abstract", "assert", "boolean", "break", "byte",
1239 "case", "catch", "char", "class", "const", "continue",
1240 "default", "do", "double", "else", "extends", "false",
1241 "final", "finally", "float", "for", "goto", "if",
1242 "implements", "import", "instanceof", "enum", "int",
1243 "interface", "long", "native", "new", "null",
1244 "package", "private", "protected", "public", "return",
1245 "short", "static", "strictfp", "super", "switch",
1246 "synchronized", "this", "throw", "throws", "transient",
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301247 "true", "try", "void", "volatile", "while", "list",
1248 "map", "arrayList", "hashMap", "linkedList",
1249 "collections");
b.jananie6d43af2016-03-04 12:29:05 +05301250
1251 /**
janani b1c6acc42016-04-15 16:18:30 +05301252 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301253 */
janani b1c6acc42016-04-15 16:18:30 +05301254 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1255
1256 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301257 * Static attribute for regex for three special characters used in
1258 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301259 */
1260 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1261
1262 /**
1263 * Static attribute for regex for period.
1264 */
1265 public static final String REGEX_FOR_PERIOD = "[.]";
1266
1267 /**
1268 * Static attribute for regex for underscore.
1269 */
1270 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1271
1272 /**
1273 * Static attribute for regex for hyphen.
1274 */
1275 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301276
1277 /**
1278 * Static attribute for regex for digits.
1279 */
b.jananie6d43af2016-03-04 12:29:05 +05301280 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1281
1282 /**
janani b703cfe42016-05-17 13:12:22 +05301283 * Static attribute for regex with digits.
1284 */
1285 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1286
1287 /**
janani b1c6acc42016-04-15 16:18:30 +05301288 * Static attribute for regex for single letter.
1289 */
1290 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1291
1292 /**
1293 * Static attribute for regex for digits with single letter.
1294 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301295 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1296 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301297
1298 /**
janani b703cfe42016-05-17 13:12:22 +05301299 * Static attribute for regex with uppercase.
1300 */
1301 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1302
1303 /**
1304 * Static attribute for regex for single capital case letter.
1305 */
1306 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1307
1308 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301309 * Static attribute for regex for capital case letter with any number of
1310 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301311 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301312 public static final String
1313 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1314 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301315
1316 /**
janani b3e357f62016-05-19 17:39:50 +05301317 * Static attribute for regex for any string ending with service.
1318 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301319 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1320 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301321
1322 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301323 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301324 */
1325 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301326
1327 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301328 * Static attribute for builder syntax.
1329 */
1330 public static final String BUILDER = "Builder";
1331
1332 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301333 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301334 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301335 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301336
1337 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301338 * Static attribute for manager syntax.
1339 */
1340 public static final String MANAGER = "Manager";
1341
1342 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301343 * Static attribute for service syntax.
1344 */
1345 public static final String SERVICE = "Service";
1346
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301347 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301348 * Static attribute for interface syntax.
1349 */
1350 public static final String INTERFACE = "interface";
1351
1352 /**
1353 * Static attribute for enum syntax.
1354 */
1355 public static final String ENUM = "enum";
1356
1357 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301358 * Static attribute for type syntax.
1359 */
1360 public static final String TYPE = "Type";
1361
1362 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301363 * Static attribute for static syntax.
1364 */
1365 public static final String STATIC = "static";
1366
1367 /**
1368 * Static attribute for final syntax.
1369 */
1370 public static final String FINAL = "final";
1371
1372 /**
1373 * Static attribute for package syntax.
1374 */
1375 public static final String PACKAGE = "package";
1376
1377 /**
1378 * Static attribute for import syntax.
1379 */
1380 public static final String IMPORT = "import ";
1381
1382 /**
1383 * Static attribute for null syntax.
1384 */
1385 public static final String NULL = "null";
1386
1387 /**
1388 * Static attribute for return syntax.
1389 */
1390 public static final String RETURN = "return";
1391
1392 /**
1393 * Static attribute for java new syntax.
1394 */
1395 public static final String NEW = "new";
1396
1397 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301398 * Static attribute for java new syntax.
1399 */
1400 public static final String TO_STRING_METHOD = "toString";
1401
1402 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301403 * Static attribute for this syntax.
1404 */
1405 public static final String THIS = "this";
1406
1407 /**
1408 * Static attribute for implements syntax.
1409 */
1410 public static final String IMPLEMENTS = "implements";
1411
1412 /**
1413 * Static attribute for extends syntax.
1414 */
1415 public static final String EXTEND = "extends";
1416
1417 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301418 * Static attribute for service interface suffix syntax.
1419 */
1420 public static final String SERVICE_METHOD_STRING = "Service";
1421
1422 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301423 * For event file generation.
1424 */
1425 public static final String EVENT_STRING = "Event";
1426
1427 /**
1428 * For event listener file generation.
1429 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301430 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301431
1432 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301433 * For event subject file generation.
1434 */
1435 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1436
1437 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301438 * Static attribute for build method syntax.
1439 */
1440 public static final String BUILD = "build";
1441
1442 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301443 * Static attribute for build for filter in augment method syntax.
1444 */
1445 public static final String BUILD_FOR_FILTER = "buildForFilter";
1446
1447 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301448 * Static attribute for object.
1449 */
1450 public static final String OBJECT = "Object";
1451
1452 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301453 * Static attribute for app instance.
1454 */
1455 public static final String APP_INSTANCE = "appInstance";
1456
1457 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301458 * Static attribute for instance.
1459 */
1460 public static final String INSTANCE = "instance";
1461
1462 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301463 * Static attribute for override annotation.
1464 */
1465 public static final String OVERRIDE = "@Override";
1466
1467 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301468 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301469 */
b.jananie6d43af2016-03-04 12:29:05 +05301470 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301471
1472 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301473 * Static attribute for regex.
1474 */
1475 public static final String REGEX_IMPORTS = "java.util.regex";
1476
1477 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301478 * Static attribute for map.
1479 */
1480 public static final String MAP = "Map";
1481
1482 /**
1483 * Static attribute for hash map.
1484 */
1485 public static final String HASH_MAP = "HashMap";
1486
1487
1488 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301489 * Static attribute for more object import package.
1490 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301491 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1492 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301493
1494 /**
1495 * Static attribute for more object import class.
1496 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301497 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301498 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301499
1500 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301501 * Static attribute for more object import class.
1502 */
1503 public static final String MORE_OBJ_ATTR =
1504 "MoreObjects.ToStringHelper helper = ";
1505
1506 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301507 * Static attribute for to string method.
1508 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301509 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301510 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301511
1512 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301513 * Static attribute for to string method.
1514 */
1515 public static final String GOOGLE_MORE_OBJECT_METHOD_STATIC_STRING =
1516 "MoreObjects.toStringHelper";
1517
1518 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301519 * Static attribute for java utilities import package.
1520 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301521 public static final String JAVA_UTIL_PKG = "java.util";
1522
1523 /**
1524 * Static attribute for java utilities import package.
1525 */
1526 public static final String JAVA_UTIL_REGEX_PKG = "java.util.regex";
1527
1528 /**
1529 * Static attribute for java utilities import package.
1530 */
1531 public static final String SET_VALUE_PARA = "setValue";
1532
1533 /**
1534 * Static attribute for java utilities import package.
1535 */
1536 public static final String HELPER = "helper";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301537
1538 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301539 * Static attribute for bitset.
1540 */
1541 public static final String BITSET = "BitSet";
1542
1543 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301544 * Static attribute for java utilities objects import class.
1545 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301546 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301547
1548 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301549 * Static attribute for AugmentedInfo class.
1550 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301551 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301552
1553 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301554 * Static attribute for AugmentedInfo class.
1555 */
1556 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1557 "yangAugmentedInfo";
1558
1559 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301560 * Static attribute for AugmentedInfo class.
1561 */
1562 public static final String YANG_AUGMENTED_INFO_MAP =
1563 "yangAugmentedInfoMap";
1564
1565 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301566 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301567 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301568 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301569
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301570 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301571 * Static attribute for list.
1572 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301573 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301574
1575 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301576 * Static attribute for queue.
1577 */
1578 public static final String QUEUE = "Queue";
1579
1580 /**
1581 * Static attribute for set.
1582 */
1583 public static final String SET = "Set";
1584
1585 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301586 * Comment to be added for autogenerated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301587 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301588 public static final String YANG_UTILS_TODO =
1589 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301590
1591 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301592 * Static attribute for AbstractEvent.
1593 */
1594 public static final String ABSTRACT_EVENT = "AbstractEvent";
1595
1596 /**
1597 * Static attribute for EventListener.
1598 */
1599 public static final String EVENT_LISTENER = "EventListener";
1600
1601 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301602 * Static attribute for or operator.
1603 */
1604 public static final String OR_OPERATION = "||";
1605
1606 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301607 * Static attribute for or operator.
1608 */
1609 public static final String AND_OPERATION = "&&";
1610
1611 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301612 * Static attribute for YANG file error.
1613 */
1614 public static final String YANG_FILE_ERROR = "YANG file error : ";
1615
1616 /**
1617 * Static attribute for unsupported error information.
1618 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301619 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1620 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301621
1622 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301623 * Static attribute for "is invalid" information.
1624 */
1625 public static final String IS_INVALID = " is invalid.";
1626
1627 /**
1628 * Static attribute for data model tree error information.
1629 */
1630 public static final String INVALID_TREE = "Internal datamodel error: " +
1631 "Datamodel tree is not correct";
1632
1633 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301634 * Static attribute for currently unsupported error information.
1635 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301636 public static final String CURRENTLY_UNSUPPORTED =
1637 " is not supported in current version, please check wiki" +
1638 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301639
1640 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301641 * Static attribute for leaf ref target node error information.
1642 */
1643 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1644 " node, in the leafref path ";
1645
1646 /**
1647 * Static attribute for leaf holder error information.
1648 */
1649 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1650 " type leaves holder in ";
1651
1652 /**
1653 * Static attribute for invalid resolve entity error information.
1654 */
1655 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1656 "Exception: Entity to resolved is other than type/uses";
1657
1658 /**
1659 * Static attribute for invalid resolve entity error information.
1660 */
1661 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1662 "to resolved is other than identityref";
1663
1664 /**
1665 * Static attribute for invalid state error information.
1666 */
1667 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1668 "Unsupported, linker state";
1669
1670 /**
1671 * Static attribute for leaf ref resolve entity error information.
1672 */
1673 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1674 "error: Unable to find base leaf/leaf-list for given leafref path ";
1675
1676 /**
1677 * Static attribute for compiler annotation resolve entity error
1678 * information.
1679 */
1680 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1681 "compiler annotation ";
1682
1683 /**
1684 * Static attribute for failed to link entity error information.
1685 */
1686 public static final String FAILED_TO_LINK = "Failed to link ";
1687
1688 /**
1689 * Static attribute for un-resolve entity error information.
1690 */
1691 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1692 "to resolved is not Resolvable";
1693
1694 /**
1695 * Static attribute for invalid resolve entity error information.
1696 */
1697 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1698 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1699
1700 /**
1701 * Static attribute for invalid resolve entity error information.
1702 */
1703 public static final String INVALID_TARGET = "Invalid target node type ";
1704 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301705 * Static attribute for typedef linker error information.
1706 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301707 public static final String TYPEDEF_LINKER_ERROR =
1708 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301709
1710 /**
1711 * Static attribute for grouping linker error information.
1712 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301713 public static final String GROUPING_LINKER_ERROR =
1714 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301715
1716 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301717 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301718 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301719 public static final String FEATURE_LINKER_ERROR =
1720 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301721
1722 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301723 * Static attribute for leafref linker error information.
1724 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301725 public static final String LEAFREF_LINKER_ERROR =
1726 "YANG file error: Unable to find base leaf/leaf-list for given " +
1727 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301728
1729 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301730 * Static attribute for base linker error information.
1731 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301732 public static final String BASE_LINKER_ERROR =
1733 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301734
1735 /**
1736 * Static attribute for identityref linker error information.
1737 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301738 public static final String IDENTITYREF_LINKER_ERROR =
1739 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301740
1741 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301742 * Static attribute for jar.
1743 */
1744 public static final String JAR = "jar";
1745
1746 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301747 * Static attribute for for.
1748 */
1749 public static final String FOR = "for";
1750
1751 /**
1752 * Static attribute for YangAugmentedOpParamInfo.
1753 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301754 public static final String YANG_AUGMENTED_OP_PARAM_INFO =
1755 "YangAugmentedOpParamInfo";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301756
1757 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301758 * Static attribute for NoSuchMethodException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301759 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301760 public static final String NO_SUCH_METHOD_EXCEPTION =
1761 "NoSuchMethodException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301762
1763 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301764 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301765 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301766 public static final String INVOCATION_TARGET_EXCEPTION =
1767 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301768
1769 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301770 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301771 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301772 public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" +
1773 " java.lang.reflect.InvocationTargetException;\n";
1774 /**
1775 * Static attribute for IllegalAccessException.
1776 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301777 public static final String ILLEGAL_ACCESS_EXCEPTION =
1778 "IllegalAccessException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301779
1780 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301781 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301782 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301783 public static final String ARRAY_LIST = "ArrayList<>()";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301784
1785 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301786 * Static attribute for arrayList import.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301787 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301788 public static final String ARRAY_LIST_IMPORT =
1789 IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301790
1791 /**
1792 * Static attribute for unused keyword.
1793 */
1794 public static final String UNUSED = "UNUSED";
1795
1796 /**
1797 * Static attribute for 1 keyword.
1798 */
1799 public static final String ONE = "1";
1800
1801 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301802 * Static attribute for YANG node operation type class.
Vidyashree Rama13960652016-04-26 15:06:06 +05301803 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301804 public static final String OPERATION_TYPE_CLASS =
Bharat saraswal94844d62016-10-13 13:28:03 +05301805 "OnosYangOpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301806
1807 /**
1808 * Static attribute for YANG node operation type attribute.
1809 */
1810 public static final String OPERATION_TYPE_ATTRIBUTE =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301811 "OpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301812
1813 /**
janani b3c396f02016-09-27 18:45:23 +05301814 * Static attribute for input keyword to be suffixed with rpc name.
1815 */
1816 public static final String INPUT_KEYWORD = "_input";
1817
1818 /**
1819 * Static attribute for output keyword to be suffixed with rpc name.
1820 */
1821 public static final String OUTPUT_KEYWORD = "_output";
1822
1823 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301824 * Static attribute for event class.
1825 */
1826 public static final String EVENT_CLASS = "event class";
1827
1828 /**
1829 * Static attribute for typedef class.
1830 */
1831 public static final String TYPEDEF_CLASS = "typedef class";
1832
1833 /**
1834 * Static attribute for impl class.
1835 */
1836 public static final String IMPL_CLASS = "impl class";
1837
1838 /**
1839 * Static attribute for union class.
1840 */
1841 public static final String UNION_CLASS = "union class";
1842
1843 /**
1844 * Static attribute for enum class.
1845 */
1846 public static final String ENUM_CLASS = "enum class";
1847
1848 /**
1849 * Static attribute for rpc class.
1850 */
1851 public static final String RPC_CLASS = "rpc class";
1852
1853 /**
1854 * Static attribute for builder class.
1855 */
1856 public static final String BUILDER_CLASS = "builder class";
1857
1858 /**
1859 * Static attribute for builder interface.
1860 */
1861 public static final String BUILDER_INTERFACE = "builder interface";
1862
1863 /**
1864 * Static attribute for binary.
1865 */
1866 public static final String BINARY = "binary";
1867
1868 /**
1869 * Static attribute for bits.
1870 */
1871 public static final String BITS = "bits";
1872
1873 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301874 * Static attribute for bits.
1875 */
1876 public static final String BITS_CAPS = "Bits";
1877
1878 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301879 * Static attribute for YANG.
1880 */
1881 public static final String YANG = "yang";
1882
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301883 /**
1884 * Static attribute for error msg.
1885 */
1886 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1887 "multiple yang" + " files has same module/submodule" +
1888 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1889 " previous build present in your directory.";
1890
1891 /**
1892 * Static attribute for error msg.
1893 */
1894 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1895 "identity instance node ";
Bharat saraswal94844d62016-10-13 13:28:03 +05301896
1897 /**
1898 * Static attribute for error msg.
1899 */
1900 public static final String ERROR_MSG_FOR_AUGMENT_LINKING = "Augment " +
1901 "linking does not support linking when path contains " +
1902 "notification/grouping for path: ";
1903
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301904 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301905 * Static attribute for error msg.
1906 */
1907 public static final String VERSION_ERROR = "Onos-yang-tools " +
1908 "does not support maven version below \"3.3.9\" , your current " +
1909 "version is ";
1910
1911 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301912 * Static attribute for in.
1913 */
1914 public static final String IN = " in ";
1915
1916 /**
1917 * Static attribute for at.
1918 */
1919 public static final String AT = " at ";
1920
Bharat saraswal0663aff2016-10-18 23:16:14 +05301921 /**
1922 * Static param for processChildNodesSubTreeFiltering.
1923 */
1924 public static final String PROCESS_CHILD_NODE_STF_PARAM =
1925 "processChildNodesSubTreeFiltering";
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301926
1927 /**
1928 * Static param for processLeafListSubTreeFiltering.
1929 */
1930 public static final String PROCESS_LEAF_LIST_STF_PARAM =
1931 "processLeafListSubTreeFiltering";
1932 /**
1933 * Static param for processLeafListSubTreeFiltering.
1934 */
1935 public static final String PROCESS_LEAF_STF_PARAM =
1936 "processLeafSubtreeFiltering";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301937 /**
1938 * Static param for subTreeFilteringResultBuilder.
1939 */
1940 public static final String STF_BUILDER_PARAM =
1941 "subTreeFilteringResultBuilder";
1942
1943 /**
1944 * Static param for isAnySelectOrContainmentNode.
1945 */
1946 public static final String SELECT_OR_CONTAINMENT_NODE_PARAM =
1947 "isAnySelectOrContainmentNode";
1948 /**
1949 * Static param for isSelectAllSchemaChild.
1950 */
1951 public static final String SELECT_ALL_CHILD_SCHEMA_PARAM =
1952 "isSelectAllSchemaChild";
1953
1954 /**
1955 * Static param for ResultOfProcessSubTree.
1956 */
1957 public static final String CHOICE_STF_METHOD_NAME =
1958 "ResultOfProcessSubTree";
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301959 //File type extension for java classes.
1960 public static final String JAVA_FILE_EXTENSION = ".java";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301961
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301962 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301963 private UtilConstants() {
1964 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301965
1966 /**
1967 * Represents operation type.
1968 */
1969 public enum Operation {
1970 /**
1971 * Represents add operation.
1972 */
1973 ADD,
1974
1975 /**
1976 * Represents remove operation.
1977 */
1978 REMOVE
1979 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301980}