blob: c289e77745831a9125cb84cc766283ef23208599 [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 saraswala5c28512016-11-10 21:09:23 +0530231 * Static attribute for period.
232 */
233 public static final String ENTRY = "Entry";
234
235 /**
236 * Static attribute for period.
237 */
238 public static final String ENTRY_SET = "entrySet()";
239
240 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530241 * Static attribute for compare to.
242 */
243 public static final String COMPARE_TO = "compareTo";
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 saraswal64e7e232016-07-14 23:33:55 +0530343 * Static attribute for validateRange.
344 */
345 public static final String VALIDATE_RANGE = "validateRange";
346
347 /**
348 * Static attribute for minRange.
349 */
350 public static final String MIN_RANGE = "minRange";
351
352 /**
353 * Static attribute for maxRange.
354 */
355 public static final String MAX_RANGE = "maxRange";
356
357 /**
358 * Static attribute for minRange.
359 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530360 public static final String SHORT_MIN_RANGE_ATTR =
361 "static final int INT16_MIN_RANGE = -32768;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530362
363 /**
364 * Static attribute for minRange.
365 */
366 public static final String SHORT_MIN_RANGE = "INT16_MIN_RANGE";
367
368 /**
369 * Static attribute for minRange.
370 */
371 public static final String SHORT_MAX_RANGE = "INT16_MAX_RANGE";
372
373 /**
374 * Static attribute for maxRange.
375 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530376 public static final String SHORT_MAX_RANGE_ATTR =
377 "static final int INT16_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530378
379
380 /**
381 * Static attribute for minRange.
382 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530383 public static final String UINT8_MIN_RANGE_ATTR =
384 "static final int UINT8_MIN_RANGE = 0;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530385
386 /**
387 * Static attribute for maxRange.
388 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530389 public static final String UINT8_MAX_RANGE_ATTR =
390 "static final int UINT8_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530391
392
393 /**
394 * Static attribute for minRange.
395 */
396 public static final String UINT8_MIN_RANGE = "UINT8_MIN_RANGE";
397
398 /**
399 * Static attribute for maxRange.
400 */
401 public static final String UINT8_MAX_RANGE = "UINT8_MAX_RANGE";
402
403 /**
404 * Static attribute for minRange.
405 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530406 public static final String INT_MIN_RANGE_ATTR =
407 "static final int INT32_MIN_RANGE = -2147483648;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530408
409 /**
410 * Static attribute for minRange.
411 */
412 public static final String INT_MIN_RANGE = "INT32_MIN_RANGE";
413
414 /**
415 * Static attribute for minRange.
416 */
417 public static final String INT_MAX_RANGE = "INT32_MAX_RANGE";
418
419 /**
420 * Static attribute for maxRange.
421 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530422 public static final String INT_MAX_RANGE_ATTR =
423 "static final int INT32_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530424
425
426 /**
427 * Static attribute for minRange.
428 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530429 public static final String UINT_MIN_RANGE_ATTR =
430 "static final int UINT16_MIN_RANGE = 0;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530431
432 /**
433 * Static attribute for maxRange.
434 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530435 public static final String UINT_MAX_RANGE_ATTR =
436 "static final int UINT16_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530437
438
439 /**
440 * Static attribute for minRange.
441 */
442 public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE";
443
444 /**
445 * Static attribute for maxRange.
446 */
447 public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE";
448
449 /**
450 * Static attribute for minRange.
451 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530452 public static final String LONG_MIN_RANGE_ATTR =
453 "static final BigInteger INT64_MIN_RANGE =" +
454 " new BigInteger(\"-9223372036854775808\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530455
456 /**
457 * Static attribute for maxRange.
458 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530459 public static final String LONG_MAX_RANGE_ATTR =
460 "static final BigInteger INT64_MAX_RANGE =" +
461 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530462
463 /**
464 * Static attribute for minRange.
465 */
466 public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE";
467
468 /**
469 * Static attribute for maxRange.
470 */
471 public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE";
472
473 /**
474 * Static attribute for minRange.
475 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530476 public static final String ULONG_MIN_RANGE_ATTR =
477 "static final BigInteger UINT32_MIN_RANGE =" +
478 " new BigInteger(\"0\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530479
480 /**
481 * Static attribute for maxRange.
482 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530483 public static final String ULONG_MAX_RANGE_ATTR =
484 "static final BigInteger UINT32_MAX_RANGE =" +
485 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530486
487
488 /**
489 * Static attribute for minRange.
490 */
491 public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE";
492
493 /**
494 * Static attribute for maxRange.
495 */
496 public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE";
497
498 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530499 * Static attribute for subject.
500 */
501 public static final String SUBJECT = "Subject";
502
503 /**
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530504 * Static attribute for ListenerService.
505 */
506 public static final String LISTENER_SERVICE = "ListenerService";
507
508 /**
509 * Static attribute for listener package.
510 */
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530511 public static final String ONOS_EVENT_PKG = "org.onosproject.event";
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530512
513 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +0530514 * Static attribute for colon.
515 */
516 public static final String COLON = ":";
517
518 /**
519 * Static attribute for caret.
520 */
521 public static final String CARET = "^";
522
523 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530524 * Static attribute for input string.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530525 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530526 public static final String INPUT = "input";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530527
528 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530529 * Static attribute for output string.
530 */
531 public static final String OUTPUT = "output";
532
533 /**
534 * Static attribute for current string.
535 */
536 public static final String CURRENT = "current";
537
538 /**
janani bb08850e2016-05-17 18:20:33 +0530539 * Static attribute for leafref string.
540 */
541 public static final String LEAFREF = "leafref";
542
543 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530544 * Static attribute for output variable of rpc.
545 */
546 public static final String RPC_INPUT_VAR_NAME = "inputVar";
547
548 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530549 * Static attribute for new line.
550 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530551 public static final String EQUAL = "=";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530552
553 /**
554 * Static attribute for slash syntax.
555 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530556 public static final String SLASH = File.separator;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530557
558 /**
559 * Static attribute for add syntax.
560 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530561 public static final String ADD = "+";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530562
563 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530564 * Static attribute for quotes.
565 */
b.jananie6d43af2016-03-04 12:29:05 +0530566 public static final String QUOTES = "\"";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530567
568 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530569 * Static attribute for zero.
570 */
571 public static final String ZERO = "0";
572
573 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530574 * Static attribute for ampersand.
575 */
b.jananie6d43af2016-03-04 12:29:05 +0530576 public static final String AND = "&";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530577
578 /**
579 * Static attribute for comma.
580 */
b.jananie6d43af2016-03-04 12:29:05 +0530581 public static final String COMMA = ",";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530582
583 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +0530584 * Static attribute for class.
585 */
586 public static final String CLASS_STRING = "Class";
587
588 /**
589 * Static attribute for put.
590 */
591 public static final String PUT = "put";
592
593 /**
594 * Static attribute for get.
595 */
596 public static final String GET = "get";
597
598 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530599 * Static attribute for slash character.
600 */
601 public static final char CHAR_OF_SLASH = '/';
602
603 /**
604 * Static attribute for open square bracket character.
605 */
606 public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '[';
607
608 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530609 * Static attribute for slash string.
610 */
611 public static final String SLASH_FOR_STRING = "/";
612
613 /**
614 * Static attribute for open square bracket.
615 */
616 public static final String OPEN_SQUARE_BRACKET = "[";
617
618 /**
619 * Static attribute for ancestor accessor.
620 */
janani b3a3e3262016-10-19 00:23:28 +0530621 public static final String ANCESTOR = "..";
janani b0e4e8ae2016-07-13 21:06:41 +0530622
623 /**
624 * Static attribute for ancestor accessor along with path.
625 */
janani b3a3e3262016-10-19 00:23:28 +0530626 public static final String SLASH_ANCESTOR = "../";
janani b0e4e8ae2016-07-13 21:06:41 +0530627
628 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530629 * Static attribute for add syntax.
630 */
b.jananie6d43af2016-03-04 12:29:05 +0530631 public static final String ADD_STRING = "add";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530632
633 /**
Bharat saraswala5c28512016-11-10 21:09:23 +0530634 * Static attribute for key syntax.
635 */
636 public static final String KEYS = "Keys";
637
638 /**
639 * Static attribute for key syntax.
640 */
641 public static final String GET_KEY = "getKey()";
642
643 /**
644 * Static attribute for key syntax.
645 */
646 public static final String GET_VALUE = "getValue()";
647
648 /**
649 * Static attribute for -1 to syntax.
650 */
651 public static final String NEG_ONE = "-1";
652
653 /**
654 * Static attribute for Comparable to syntax.
655 */
656 public static final String COMPARABLE = "Comparable";
657
658 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530659 * Static attribute for string trim syntax.
660 */
661 public static final String TRIM_STRING = "trim";
662
663 /**
664 * Static attribute for string split syntax.
665 */
666 public static final String SPLIT_STRING = "split";
667
668 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530669 * Static attribute for Pattern.
670 */
671 public static final String PATTERN = "Pattern";
672
673 /**
674 * Static attribute for Quote.
675 */
676 public static final String QUOTE_STRING = "quote";
677
678 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530679 * Static attribute for from syntax.
680 */
681 public static final String FROM_STRING_METHOD_NAME = "fromString";
682
683 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530684 * Static attribute for check not null syntax.
685 */
b.jananie6d43af2016-03-04 12:29:05 +0530686 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530687
688 /**
689 * Static attribute for hash code syntax.
690 */
b.jananie6d43af2016-03-04 12:29:05 +0530691 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530692
693 /**
694 * Static attribute for equals syntax.
695 */
b.jananie6d43af2016-03-04 12:29:05 +0530696 public static final String EQUALS_STRING = "equals";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530697
698 /**
699 * Static attribute for object.
700 */
b.jananie6d43af2016-03-04 12:29:05 +0530701 public static final String OBJECT_STRING = "Object";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530702
703 /**
704 * Static attribute for instance of syntax.
705 */
b.jananie6d43af2016-03-04 12:29:05 +0530706 public static final String INSTANCE_OF = " instanceof ";
707
Bharat saraswald532a4c2016-03-25 18:19:46 +0530708 /**
709 * Static attribute for value syntax.
710 */
b.jananie6d43af2016-03-04 12:29:05 +0530711 public static final String VALUE = "value";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530712
713 /**
Bharat saraswala5c28512016-11-10 21:09:23 +0530714 * Static attribute for value syntax.
715 */
716 public static final String VALUE_CAPS = "Value";
717
718 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530719 * 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 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530738 * Static attribute for of.
739 */
b.jananie6d43af2016-03-04 12:29:05 +0530740 public static final String OF = "of";
Bharat saraswal94844d62016-10-13 13:28:03 +0530741 /**
742 * Static attribute for of.
743 */
744 public static final String OF_CAPS = "Of";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530745
746 /**
747 * Static attribute for other.
748 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530749 public static final String OTHER = "other";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530750
751 /**
752 * Static attribute for obj syntax.
753 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530754 public static final String OBJ = "obj";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530755
756 /**
757 * Static attribute for hash syntax.
758 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530759 public static final String HASH = "hash";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530760
761 /**
762 * Static attribute for to syntax.
763 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530764 public static final String TO = "to";
b.jananie6d43af2016-03-04 12:29:05 +0530765
Bharat saraswald532a4c2016-03-25 18:19:46 +0530766 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530767 * Static attribute for to syntax.
768 */
769 public static final String TO_CAPS = "To";
770
771 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530772 * Static attribute for true syntax.
773 */
b.jananie6d43af2016-03-04 12:29:05 +0530774 public static final String TRUE = "true";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530775
776 /**
777 * Static attribute for false syntax.
778 */
b.jananie6d43af2016-03-04 12:29:05 +0530779 public static final String FALSE = "false";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530780
781 /**
782 * Static attribute for org.
783 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530784 public static final String ORG = "org";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530785
786 /**
787 * Static attribute for temp.
788 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530789 public static final String TEMP = "Temp";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530790
791 /**
792 * Static attribute for YANG file directory.
793 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530794 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530795
796 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530797 * Static attribute for diamond close bracket syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530798 */
799 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530800
801 /**
802 * Static attribute for diamond close bracket syntax.
803 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530804 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530805
806 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530807 * Static attribute for event type.
808 */
809 public static final String EVENT_TYPE = ".Type";
810
811 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530812 * Static attribute for exception syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530813 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530814 public static final String EXCEPTION = "Exception";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530815
816 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530817 * Static attribute for exception variable syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530818 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530819 public static final String EXCEPTION_VAR = "e";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530820
821 /**
822 * Static attribute for open parenthesis syntax.
823 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530824 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530825
826 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530827 * Static attribute for switch syntax.
828 */
829 public static final String SWITCH = "switch";
830
831 /**
832 * Static attribute for case syntax.
833 */
834 public static final String CASE = "case";
835
836 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530837 * Static attribute for temp val syntax.
838 */
839 public static final String TMP_VAL = "tmpVal";
840
841 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530842 * Static attribute for close curly bracket syntax.
843 */
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530844 public static final String ELSE = " else ";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530845
846 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530847 * From string parameter name.
848 */
849 public static final String FROM_STRING_PARAM_NAME = "valInString";
850
851 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530852 * Static attribute for close parenthesis syntax.
853 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530854 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530855
856 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530857 * Static attribute for empty parameter function call.
858 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530859 public static final String OPEN_CLOSE_BRACKET_STRING = "()";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530860
861 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530862 * Static attribute for empty parameter function call.
863 */
864 public static final String OPEN_CLOSE_DIAMOND_STRING = "<>";
865
866 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530867 * Static attribute for open curly bracket syntax.
868 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530869 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530870
871 /**
872 * Static attribute for close curly bracket syntax.
873 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530874 public static final String CLOSE_CURLY_BRACKET = "}";
875
876 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +0530877 * Static attribute for square brackets syntax.
878 */
879 public static final String SQUARE_BRACKETS = "[]";
880
881 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530882 * Static attribute for getter method prefix.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530883 */
884 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530885
886 /**
887 * Static attribute for setter method prefix.
888 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530889 public static final String SET_METHOD_PREFIX = "set";
890
891 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530892 * Static attribute for op param.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530893 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530894 public static final String OP_PARAM = "OpParam";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530895
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530896
897 /**
898 * Static attribute for is filter content match method prefix.
899 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530900 public static final String PROCESS_SUBTREE_FILTERING =
901 "processSubtreeFiltering";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530902
903 /**
904 * variable name of the subtree filtering result builder.
905 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530906 public static final String SUBTREE_FILTERING_RESULT_BUILDER =
907 "subTreeFilteringResultBuilder";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530908
909 /**
910 * variable name of the subtree filtering result flag.
911 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530912 public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG =
913 "isAnySelectOrContainmentNode";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530914
915 /**
916 * variable name of the subtree filtering to select all child.
917 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530918 public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG =
919 "isSelectAllSchemaChild";
Bharat saraswal8beac342016-08-04 02:00:03 +0530920
921 /**
922 * Static attribute for break prefix.
923 */
924 public static final String BREAK = "break";
925
926 /**
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530927 * Static attribute for isEmpty.
Bharat saraswal8beac342016-08-04 02:00:03 +0530928 */
929 public static final String IS_EMPTY = "isEmpty()";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530930 /**
931 * Static attribute for exception string in bits enum class.
932 */
Bharat saraswala5c28512016-11-10 21:09:23 +0530933 public static final String EXCEPTION_STRING = "IllegalArgumentException" +
934 "(\"not a valid input element\");\n";
935
936 /**
937 * Static attribute for priority queue.
938 */
939 public static final String PRIORITY_QUEUE = "java.util.PriorityQueue<>()";
940
941 /**
942 * Static attribute for linked hash set.
943 */
944 public static final String LINKED_HASH_SET = "java.util.LinkedHashSet<>()";
945
946 /**
947 * Static attribute for priority queue.
948 */
949 public static final String LINKED_HASH_MAP = "java.util.LinkedHashMap<>()";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530950
951 /**
952 * Static attribute for "throw new ".
953 */
954 public static final String THROW_NEW = "throw new ";
Bharat saraswal8beac342016-08-04 02:00:03 +0530955
956 /**
957 * Static attribute for is isLeafValueSet method prefix.
958 */
959 public static final String VALUE_LEAF_SET = "isLeafValueSet";
960
961 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530962 * Static attribute for is valueLeafFlags method prefix.
963 */
964 public static final String VALUE_LEAF = "valueLeafFlags";
965
966 /**
967 * Static attribute for is selectLeafFlags method prefix.
968 */
969 public static final String SELECT_LEAF = "selectLeafFlags";
970
971 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530972 * Static attribute for is isSelectLeaf method prefix.
973 */
974 public static final String IS_SELECT_LEAF = "isSelectLeaf";
975
976 /**
977 * Static attribute for is selectLeaf method prefix.
978 */
979 public static final String SET_SELECT_LEAF = "selectLeaf";
980
981 /**
982 * Static attribute for is LeafIdentifier enum prefix.
983 */
984 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530985 /**
986 * Static attribute for is leaf.
987 */
988 public static final String LEAF = "leaf";
Bharat saraswal8beac342016-08-04 02:00:03 +0530989
990 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530991 * Static attribute for four space indentation.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530992 */
993 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530994
995 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530996 * Static attribute for not syntax.
997 */
998 public static final String NOT = "!";
999
1000 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +05301001 * Static attribute for try syntax.
1002 */
1003 public static final String TRY = "try";
1004
1005 /**
1006 * Static attribute for catch syntax.
1007 */
1008 public static final String CATCH = "catch";
1009
1010 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301011 * Static attribute for eight space indentation.
1012 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301013 public static final String EIGHT_SPACE_INDENTATION =
1014 FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301015
1016 /**
1017 * Static attribute for twelve space indentation.
1018 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301019 public static final String TWELVE_SPACE_INDENTATION =
1020 EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +05301021
1022 /**
1023 * Static attribute for sixteen space indentation.
1024 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301025 public static final String SIXTEEN_SPACE_INDENTATION =
1026 TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301027
1028 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301029 * Static attribute for twenty space indentation.
1030 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301031 public static final String TWENTY_SPACE_INDENTATION =
1032 SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal8beac342016-08-04 02:00:03 +05301033
1034 /**
1035 * Static attribute for twenty four space indentation.
1036 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301037 public static final String TWENTY_FOUR_SPACE_INDENTATION =
1038 TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301039
1040 /**
1041 * Static attribute for twenty eight space indentation.
1042 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301043 public static final String TWENTY_EIGHT_SPACE_INDENTATION =
1044 TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301045
1046 /**
1047 * Static attribute for thirty two space indentation.
1048 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301049 public static final String THIRTY_TWO_SPACE_INDENTATION =
1050 TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301051
1052 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301053 * Static attribute for generated code path.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301054 */
Bharat saraswal5600f0f2016-03-09 18:34:56 +05301055 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301056
1057 /**
1058 * Static attribute for base package.
1059 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301060 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301061
1062 /**
1063 * Static attribute for YANG date prefix.
1064 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301065 public static final String REVISION_PREFIX = "rev";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301066
1067 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301068 * Static attribute for YANG automatic prefix for identifiers with keywords
1069 * and beginning with digits.
janani b1c6acc42016-04-15 16:18:30 +05301070 */
1071 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
1072
1073 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301074 * Static attribute for YANG version prefix.
Bharat saraswald532a4c2016-03-25 18:19:46 +05301075 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301076 public static final String VERSION_PREFIX = "v";
1077
1078 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301079 * Static attribute for private modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301080 */
1081 public static final String PRIVATE = "private";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301082
1083 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301084 * Static attribute for public modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301085 */
Bharat saraswald532a4c2016-03-25 18:19:46 +05301086 public static final String PUBLIC = "public";
1087
1088 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301089 * Static attribute for abstract modifier.
1090 */
1091 public static final String ABSTRACT = "abstract";
1092
1093 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301094 * Static attribute for protected modifier.
1095 */
1096 public static final String PROTECTED = "protected";
1097
1098 /**
Vinod Kumar S08710982016-03-03 19:55:30 +05301099 * Void java type.
1100 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301101 public static final String VOID = "void";
Vinod Kumar S08710982016-03-03 19:55:30 +05301102
1103 /**
1104 * String built in java type.
1105 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301106 public static final String STRING_DATA_TYPE = "String";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301107
Vinod Kumar S08710982016-03-03 19:55:30 +05301108 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301109 * String built in java type.
1110 */
1111 public static final String STRING_BUILDER = "StringBuilder";
1112 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301113 * Java.lang.* packages.
Vinod Kumar S08710982016-03-03 19:55:30 +05301114 */
1115 public static final String JAVA_LANG = "java.lang";
1116
1117 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301118 * Java.math.* packages.
1119 */
1120 public static final String JAVA_MATH = "java.math";
1121
1122 /**
1123 * Boolean built in java type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301124 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301125 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar S08710982016-03-03 19:55:30 +05301126
1127 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301128 * BigInteger built in java type.
1129 */
1130 public static final String BIG_INTEGER = "BigInteger";
1131
1132 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301133 * BigDecimal built in java type.
1134 */
1135 public static final String BIG_DECIMAL = "BigDecimal";
1136
1137 /**
1138 * BitSet built in java type.
1139 */
1140 public static final String BIT_SET = "BitSet";
1141
1142 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301143 * Flag for subtree filtering in augment.
1144 */
1145 public static final String SUBTREE_FILTERED = "isSubTreeFiltered";
1146
1147 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301148 * Augment map type.
1149 */
1150 public static final String AUGMENT_MAP_TYPE = "Map<Class<?>, Object>";
1151
1152 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301153 * Byte java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301154 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301155 public static final String BYTE = "byte";
Vinod Kumar S08710982016-03-03 19:55:30 +05301156
1157 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301158 * Short java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301159 */
1160 public static final String SHORT = "short";
1161
1162 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301163 * Int java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301164 */
1165 public static final String INT = "int";
1166
1167 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301168 * Long java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301169 */
1170 public static final String LONG = "long";
1171
1172 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301173 * Double java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301174 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301175 public static final String DOUBLE = "double";
1176
1177 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301178 * Boolean built in java wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301179 */
1180 public static final String BOOLEAN_WRAPPER = "Boolean";
1181
1182 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301183 * Byte java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301184 */
1185 public static final String BYTE_WRAPPER = "Byte";
1186
1187 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301188 * Short java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301189 */
1190 public static final String SHORT_WRAPPER = "Short";
1191
1192 /**
1193 * Integer java built in wrapper type.
1194 */
1195 public static final String INTEGER_WRAPPER = "Integer";
1196
1197 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301198 * Long java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301199 */
1200 public static final String LONG_WRAPPER = "Long";
1201
1202 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301203 * Static variable for question mark.
Vinod Kumar S08710982016-03-03 19:55:30 +05301204 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301205 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301206
1207 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301208 * Static variable for forType string.
1209 */
1210 public static final String FOR_TYPE_STRING = " for type ";
1211
1212 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301213 * List of keywords in java, this is used for checking if the input does not
1214 * contain these keywords.
b.jananie6d43af2016-03-04 12:29:05 +05301215 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301216 public static final List<String> JAVA_KEY_WORDS =
1217 Arrays.asList("abstract", "assert", "boolean", "break", "byte",
1218 "case", "catch", "char", "class", "const", "continue",
1219 "default", "do", "double", "else", "extends", "false",
1220 "final", "finally", "float", "for", "goto", "if",
1221 "implements", "import", "instanceof", "enum", "int",
1222 "interface", "long", "native", "new", "null",
1223 "package", "private", "protected", "public", "return",
1224 "short", "static", "strictfp", "super", "switch",
1225 "synchronized", "this", "throw", "throws", "transient",
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301226 "true", "try", "void", "volatile", "while", "list",
1227 "map", "arrayList", "hashMap", "linkedList",
1228 "collections");
b.jananie6d43af2016-03-04 12:29:05 +05301229
1230 /**
janani b1c6acc42016-04-15 16:18:30 +05301231 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301232 */
janani b1c6acc42016-04-15 16:18:30 +05301233 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1234
1235 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301236 * Static attribute for regex for three special characters used in
1237 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301238 */
1239 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1240
1241 /**
1242 * Static attribute for regex for period.
1243 */
1244 public static final String REGEX_FOR_PERIOD = "[.]";
1245
1246 /**
1247 * Static attribute for regex for underscore.
1248 */
1249 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1250
1251 /**
1252 * Static attribute for regex for hyphen.
1253 */
1254 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301255
1256 /**
1257 * Static attribute for regex for digits.
1258 */
b.jananie6d43af2016-03-04 12:29:05 +05301259 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1260
1261 /**
janani b703cfe42016-05-17 13:12:22 +05301262 * Static attribute for regex with digits.
1263 */
1264 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1265
1266 /**
janani b1c6acc42016-04-15 16:18:30 +05301267 * Static attribute for regex for single letter.
1268 */
1269 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1270
1271 /**
1272 * Static attribute for regex for digits with single letter.
1273 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301274 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1275 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301276
1277 /**
janani b703cfe42016-05-17 13:12:22 +05301278 * Static attribute for regex with uppercase.
1279 */
1280 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1281
1282 /**
1283 * Static attribute for regex for single capital case letter.
1284 */
1285 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1286
1287 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301288 * Static attribute for regex for capital case letter with any number of
1289 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301290 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301291 public static final String
1292 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1293 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301294
1295 /**
janani b3e357f62016-05-19 17:39:50 +05301296 * Static attribute for regex for any string ending with service.
1297 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301298 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1299 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301300
1301 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301302 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301303 */
1304 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301305
1306 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301307 * Static attribute for builder syntax.
1308 */
1309 public static final String BUILDER = "Builder";
1310
1311 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301312 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301313 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301314 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301315
1316 /**
1317 * Static attribute for service syntax.
1318 */
1319 public static final String SERVICE = "Service";
1320
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301321 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301322 * Static attribute for interface syntax.
1323 */
1324 public static final String INTERFACE = "interface";
1325
1326 /**
1327 * Static attribute for enum syntax.
1328 */
1329 public static final String ENUM = "enum";
1330
1331 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301332 * Static attribute for type syntax.
1333 */
1334 public static final String TYPE = "Type";
1335
1336 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301337 * Static attribute for static syntax.
1338 */
1339 public static final String STATIC = "static";
1340
1341 /**
1342 * Static attribute for final syntax.
1343 */
1344 public static final String FINAL = "final";
1345
1346 /**
1347 * Static attribute for package syntax.
1348 */
1349 public static final String PACKAGE = "package";
1350
1351 /**
1352 * Static attribute for import syntax.
1353 */
1354 public static final String IMPORT = "import ";
1355
1356 /**
1357 * Static attribute for null syntax.
1358 */
1359 public static final String NULL = "null";
1360
1361 /**
1362 * Static attribute for return syntax.
1363 */
1364 public static final String RETURN = "return";
1365
1366 /**
1367 * Static attribute for java new syntax.
1368 */
1369 public static final String NEW = "new";
1370
1371 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301372 * Static attribute for java new syntax.
1373 */
1374 public static final String TO_STRING_METHOD = "toString";
1375
1376 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301377 * Static attribute for this syntax.
1378 */
1379 public static final String THIS = "this";
1380
1381 /**
1382 * Static attribute for implements syntax.
1383 */
1384 public static final String IMPLEMENTS = "implements";
1385
1386 /**
1387 * Static attribute for extends syntax.
1388 */
1389 public static final String EXTEND = "extends";
1390
1391 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301392 * Static attribute for service interface suffix syntax.
1393 */
1394 public static final String SERVICE_METHOD_STRING = "Service";
1395
1396 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301397 * For event file generation.
1398 */
1399 public static final String EVENT_STRING = "Event";
1400
1401 /**
1402 * For event listener file generation.
1403 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301404 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301405
1406 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301407 * For event subject file generation.
1408 */
1409 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1410
1411 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301412 * Static attribute for build method syntax.
1413 */
1414 public static final String BUILD = "build";
1415
1416 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301417 * Static attribute for build for filter in augment method syntax.
1418 */
1419 public static final String BUILD_FOR_FILTER = "buildForFilter";
1420
1421 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301422 * Static attribute for object.
1423 */
1424 public static final String OBJECT = "Object";
1425
1426 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301427 * Static attribute for app instance.
1428 */
1429 public static final String APP_INSTANCE = "appInstance";
1430
1431 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301432 * Static attribute for instance.
1433 */
1434 public static final String INSTANCE = "instance";
1435
1436 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301437 * Static attribute for override annotation.
1438 */
1439 public static final String OVERRIDE = "@Override";
1440
1441 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301442 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301443 */
b.jananie6d43af2016-03-04 12:29:05 +05301444 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301445
1446 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301447 * Static attribute for reflect.
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301448 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301449 public static final String REFLECT_IMPORTS = "java.lang.reflect";
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301450
1451 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301452 * Static attribute for map.
1453 */
1454 public static final String MAP = "Map";
1455
1456 /**
1457 * Static attribute for hash map.
1458 */
1459 public static final String HASH_MAP = "HashMap";
1460
1461
1462 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301463 * Static attribute for more object import package.
1464 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301465 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1466 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301467
1468 /**
1469 * Static attribute for more object import class.
1470 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301471 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301472 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301473
1474 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301475 * Static attribute for more object import class.
1476 */
1477 public static final String MORE_OBJ_ATTR =
1478 "MoreObjects.ToStringHelper helper = ";
1479
1480 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301481 * Static attribute for to string method.
1482 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301483 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301484 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301485
1486 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301487 * Static attribute for to string method.
1488 */
1489 public static final String GOOGLE_MORE_OBJECT_METHOD_STATIC_STRING =
1490 "MoreObjects.toStringHelper";
1491
1492 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301493 * Static attribute for java utilities import package.
1494 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301495 public static final String JAVA_UTIL_PKG = "java.util";
1496
1497 /**
1498 * Static attribute for java utilities import package.
1499 */
1500 public static final String JAVA_UTIL_REGEX_PKG = "java.util.regex";
1501
1502 /**
1503 * Static attribute for java utilities import package.
1504 */
1505 public static final String SET_VALUE_PARA = "setValue";
1506
1507 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301508 * Static attribute for Method.
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301509 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301510 public static final String METHOD = "Method";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301511
1512 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301513 * Static attribute for bitset.
1514 */
1515 public static final String BITSET = "BitSet";
1516
1517 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301518 * Static attribute for java utilities objects import class.
1519 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301520 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301521
1522 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301523 * Static attribute for AugmentedInfo class.
1524 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301525 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301526
1527 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301528 * Static attribute for AugmentedInfo class.
1529 */
1530 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1531 "yangAugmentedInfo";
1532
1533 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301534 * Static attribute for AugmentedInfo class.
1535 */
1536 public static final String YANG_AUGMENTED_INFO_MAP =
1537 "yangAugmentedInfoMap";
1538
1539 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301540 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301541 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301542 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301543
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301544 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301545 * Static attribute for list.
1546 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301547 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301548
1549 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301550 * Static attribute for queue.
1551 */
1552 public static final String QUEUE = "Queue";
1553
1554 /**
1555 * Static attribute for set.
1556 */
1557 public static final String SET = "Set";
1558
1559 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301560 * Comment to be added for auto generated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301561 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301562 public static final String YANG_UTILS_TODO =
1563 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301564
1565 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301566 * Static attribute for AbstractEvent.
1567 */
1568 public static final String ABSTRACT_EVENT = "AbstractEvent";
1569
1570 /**
1571 * Static attribute for EventListener.
1572 */
1573 public static final String EVENT_LISTENER = "EventListener";
1574
1575 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301576 * Static attribute for or operator.
1577 */
1578 public static final String OR_OPERATION = "||";
1579
1580 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301581 * Static attribute for or operator.
1582 */
1583 public static final String AND_OPERATION = "&&";
1584
1585 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301586 * Static attribute for YANG file error.
1587 */
1588 public static final String YANG_FILE_ERROR = "YANG file error : ";
1589
1590 /**
1591 * Static attribute for unsupported error information.
1592 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301593 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1594 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301595
1596 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301597 * Static attribute for "is invalid" information.
1598 */
1599 public static final String IS_INVALID = " is invalid.";
1600
1601 /**
1602 * Static attribute for data model tree error information.
1603 */
1604 public static final String INVALID_TREE = "Internal datamodel error: " +
1605 "Datamodel tree is not correct";
1606
1607 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301608 * Static attribute for currently unsupported error information.
1609 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301610 public static final String CURRENTLY_UNSUPPORTED =
1611 " is not supported in current version, please check wiki" +
1612 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301613
1614 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301615 * Static attribute for leaf ref target node error information.
1616 */
1617 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1618 " node, in the leafref path ";
1619
1620 /**
1621 * Static attribute for leaf holder error information.
1622 */
1623 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1624 " type leaves holder in ";
1625
1626 /**
1627 * Static attribute for invalid resolve entity error information.
1628 */
1629 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1630 "Exception: Entity to resolved is other than type/uses";
1631
1632 /**
1633 * Static attribute for invalid resolve entity error information.
1634 */
1635 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1636 "to resolved is other than identityref";
1637
1638 /**
1639 * Static attribute for invalid state error information.
1640 */
1641 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1642 "Unsupported, linker state";
1643
1644 /**
1645 * Static attribute for leaf ref resolve entity error information.
1646 */
1647 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1648 "error: Unable to find base leaf/leaf-list for given leafref path ";
1649
1650 /**
1651 * Static attribute for compiler annotation resolve entity error
1652 * information.
1653 */
1654 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1655 "compiler annotation ";
1656
1657 /**
1658 * Static attribute for failed to link entity error information.
1659 */
1660 public static final String FAILED_TO_LINK = "Failed to link ";
1661
1662 /**
1663 * Static attribute for un-resolve entity error information.
1664 */
1665 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1666 "to resolved is not Resolvable";
1667
1668 /**
1669 * Static attribute for invalid resolve entity error information.
1670 */
1671 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1672 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1673
1674 /**
1675 * Static attribute for invalid resolve entity error information.
1676 */
1677 public static final String INVALID_TARGET = "Invalid target node type ";
1678 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301679 * Static attribute for typedef linker error information.
1680 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301681 public static final String TYPEDEF_LINKER_ERROR =
1682 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301683
1684 /**
1685 * Static attribute for grouping linker error information.
1686 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301687 public static final String GROUPING_LINKER_ERROR =
1688 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301689
1690 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301691 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301692 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301693 public static final String FEATURE_LINKER_ERROR =
1694 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301695
1696 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301697 * Static attribute for leafref linker error information.
1698 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301699 public static final String LEAFREF_LINKER_ERROR =
1700 "YANG file error: Unable to find base leaf/leaf-list for given " +
1701 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301702
1703 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301704 * Static attribute for base linker error information.
1705 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301706 public static final String BASE_LINKER_ERROR =
1707 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301708
1709 /**
1710 * Static attribute for identityref linker error information.
1711 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301712 public static final String IDENTITYREF_LINKER_ERROR =
1713 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301714
1715 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301716 * Static attribute for jar.
1717 */
1718 public static final String JAR = "jar";
1719
1720 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301721 * Static attribute for for.
1722 */
1723 public static final String FOR = "for";
1724
1725 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301726 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301727 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301728 public static final String INVOCATION_TARGET_EXCEPTION =
1729 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301730
1731 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301732 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301733 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301734 public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" +
1735 " java.lang.reflect.InvocationTargetException;\n";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301736
1737 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301738 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301739 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301740 public static final String ARRAY_LIST = "ArrayList<>()";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301741
1742 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301743 * Static attribute for arrayList import.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301744 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301745 public static final String ARRAY_LIST_IMPORT =
1746 IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301747
1748 /**
janani b110f7f72016-10-27 19:04:18 +05301749 * Static attribute for set collection import.
1750 */
1751 public static final String SET_IMPORT = IMPORT + COLLECTION_IMPORTS +
1752 PERIOD + SET + SEMI_COLON + NEW_LINE;
1753
1754 /**
1755 * Static attribute for reflect method import.
1756 */
1757 public static final String METHOD_IMPORT = IMPORT + REFLECT_IMPORTS +
1758 PERIOD + METHOD + SEMI_COLON + NEW_LINE;
1759
1760 /**
1761 * Static attribute for collection iterator import.
1762 */
1763 public static final String ITR_IMPORT = IMPORT + COLLECTION_IMPORTS +
1764 PERIOD + "Iterator;\n";
1765 /**
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301766 * Static attribute for unused keyword.
1767 */
1768 public static final String UNUSED = "UNUSED";
1769
1770 /**
1771 * Static attribute for 1 keyword.
1772 */
1773 public static final String ONE = "1";
1774
1775 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301776 * Static attribute for YANG node operation type class.
Vidyashree Rama13960652016-04-26 15:06:06 +05301777 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301778 public static final String OPERATION_TYPE_CLASS =
Bharat saraswal94844d62016-10-13 13:28:03 +05301779 "OnosYangOpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301780
1781 /**
1782 * Static attribute for YANG node operation type attribute.
1783 */
1784 public static final String OPERATION_TYPE_ATTRIBUTE =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301785 "OpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301786
1787 /**
janani b3c396f02016-09-27 18:45:23 +05301788 * Static attribute for input keyword to be suffixed with rpc name.
1789 */
1790 public static final String INPUT_KEYWORD = "_input";
1791
1792 /**
1793 * Static attribute for output keyword to be suffixed with rpc name.
1794 */
1795 public static final String OUTPUT_KEYWORD = "_output";
1796
1797 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301798 * Static attribute for event class.
1799 */
1800 public static final String EVENT_CLASS = "event class";
1801
1802 /**
1803 * Static attribute for typedef class.
1804 */
1805 public static final String TYPEDEF_CLASS = "typedef class";
1806
1807 /**
1808 * Static attribute for impl class.
1809 */
1810 public static final String IMPL_CLASS = "impl class";
1811
1812 /**
1813 * Static attribute for union class.
1814 */
1815 public static final String UNION_CLASS = "union class";
1816
1817 /**
1818 * Static attribute for enum class.
1819 */
1820 public static final String ENUM_CLASS = "enum class";
1821
1822 /**
1823 * Static attribute for rpc class.
1824 */
1825 public static final String RPC_CLASS = "rpc class";
1826
1827 /**
1828 * Static attribute for builder class.
1829 */
1830 public static final String BUILDER_CLASS = "builder class";
1831
1832 /**
1833 * Static attribute for builder interface.
1834 */
1835 public static final String BUILDER_INTERFACE = "builder interface";
1836
1837 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301838 * Static attribute for bits.
1839 */
1840 public static final String BITS = "bits";
1841
1842 /**
1843 * Static attribute for YANG.
1844 */
1845 public static final String YANG = "yang";
1846
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301847 /**
1848 * Static attribute for error msg.
1849 */
1850 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1851 "multiple yang" + " files has same module/submodule" +
1852 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1853 " previous build present in your directory.";
1854
1855 /**
1856 * Static attribute for error msg.
1857 */
1858 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1859 "identity instance node ";
Bharat saraswal94844d62016-10-13 13:28:03 +05301860
1861 /**
1862 * Static attribute for error msg.
1863 */
1864 public static final String ERROR_MSG_FOR_AUGMENT_LINKING = "Augment " +
1865 "linking does not support linking when path contains " +
1866 "notification/grouping for path: ";
1867
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301868 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301869 * Static attribute for error msg.
1870 */
1871 public static final String VERSION_ERROR = "Onos-yang-tools " +
1872 "does not support maven version below \"3.3.9\" , your current " +
1873 "version is ";
1874
1875 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301876 * Static attribute for in.
1877 */
1878 public static final String IN = " in ";
1879
1880 /**
1881 * Static attribute for at.
1882 */
1883 public static final String AT = " at ";
1884
Bharat saraswal0663aff2016-10-18 23:16:14 +05301885 /**
1886 * Static param for processChildNodesSubTreeFiltering.
1887 */
1888 public static final String PROCESS_CHILD_NODE_STF_PARAM =
1889 "processChildNodesSubTreeFiltering";
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301890
1891 /**
1892 * Static param for processLeafListSubTreeFiltering.
1893 */
1894 public static final String PROCESS_LEAF_LIST_STF_PARAM =
1895 "processLeafListSubTreeFiltering";
1896 /**
1897 * Static param for processLeafListSubTreeFiltering.
1898 */
1899 public static final String PROCESS_LEAF_STF_PARAM =
1900 "processLeafSubtreeFiltering";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301901 /**
1902 * Static param for subTreeFilteringResultBuilder.
1903 */
1904 public static final String STF_BUILDER_PARAM =
1905 "subTreeFilteringResultBuilder";
1906
1907 /**
1908 * Static param for isAnySelectOrContainmentNode.
1909 */
1910 public static final String SELECT_OR_CONTAINMENT_NODE_PARAM =
1911 "isAnySelectOrContainmentNode";
1912 /**
1913 * Static param for isSelectAllSchemaChild.
1914 */
1915 public static final String SELECT_ALL_CHILD_SCHEMA_PARAM =
1916 "isSelectAllSchemaChild";
1917
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301918 //File type extension for java classes.
1919 public static final String JAVA_FILE_EXTENSION = ".java";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301920
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301921 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301922 private UtilConstants() {
1923 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301924
1925 /**
1926 * Represents operation type.
1927 */
1928 public enum Operation {
1929 /**
1930 * Represents add operation.
1931 */
1932 ADD,
1933
1934 /**
1935 * Represents remove operation.
1936 */
1937 REMOVE
1938 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301939}