blob: ecc70b61a0cebfac954a0fea926af6923c511082 [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",
Bharat saraswal51c5d672016-11-13 09:03:48 +05301227 "map", "arrayList", "hashMap", "linkedList", "notify",
1228 "notifyAll", "Method",
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301229 "collections");
b.jananie6d43af2016-03-04 12:29:05 +05301230
1231 /**
janani b1c6acc42016-04-15 16:18:30 +05301232 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301233 */
janani b1c6acc42016-04-15 16:18:30 +05301234 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1235
1236 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301237 * Static attribute for regex for three special characters used in
1238 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301239 */
1240 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1241
1242 /**
1243 * Static attribute for regex for period.
1244 */
1245 public static final String REGEX_FOR_PERIOD = "[.]";
1246
1247 /**
1248 * Static attribute for regex for underscore.
1249 */
1250 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1251
1252 /**
1253 * Static attribute for regex for hyphen.
1254 */
1255 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301256
1257 /**
1258 * Static attribute for regex for digits.
1259 */
b.jananie6d43af2016-03-04 12:29:05 +05301260 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1261
1262 /**
janani b703cfe42016-05-17 13:12:22 +05301263 * Static attribute for regex with digits.
1264 */
1265 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1266
1267 /**
janani b1c6acc42016-04-15 16:18:30 +05301268 * Static attribute for regex for single letter.
1269 */
1270 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1271
1272 /**
1273 * Static attribute for regex for digits with single letter.
1274 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301275 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1276 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301277
1278 /**
janani b703cfe42016-05-17 13:12:22 +05301279 * Static attribute for regex with uppercase.
1280 */
1281 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1282
1283 /**
1284 * Static attribute for regex for single capital case letter.
1285 */
1286 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1287
1288 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301289 * Static attribute for regex for capital case letter with any number of
1290 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301291 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301292 public static final String
1293 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1294 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301295
1296 /**
janani b3e357f62016-05-19 17:39:50 +05301297 * Static attribute for regex for any string ending with service.
1298 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301299 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1300 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301301
1302 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301303 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301304 */
1305 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301306
1307 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301308 * Static attribute for builder syntax.
1309 */
1310 public static final String BUILDER = "Builder";
1311
1312 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301313 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301314 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301315 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301316
1317 /**
1318 * Static attribute for service syntax.
1319 */
1320 public static final String SERVICE = "Service";
1321
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301322 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301323 * Static attribute for interface syntax.
1324 */
1325 public static final String INTERFACE = "interface";
1326
1327 /**
1328 * Static attribute for enum syntax.
1329 */
1330 public static final String ENUM = "enum";
1331
1332 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301333 * Static attribute for type syntax.
1334 */
1335 public static final String TYPE = "Type";
1336
1337 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301338 * Static attribute for static syntax.
1339 */
1340 public static final String STATIC = "static";
1341
1342 /**
1343 * Static attribute for final syntax.
1344 */
1345 public static final String FINAL = "final";
1346
1347 /**
1348 * Static attribute for package syntax.
1349 */
1350 public static final String PACKAGE = "package";
1351
1352 /**
1353 * Static attribute for import syntax.
1354 */
1355 public static final String IMPORT = "import ";
1356
1357 /**
1358 * Static attribute for null syntax.
1359 */
1360 public static final String NULL = "null";
1361
1362 /**
1363 * Static attribute for return syntax.
1364 */
1365 public static final String RETURN = "return";
1366
1367 /**
1368 * Static attribute for java new syntax.
1369 */
1370 public static final String NEW = "new";
1371
1372 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301373 * Static attribute for java new syntax.
1374 */
1375 public static final String TO_STRING_METHOD = "toString";
1376
1377 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301378 * Static attribute for this syntax.
1379 */
1380 public static final String THIS = "this";
1381
1382 /**
1383 * Static attribute for implements syntax.
1384 */
1385 public static final String IMPLEMENTS = "implements";
1386
1387 /**
1388 * Static attribute for extends syntax.
1389 */
1390 public static final String EXTEND = "extends";
1391
1392 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301393 * Static attribute for service interface suffix syntax.
1394 */
1395 public static final String SERVICE_METHOD_STRING = "Service";
1396
1397 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301398 * For event file generation.
1399 */
1400 public static final String EVENT_STRING = "Event";
1401
1402 /**
1403 * For event listener file generation.
1404 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301405 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301406
1407 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301408 * For event subject file generation.
1409 */
1410 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1411
1412 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301413 * Static attribute for build method syntax.
1414 */
1415 public static final String BUILD = "build";
1416
1417 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301418 * Static attribute for build for filter in augment method syntax.
1419 */
1420 public static final String BUILD_FOR_FILTER = "buildForFilter";
1421
1422 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301423 * Static attribute for object.
1424 */
1425 public static final String OBJECT = "Object";
1426
1427 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301428 * Static attribute for app instance.
1429 */
1430 public static final String APP_INSTANCE = "appInstance";
1431
1432 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301433 * Static attribute for instance.
1434 */
1435 public static final String INSTANCE = "instance";
1436
1437 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301438 * Static attribute for override annotation.
1439 */
1440 public static final String OVERRIDE = "@Override";
1441
1442 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301443 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301444 */
b.jananie6d43af2016-03-04 12:29:05 +05301445 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301446
1447 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301448 * Static attribute for reflect.
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301449 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301450 public static final String REFLECT_IMPORTS = "java.lang.reflect";
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301451
1452 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301453 * Static attribute for map.
1454 */
1455 public static final String MAP = "Map";
1456
1457 /**
1458 * Static attribute for hash map.
1459 */
1460 public static final String HASH_MAP = "HashMap";
1461
1462
1463 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301464 * Static attribute for more object import package.
1465 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301466 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1467 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301468
1469 /**
1470 * Static attribute for more object import class.
1471 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301472 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301473 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301474
1475 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301476 * Static attribute for more object import class.
1477 */
1478 public static final String MORE_OBJ_ATTR =
1479 "MoreObjects.ToStringHelper helper = ";
1480
1481 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301482 * Static attribute for to string method.
1483 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301484 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301485 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301486
1487 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301488 * Static attribute for to string method.
1489 */
1490 public static final String GOOGLE_MORE_OBJECT_METHOD_STATIC_STRING =
1491 "MoreObjects.toStringHelper";
1492
1493 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301494 * Static attribute for java utilities import package.
1495 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301496 public static final String JAVA_UTIL_PKG = "java.util";
1497
1498 /**
1499 * Static attribute for java utilities import package.
1500 */
1501 public static final String JAVA_UTIL_REGEX_PKG = "java.util.regex";
1502
1503 /**
1504 * Static attribute for java utilities import package.
1505 */
1506 public static final String SET_VALUE_PARA = "setValue";
1507
1508 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301509 * Static attribute for Method.
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301510 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301511 public static final String METHOD = "Method";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301512
1513 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301514 * Static attribute for bitset.
1515 */
1516 public static final String BITSET = "BitSet";
1517
1518 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301519 * Static attribute for java utilities objects import class.
1520 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301521 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301522
1523 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301524 * Static attribute for AugmentedInfo class.
1525 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301526 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301527
1528 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301529 * Static attribute for AugmentedInfo class.
1530 */
1531 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1532 "yangAugmentedInfo";
1533
1534 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301535 * Static attribute for AugmentedInfo class.
1536 */
1537 public static final String YANG_AUGMENTED_INFO_MAP =
1538 "yangAugmentedInfoMap";
1539
1540 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301541 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301542 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301543 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301544
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301545 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301546 * Static attribute for list.
1547 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301548 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301549
1550 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301551 * Static attribute for queue.
1552 */
1553 public static final String QUEUE = "Queue";
1554
1555 /**
1556 * Static attribute for set.
1557 */
1558 public static final String SET = "Set";
1559
1560 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301561 * Comment to be added for auto generated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301562 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301563 public static final String YANG_UTILS_TODO =
1564 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301565
1566 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301567 * Static attribute for AbstractEvent.
1568 */
1569 public static final String ABSTRACT_EVENT = "AbstractEvent";
1570
1571 /**
1572 * Static attribute for EventListener.
1573 */
1574 public static final String EVENT_LISTENER = "EventListener";
1575
1576 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301577 * Static attribute for or operator.
1578 */
1579 public static final String OR_OPERATION = "||";
1580
1581 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301582 * Static attribute for or operator.
1583 */
1584 public static final String AND_OPERATION = "&&";
1585
1586 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301587 * Static attribute for YANG file error.
1588 */
1589 public static final String YANG_FILE_ERROR = "YANG file error : ";
1590
1591 /**
1592 * Static attribute for unsupported error information.
1593 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301594 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1595 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301596
1597 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301598 * Static attribute for "is invalid" information.
1599 */
1600 public static final String IS_INVALID = " is invalid.";
1601
1602 /**
1603 * Static attribute for data model tree error information.
1604 */
1605 public static final String INVALID_TREE = "Internal datamodel error: " +
1606 "Datamodel tree is not correct";
1607
1608 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301609 * Static attribute for currently unsupported error information.
1610 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301611 public static final String CURRENTLY_UNSUPPORTED =
1612 " is not supported in current version, please check wiki" +
1613 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301614
1615 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301616 * Static attribute for leaf ref target node error information.
1617 */
1618 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1619 " node, in the leafref path ";
1620
1621 /**
1622 * Static attribute for leaf holder error information.
1623 */
1624 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1625 " type leaves holder in ";
1626
1627 /**
1628 * Static attribute for invalid resolve entity error information.
1629 */
1630 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1631 "Exception: Entity to resolved is other than type/uses";
1632
1633 /**
1634 * Static attribute for invalid resolve entity error information.
1635 */
1636 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1637 "to resolved is other than identityref";
1638
1639 /**
1640 * Static attribute for invalid state error information.
1641 */
1642 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1643 "Unsupported, linker state";
1644
1645 /**
1646 * Static attribute for leaf ref resolve entity error information.
1647 */
1648 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1649 "error: Unable to find base leaf/leaf-list for given leafref path ";
1650
1651 /**
1652 * Static attribute for compiler annotation resolve entity error
1653 * information.
1654 */
1655 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1656 "compiler annotation ";
1657
1658 /**
1659 * Static attribute for failed to link entity error information.
1660 */
1661 public static final String FAILED_TO_LINK = "Failed to link ";
1662
1663 /**
1664 * Static attribute for un-resolve entity error information.
1665 */
1666 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1667 "to resolved is not Resolvable";
1668
1669 /**
1670 * Static attribute for invalid resolve entity error information.
1671 */
1672 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1673 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1674
1675 /**
1676 * Static attribute for invalid resolve entity error information.
1677 */
1678 public static final String INVALID_TARGET = "Invalid target node type ";
1679 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301680 * Static attribute for typedef linker error information.
1681 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301682 public static final String TYPEDEF_LINKER_ERROR =
1683 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301684
1685 /**
1686 * Static attribute for grouping linker error information.
1687 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301688 public static final String GROUPING_LINKER_ERROR =
1689 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301690
1691 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301692 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301693 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301694 public static final String FEATURE_LINKER_ERROR =
1695 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301696
1697 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301698 * Static attribute for leafref linker error information.
1699 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301700 public static final String LEAFREF_LINKER_ERROR =
1701 "YANG file error: Unable to find base leaf/leaf-list for given " +
1702 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301703
1704 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301705 * Static attribute for base linker error information.
1706 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301707 public static final String BASE_LINKER_ERROR =
1708 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301709
1710 /**
1711 * Static attribute for identityref linker error information.
1712 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301713 public static final String IDENTITYREF_LINKER_ERROR =
1714 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301715
1716 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301717 * Static attribute for jar.
1718 */
1719 public static final String JAR = "jar";
1720
1721 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301722 * Static attribute for for.
1723 */
1724 public static final String FOR = "for";
1725
1726 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301727 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301728 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301729 public static final String INVOCATION_TARGET_EXCEPTION =
1730 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301731 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301732 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301733 */
Bharat saraswal51c5d672016-11-13 09:03:48 +05301734 public static final String ARRAY_LIST_INIT = "ArrayList<>()";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301735
1736 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301737 * Static attribute for arrayList import.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301738 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301739 public static final String ARRAY_LIST_IMPORT =
1740 IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301741
1742 /**
1743 * Static attribute for unused keyword.
1744 */
1745 public static final String UNUSED = "UNUSED";
1746
1747 /**
1748 * Static attribute for 1 keyword.
1749 */
1750 public static final String ONE = "1";
1751
1752 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301753 * Static attribute for YANG node operation type class.
Vidyashree Rama13960652016-04-26 15:06:06 +05301754 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301755 public static final String OPERATION_TYPE_CLASS =
Bharat saraswal94844d62016-10-13 13:28:03 +05301756 "OnosYangOpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301757
1758 /**
1759 * Static attribute for YANG node operation type attribute.
1760 */
1761 public static final String OPERATION_TYPE_ATTRIBUTE =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301762 "OpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301763
1764 /**
janani b3c396f02016-09-27 18:45:23 +05301765 * Static attribute for input keyword to be suffixed with rpc name.
1766 */
1767 public static final String INPUT_KEYWORD = "_input";
1768
1769 /**
1770 * Static attribute for output keyword to be suffixed with rpc name.
1771 */
1772 public static final String OUTPUT_KEYWORD = "_output";
1773
1774 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301775 * Static attribute for event class.
1776 */
1777 public static final String EVENT_CLASS = "event class";
1778
1779 /**
1780 * Static attribute for typedef class.
1781 */
1782 public static final String TYPEDEF_CLASS = "typedef class";
1783
1784 /**
1785 * Static attribute for impl class.
1786 */
1787 public static final String IMPL_CLASS = "impl class";
1788
1789 /**
1790 * Static attribute for union class.
1791 */
1792 public static final String UNION_CLASS = "union class";
1793
1794 /**
1795 * Static attribute for enum class.
1796 */
1797 public static final String ENUM_CLASS = "enum class";
1798
1799 /**
1800 * Static attribute for rpc class.
1801 */
1802 public static final String RPC_CLASS = "rpc class";
1803
1804 /**
1805 * Static attribute for builder class.
1806 */
1807 public static final String BUILDER_CLASS = "builder class";
1808
1809 /**
1810 * Static attribute for builder interface.
1811 */
1812 public static final String BUILDER_INTERFACE = "builder interface";
1813
1814 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301815 * Static attribute for bits.
1816 */
1817 public static final String BITS = "bits";
1818
1819 /**
1820 * Static attribute for YANG.
1821 */
1822 public static final String YANG = "yang";
1823
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301824 /**
1825 * Static attribute for error msg.
1826 */
1827 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1828 "multiple yang" + " files has same module/submodule" +
1829 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1830 " previous build present in your directory.";
1831
1832 /**
1833 * Static attribute for error msg.
1834 */
1835 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1836 "identity instance node ";
Bharat saraswal94844d62016-10-13 13:28:03 +05301837
1838 /**
1839 * Static attribute for error msg.
1840 */
1841 public static final String ERROR_MSG_FOR_AUGMENT_LINKING = "Augment " +
1842 "linking does not support linking when path contains " +
1843 "notification/grouping for path: ";
1844
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301845 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301846 * Static attribute for error msg.
1847 */
1848 public static final String VERSION_ERROR = "Onos-yang-tools " +
1849 "does not support maven version below \"3.3.9\" , your current " +
1850 "version is ";
1851
1852 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301853 * Static attribute for in.
1854 */
1855 public static final String IN = " in ";
1856
1857 /**
1858 * Static attribute for at.
1859 */
1860 public static final String AT = " at ";
1861
Bharat saraswal0663aff2016-10-18 23:16:14 +05301862 /**
1863 * Static param for processChildNodesSubTreeFiltering.
1864 */
1865 public static final String PROCESS_CHILD_NODE_STF_PARAM =
1866 "processChildNodesSubTreeFiltering";
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301867
1868 /**
1869 * Static param for processLeafListSubTreeFiltering.
1870 */
1871 public static final String PROCESS_LEAF_LIST_STF_PARAM =
1872 "processLeafListSubTreeFiltering";
1873 /**
1874 * Static param for processLeafListSubTreeFiltering.
1875 */
1876 public static final String PROCESS_LEAF_STF_PARAM =
1877 "processLeafSubtreeFiltering";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301878 /**
1879 * Static param for subTreeFilteringResultBuilder.
1880 */
1881 public static final String STF_BUILDER_PARAM =
1882 "subTreeFilteringResultBuilder";
1883
1884 /**
1885 * Static param for isAnySelectOrContainmentNode.
1886 */
1887 public static final String SELECT_OR_CONTAINMENT_NODE_PARAM =
1888 "isAnySelectOrContainmentNode";
1889 /**
1890 * Static param for isSelectAllSchemaChild.
1891 */
1892 public static final String SELECT_ALL_CHILD_SCHEMA_PARAM =
1893 "isSelectAllSchemaChild";
1894
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301895 //File type extension for java classes.
1896 public static final String JAVA_FILE_EXTENSION = ".java";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301897
Bharat saraswal51c5d672016-11-13 09:03:48 +05301898 /**
1899 * Static param for typedef.
1900 */
1901 public static final String HOLDER_TYPE_DEF = "typedef";
1902
1903 /**
1904 * Static param for last.
1905 */
1906 public static final String LAST = "last";
1907
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301908 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301909 private UtilConstants() {
1910 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301911
1912 /**
1913 * Represents operation type.
1914 */
1915 public enum Operation {
1916 /**
1917 * Represents add operation.
1918 */
1919 ADD,
1920
1921 /**
1922 * Represents remove operation.
1923 */
1924 REMOVE
1925 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301926}