blob: 3a1a1f51b7c5a4c17ee6cf6071f4b27620957d29 [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 saraswal9fab16b2016-09-23 23:27:24 +0530231 * Static attribute for compare to.
232 */
233 public static final String COMPARE_TO = "compareTo";
234
235 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530236 * Static attribute for parse byte.
237 */
238 public static final String PARSE_BYTE = "parseByte";
239
240 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530241 * Static attribute for parse boolean.
242 */
243 public static final String PARSE_BOOLEAN = "parseBoolean";
244
245 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530246 * Static attribute for parse short.
247 */
248 public static final String PARSE_SHORT = "parseShort";
249
250 /**
251 * Static attribute for parse int.
252 */
253 public static final String PARSE_INT = "parseInt";
254
255 /**
256 * Static attribute for parse long.
257 */
258 public static final String PARSE_LONG = "parseLong";
259
260 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530261 * Static attribute for base64.
262 */
263 public static final String BASE64 = "Base64";
264
265 /**
266 * Static attribute for getEncoder.
267 */
268 public static final String GET_ENCODER = "getEncoder";
269
270 /**
271 * Static attribute for encodeToString.
272 */
273 public static final String ENCODE_TO_STRING = "encodeToString";
274
275 /**
276 * Static attribute for getDecoder.
277 */
278 public static final String GET_DECODER = "getDecoder";
279
280 /**
281 * Static attribute for decode.
282 */
283 public static final String DECODE = "decode";
284
285 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530286 * Static attribute for omit null value.
287 */
288 public static final String OMIT_NULL_VALUE_STRING = "omitNullValues()";
289
290 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530291 * Static attribute for underscore.
292 */
b.jananie6d43af2016-03-04 12:29:05 +0530293 public static final String UNDER_SCORE = "_";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530294
295 /**
296 * Static attribute for semi-colan.
297 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530298 public static final String SEMI_COLON = ";";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530299
300 /**
301 * Static attribute for hyphen.
302 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530303 public static final String HYPHEN = "-";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530304
305 /**
306 * Static attribute for space.
307 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530308 public static final String SPACE = " ";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530309 /**
310 * Static attribute for space.
311 */
312 public static final String TWO = "2";
313 /**
314 * Static attribute for space.
315 */
316 public static final String FLAG = "flag";
317 /**
318 * Static attribute for result.
319 */
320 public static final String RESULT = "result";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530321
322 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530323 * Static attribute for isSelectAllSchemaChild.
324 */
325 public static final String SELECT_ALL_CHILD = "isSelectAllSchemaChild";
326
327 /**
Bharat saraswal748fc3c2016-09-06 16:38:20 +0530328 * Static attribute for schema name.
329 */
330 public static final String SCHEMA_NAME = "schemaName";
331
332 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530333 * Static attribute for validateRange.
334 */
335 public static final String VALIDATE_RANGE = "validateRange";
336
337 /**
338 * Static attribute for minRange.
339 */
340 public static final String MIN_RANGE = "minRange";
341
342 /**
343 * Static attribute for maxRange.
344 */
345 public static final String MAX_RANGE = "maxRange";
346
347 /**
348 * Static attribute for minRange.
349 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530350 public static final String SHORT_MIN_RANGE_ATTR =
351 "static final int INT16_MIN_RANGE = -32768;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530352
353 /**
354 * Static attribute for minRange.
355 */
356 public static final String SHORT_MIN_RANGE = "INT16_MIN_RANGE";
357
358 /**
359 * Static attribute for minRange.
360 */
361 public static final String SHORT_MAX_RANGE = "INT16_MAX_RANGE";
362
363 /**
364 * Static attribute for maxRange.
365 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530366 public static final String SHORT_MAX_RANGE_ATTR =
367 "static final int INT16_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530368
369
370 /**
371 * Static attribute for minRange.
372 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530373 public static final String UINT8_MIN_RANGE_ATTR =
374 "static final int UINT8_MIN_RANGE = 0;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530375
376 /**
377 * Static attribute for maxRange.
378 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530379 public static final String UINT8_MAX_RANGE_ATTR =
380 "static final int UINT8_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530381
382
383 /**
384 * Static attribute for minRange.
385 */
386 public static final String UINT8_MIN_RANGE = "UINT8_MIN_RANGE";
387
388 /**
389 * Static attribute for maxRange.
390 */
391 public static final String UINT8_MAX_RANGE = "UINT8_MAX_RANGE";
392
393 /**
394 * Static attribute for minRange.
395 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530396 public static final String INT_MIN_RANGE_ATTR =
397 "static final int INT32_MIN_RANGE = -2147483648;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530398
399 /**
400 * Static attribute for minRange.
401 */
402 public static final String INT_MIN_RANGE = "INT32_MIN_RANGE";
403
404 /**
405 * Static attribute for minRange.
406 */
407 public static final String INT_MAX_RANGE = "INT32_MAX_RANGE";
408
409 /**
410 * Static attribute for maxRange.
411 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530412 public static final String INT_MAX_RANGE_ATTR =
413 "static final int INT32_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530414
415
416 /**
417 * Static attribute for minRange.
418 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530419 public static final String UINT_MIN_RANGE_ATTR =
420 "static final int UINT16_MIN_RANGE = 0;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530421
422 /**
423 * Static attribute for maxRange.
424 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530425 public static final String UINT_MAX_RANGE_ATTR =
426 "static final int UINT16_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530427
428
429 /**
430 * Static attribute for minRange.
431 */
432 public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE";
433
434 /**
435 * Static attribute for maxRange.
436 */
437 public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE";
438
439 /**
440 * Static attribute for minRange.
441 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530442 public static final String LONG_MIN_RANGE_ATTR =
443 "static final BigInteger INT64_MIN_RANGE =" +
444 " new BigInteger(\"-9223372036854775808\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530445
446 /**
447 * Static attribute for maxRange.
448 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530449 public static final String LONG_MAX_RANGE_ATTR =
450 "static final BigInteger INT64_MAX_RANGE =" +
451 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530452
453 /**
454 * Static attribute for minRange.
455 */
456 public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE";
457
458 /**
459 * Static attribute for maxRange.
460 */
461 public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE";
462
463 /**
464 * Static attribute for minRange.
465 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530466 public static final String ULONG_MIN_RANGE_ATTR =
467 "static final BigInteger UINT32_MIN_RANGE =" +
468 " new BigInteger(\"0\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530469
470 /**
471 * Static attribute for maxRange.
472 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530473 public static final String ULONG_MAX_RANGE_ATTR =
474 "static final BigInteger UINT32_MAX_RANGE =" +
475 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530476
477
478 /**
479 * Static attribute for minRange.
480 */
481 public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE";
482
483 /**
484 * Static attribute for maxRange.
485 */
486 public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE";
487
488 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530489 * Static attribute for subject.
490 */
491 public static final String SUBJECT = "Subject";
492
493 /**
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530494 * Static attribute for ListenerService.
495 */
496 public static final String LISTENER_SERVICE = "ListenerService";
497
498 /**
499 * Static attribute for listener package.
500 */
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530501 public static final String ONOS_EVENT_PKG = "org.onosproject.event";
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530502
503 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +0530504 * Static attribute for colon.
505 */
506 public static final String COLON = ":";
507
508 /**
509 * Static attribute for caret.
510 */
511 public static final String CARET = "^";
512
513 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530514 * Static attribute for input string.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530515 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530516 public static final String INPUT = "input";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530517
518 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530519 * Static attribute for output string.
520 */
521 public static final String OUTPUT = "output";
522
523 /**
524 * Static attribute for current string.
525 */
526 public static final String CURRENT = "current";
527
528 /**
janani bb08850e2016-05-17 18:20:33 +0530529 * Static attribute for leafref string.
530 */
531 public static final String LEAFREF = "leafref";
532
533 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530534 * Static attribute for output variable of rpc.
535 */
536 public static final String RPC_INPUT_VAR_NAME = "inputVar";
537
538 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530539 * Static attribute for new line.
540 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530541 public static final String EQUAL = "=";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530542
543 /**
544 * Static attribute for slash syntax.
545 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530546 public static final String SLASH = File.separator;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530547
548 /**
549 * Static attribute for add syntax.
550 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530551 public static final String ADD = "+";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530552
553 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530554 * Static attribute for quotes.
555 */
b.jananie6d43af2016-03-04 12:29:05 +0530556 public static final String QUOTES = "\"";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530557
558 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530559 * Static attribute for zero.
560 */
561 public static final String ZERO = "0";
562
563 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530564 * Static attribute for ampersand.
565 */
b.jananie6d43af2016-03-04 12:29:05 +0530566 public static final String AND = "&";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530567
568 /**
569 * Static attribute for comma.
570 */
b.jananie6d43af2016-03-04 12:29:05 +0530571 public static final String COMMA = ",";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530572
573 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +0530574 * Static attribute for class.
575 */
576 public static final String CLASS_STRING = "Class";
577
578 /**
579 * Static attribute for put.
580 */
581 public static final String PUT = "put";
582
583 /**
584 * Static attribute for get.
585 */
586 public static final String GET = "get";
587
588 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530589 * Static attribute for slash character.
590 */
591 public static final char CHAR_OF_SLASH = '/';
592
593 /**
594 * Static attribute for open square bracket character.
595 */
596 public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '[';
597
598 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530599 * Static attribute for slash string.
600 */
601 public static final String SLASH_FOR_STRING = "/";
602
603 /**
604 * Static attribute for open square bracket.
605 */
606 public static final String OPEN_SQUARE_BRACKET = "[";
607
608 /**
609 * Static attribute for ancestor accessor.
610 */
janani b3a3e3262016-10-19 00:23:28 +0530611 public static final String ANCESTOR = "..";
janani b0e4e8ae2016-07-13 21:06:41 +0530612
613 /**
614 * Static attribute for ancestor accessor along with path.
615 */
janani b3a3e3262016-10-19 00:23:28 +0530616 public static final String SLASH_ANCESTOR = "../";
janani b0e4e8ae2016-07-13 21:06:41 +0530617
618 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530619 * Static attribute for add syntax.
620 */
b.jananie6d43af2016-03-04 12:29:05 +0530621 public static final String ADD_STRING = "add";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530622
623 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530624 * Static attribute for string trim syntax.
625 */
626 public static final String TRIM_STRING = "trim";
627
628 /**
629 * Static attribute for string split syntax.
630 */
631 public static final String SPLIT_STRING = "split";
632
633 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530634 * Static attribute for Pattern.
635 */
636 public static final String PATTERN = "Pattern";
637
638 /**
639 * Static attribute for Quote.
640 */
641 public static final String QUOTE_STRING = "quote";
642
643 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530644 * Static attribute for from syntax.
645 */
646 public static final String FROM_STRING_METHOD_NAME = "fromString";
647
648 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530649 * Static attribute for check not null syntax.
650 */
b.jananie6d43af2016-03-04 12:29:05 +0530651 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530652
653 /**
654 * Static attribute for hash code syntax.
655 */
b.jananie6d43af2016-03-04 12:29:05 +0530656 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530657
658 /**
659 * Static attribute for equals syntax.
660 */
b.jananie6d43af2016-03-04 12:29:05 +0530661 public static final String EQUALS_STRING = "equals";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530662
663 /**
664 * Static attribute for object.
665 */
b.jananie6d43af2016-03-04 12:29:05 +0530666 public static final String OBJECT_STRING = "Object";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530667
668 /**
669 * Static attribute for instance of syntax.
670 */
b.jananie6d43af2016-03-04 12:29:05 +0530671 public static final String INSTANCE_OF = " instanceof ";
672
Bharat saraswald532a4c2016-03-25 18:19:46 +0530673 /**
674 * Static attribute for value syntax.
675 */
b.jananie6d43af2016-03-04 12:29:05 +0530676 public static final String VALUE = "value";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530677
678 /**
679 * Static attribute for suffix s.
680 */
Bharat saraswal84366c52016-03-23 19:40:35 +0530681 public static final String SUFFIX_S = "s";
b.jananie6d43af2016-03-04 12:29:05 +0530682
Bharat saraswald532a4c2016-03-25 18:19:46 +0530683 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530684 * Static attribute for string builder var.
685 */
686 public static final String STRING_BUILDER_VAR = "sBuild";
687 /**
688 * Static attribute for string builder var.
689 */
690 public static final String APPEND = "append";
691
692 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530693 * Static attribute for if.
694 */
b.jananie6d43af2016-03-04 12:29:05 +0530695 public static final String IF = "if";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530696
697 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530698 * Static attribute for of.
699 */
b.jananie6d43af2016-03-04 12:29:05 +0530700 public static final String OF = "of";
Bharat saraswal94844d62016-10-13 13:28:03 +0530701 /**
702 * Static attribute for of.
703 */
704 public static final String OF_CAPS = "Of";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530705
706 /**
707 * Static attribute for other.
708 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530709 public static final String OTHER = "other";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530710
711 /**
712 * Static attribute for obj syntax.
713 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530714 public static final String OBJ = "obj";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530715
716 /**
717 * Static attribute for hash syntax.
718 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530719 public static final String HASH = "hash";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530720
721 /**
722 * Static attribute for to syntax.
723 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530724 public static final String TO = "to";
b.jananie6d43af2016-03-04 12:29:05 +0530725
Bharat saraswald532a4c2016-03-25 18:19:46 +0530726 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530727 * Static attribute for to syntax.
728 */
729 public static final String TO_CAPS = "To";
730
731 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530732 * Static attribute for true syntax.
733 */
b.jananie6d43af2016-03-04 12:29:05 +0530734 public static final String TRUE = "true";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530735
736 /**
737 * Static attribute for false syntax.
738 */
b.jananie6d43af2016-03-04 12:29:05 +0530739 public static final String FALSE = "false";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530740
741 /**
742 * Static attribute for org.
743 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530744 public static final String ORG = "org";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530745
746 /**
747 * Static attribute for temp.
748 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530749 public static final String TEMP = "Temp";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530750
751 /**
752 * Static attribute for YANG file directory.
753 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530754 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530755
756 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530757 * Static attribute for diamond close bracket syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530758 */
759 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530760
761 /**
762 * Static attribute for diamond close bracket syntax.
763 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530764 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530765
766 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530767 * Static attribute for event type.
768 */
769 public static final String EVENT_TYPE = ".Type";
770
771 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530772 * Static attribute for exception syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530773 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530774 public static final String EXCEPTION = "Exception";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530775
776 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530777 * Static attribute for exception variable syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530778 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530779 public static final String EXCEPTION_VAR = "e";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530780
781 /**
782 * Static attribute for open parenthesis syntax.
783 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530784 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530785
786 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530787 * Static attribute for switch syntax.
788 */
789 public static final String SWITCH = "switch";
790
791 /**
792 * Static attribute for case syntax.
793 */
794 public static final String CASE = "case";
795
796 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530797 * Static attribute for temp val syntax.
798 */
799 public static final String TMP_VAL = "tmpVal";
800
801 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530802 * Static attribute for close curly bracket syntax.
803 */
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530804 public static final String ELSE = " else ";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530805
806 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530807 * From string parameter name.
808 */
809 public static final String FROM_STRING_PARAM_NAME = "valInString";
810
811 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530812 * Static attribute for close parenthesis syntax.
813 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530814 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530815
816 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530817 * Static attribute for empty parameter function call.
818 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +0530819 public static final String OPEN_CLOSE_BRACKET_STRING = "()";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530820
821 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530822 * Static attribute for empty parameter function call.
823 */
824 public static final String OPEN_CLOSE_DIAMOND_STRING = "<>";
825
826 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530827 * Static attribute for open curly bracket syntax.
828 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530829 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530830
831 /**
832 * Static attribute for close curly bracket syntax.
833 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530834 public static final String CLOSE_CURLY_BRACKET = "}";
835
836 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +0530837 * Static attribute for square brackets syntax.
838 */
839 public static final String SQUARE_BRACKETS = "[]";
840
841 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530842 * Static attribute for getter method prefix.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530843 */
844 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530845
846 /**
847 * Static attribute for setter method prefix.
848 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530849 public static final String SET_METHOD_PREFIX = "set";
850
851 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530852 * Static attribute for op param.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530853 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530854 public static final String OP_PARAM = "OpParam";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530855
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530856
857 /**
858 * Static attribute for is filter content match method prefix.
859 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530860 public static final String PROCESS_SUBTREE_FILTERING =
861 "processSubtreeFiltering";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530862
863 /**
864 * variable name of the subtree filtering result builder.
865 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530866 public static final String SUBTREE_FILTERING_RESULT_BUILDER =
867 "subTreeFilteringResultBuilder";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530868
869 /**
870 * variable name of the subtree filtering result flag.
871 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530872 public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG =
873 "isAnySelectOrContainmentNode";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530874
875 /**
876 * variable name of the subtree filtering to select all child.
877 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530878 public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG =
879 "isSelectAllSchemaChild";
Bharat saraswal8beac342016-08-04 02:00:03 +0530880
881 /**
882 * Static attribute for break prefix.
883 */
884 public static final String BREAK = "break";
885
886 /**
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530887 * Static attribute for isEmpty.
Bharat saraswal8beac342016-08-04 02:00:03 +0530888 */
889 public static final String IS_EMPTY = "isEmpty()";
Bharat saraswalc2fd3222016-10-19 16:10:27 +0530890 /**
891 * Static attribute for exception string in bits enum class.
892 */
893 public static final String EXCEPTION_STRING = "IllegalArgumentException(\"no" +
894 " such element found in bits\");\n";
895
896 /**
897 * Static attribute for "throw new ".
898 */
899 public static final String THROW_NEW = "throw new ";
Bharat saraswal8beac342016-08-04 02:00:03 +0530900
901 /**
902 * Static attribute for is isLeafValueSet method prefix.
903 */
904 public static final String VALUE_LEAF_SET = "isLeafValueSet";
905
906 /**
Bharat saraswal94844d62016-10-13 13:28:03 +0530907 * Static attribute for is valueLeafFlags method prefix.
908 */
909 public static final String VALUE_LEAF = "valueLeafFlags";
910
911 /**
912 * Static attribute for is selectLeafFlags method prefix.
913 */
914 public static final String SELECT_LEAF = "selectLeafFlags";
915
916 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530917 * Static attribute for is isSelectLeaf method prefix.
918 */
919 public static final String IS_SELECT_LEAF = "isSelectLeaf";
920
921 /**
922 * Static attribute for is selectLeaf method prefix.
923 */
924 public static final String SET_SELECT_LEAF = "selectLeaf";
925
926 /**
927 * Static attribute for is LeafIdentifier enum prefix.
928 */
929 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530930 /**
931 * Static attribute for is leaf.
932 */
933 public static final String LEAF = "leaf";
Bharat saraswal8beac342016-08-04 02:00:03 +0530934
935 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530936 * Static attribute for four space indentation.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530937 */
938 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530939
940 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530941 * Static attribute for not syntax.
942 */
943 public static final String NOT = "!";
944
945 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530946 * Static attribute for try syntax.
947 */
948 public static final String TRY = "try";
949
950 /**
951 * Static attribute for catch syntax.
952 */
953 public static final String CATCH = "catch";
954
955 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530956 * Static attribute for eight space indentation.
957 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530958 public static final String EIGHT_SPACE_INDENTATION =
959 FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530960
961 /**
962 * Static attribute for twelve space indentation.
963 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530964 public static final String TWELVE_SPACE_INDENTATION =
965 EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530966
967 /**
968 * Static attribute for sixteen space indentation.
969 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530970 public static final String SIXTEEN_SPACE_INDENTATION =
971 TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530972
973 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530974 * Static attribute for twenty space indentation.
975 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530976 public static final String TWENTY_SPACE_INDENTATION =
977 SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal8beac342016-08-04 02:00:03 +0530978
979 /**
980 * Static attribute for twenty four space indentation.
981 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530982 public static final String TWENTY_FOUR_SPACE_INDENTATION =
983 TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530984
985 /**
986 * Static attribute for twenty eight space indentation.
987 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530988 public static final String TWENTY_EIGHT_SPACE_INDENTATION =
989 TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530990
991 /**
992 * Static attribute for thirty two space indentation.
993 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530994 public static final String THIRTY_TWO_SPACE_INDENTATION =
995 TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530996
997 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530998 * Static attribute for generated code path.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530999 */
Bharat saraswal5600f0f2016-03-09 18:34:56 +05301000 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301001
1002 /**
1003 * Static attribute for base package.
1004 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301005 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301006
1007 /**
1008 * Static attribute for YANG date prefix.
1009 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301010 public static final String REVISION_PREFIX = "rev";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301011
1012 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301013 * Static attribute for YANG automatic prefix for identifiers with keywords
1014 * and beginning with digits.
janani b1c6acc42016-04-15 16:18:30 +05301015 */
1016 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
1017
1018 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301019 * Static attribute for YANG version prefix.
Bharat saraswald532a4c2016-03-25 18:19:46 +05301020 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301021 public static final String VERSION_PREFIX = "v";
1022
1023 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301024 * Static attribute for private modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301025 */
1026 public static final String PRIVATE = "private";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301027
1028 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301029 * Static attribute for public modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301030 */
Bharat saraswald532a4c2016-03-25 18:19:46 +05301031 public static final String PUBLIC = "public";
1032
1033 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301034 * Static attribute for abstract modifier.
1035 */
1036 public static final String ABSTRACT = "abstract";
1037
1038 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301039 * Static attribute for protected modifier.
1040 */
1041 public static final String PROTECTED = "protected";
1042
1043 /**
Vinod Kumar S08710982016-03-03 19:55:30 +05301044 * Void java type.
1045 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301046 public static final String VOID = "void";
Vinod Kumar S08710982016-03-03 19:55:30 +05301047
1048 /**
1049 * String built in java type.
1050 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301051 public static final String STRING_DATA_TYPE = "String";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301052
Vinod Kumar S08710982016-03-03 19:55:30 +05301053 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301054 * String built in java type.
1055 */
1056 public static final String STRING_BUILDER = "StringBuilder";
1057 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301058 * Java.lang.* packages.
Vinod Kumar S08710982016-03-03 19:55:30 +05301059 */
1060 public static final String JAVA_LANG = "java.lang";
1061
1062 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301063 * Java.math.* packages.
1064 */
1065 public static final String JAVA_MATH = "java.math";
1066
1067 /**
1068 * Boolean built in java type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301069 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301070 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar S08710982016-03-03 19:55:30 +05301071
1072 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301073 * BigInteger built in java type.
1074 */
1075 public static final String BIG_INTEGER = "BigInteger";
1076
1077 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301078 * BigDecimal built in java type.
1079 */
1080 public static final String BIG_DECIMAL = "BigDecimal";
1081
1082 /**
1083 * BitSet built in java type.
1084 */
1085 public static final String BIT_SET = "BitSet";
1086
1087 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301088 * Flag for subtree filtering in augment.
1089 */
1090 public static final String SUBTREE_FILTERED = "isSubTreeFiltered";
1091
1092 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301093 * Augment map type.
1094 */
1095 public static final String AUGMENT_MAP_TYPE = "Map<Class<?>, Object>";
1096
1097 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301098 * Byte java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301099 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301100 public static final String BYTE = "byte";
Vinod Kumar S08710982016-03-03 19:55:30 +05301101
1102 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301103 * Short java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301104 */
1105 public static final String SHORT = "short";
1106
1107 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301108 * Int java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301109 */
1110 public static final String INT = "int";
1111
1112 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301113 * Long java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301114 */
1115 public static final String LONG = "long";
1116
1117 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301118 * Double java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301119 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301120 public static final String DOUBLE = "double";
1121
1122 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301123 * Boolean built in java wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301124 */
1125 public static final String BOOLEAN_WRAPPER = "Boolean";
1126
1127 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301128 * Byte java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301129 */
1130 public static final String BYTE_WRAPPER = "Byte";
1131
1132 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301133 * Short java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301134 */
1135 public static final String SHORT_WRAPPER = "Short";
1136
1137 /**
1138 * Integer java built in wrapper type.
1139 */
1140 public static final String INTEGER_WRAPPER = "Integer";
1141
1142 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301143 * Long java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301144 */
1145 public static final String LONG_WRAPPER = "Long";
1146
1147 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301148 * Static variable for question mark.
Vinod Kumar S08710982016-03-03 19:55:30 +05301149 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301150 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301151
1152 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301153 * Static variable for forType string.
1154 */
1155 public static final String FOR_TYPE_STRING = " for type ";
1156
1157 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301158 * List of keywords in java, this is used for checking if the input does not
1159 * contain these keywords.
b.jananie6d43af2016-03-04 12:29:05 +05301160 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301161 public static final List<String> JAVA_KEY_WORDS =
1162 Arrays.asList("abstract", "assert", "boolean", "break", "byte",
1163 "case", "catch", "char", "class", "const", "continue",
1164 "default", "do", "double", "else", "extends", "false",
1165 "final", "finally", "float", "for", "goto", "if",
1166 "implements", "import", "instanceof", "enum", "int",
1167 "interface", "long", "native", "new", "null",
1168 "package", "private", "protected", "public", "return",
1169 "short", "static", "strictfp", "super", "switch",
1170 "synchronized", "this", "throw", "throws", "transient",
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301171 "true", "try", "void", "volatile", "while", "list",
1172 "map", "arrayList", "hashMap", "linkedList",
1173 "collections");
b.jananie6d43af2016-03-04 12:29:05 +05301174
1175 /**
janani b1c6acc42016-04-15 16:18:30 +05301176 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301177 */
janani b1c6acc42016-04-15 16:18:30 +05301178 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1179
1180 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301181 * Static attribute for regex for three special characters used in
1182 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301183 */
1184 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1185
1186 /**
1187 * Static attribute for regex for period.
1188 */
1189 public static final String REGEX_FOR_PERIOD = "[.]";
1190
1191 /**
1192 * Static attribute for regex for underscore.
1193 */
1194 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1195
1196 /**
1197 * Static attribute for regex for hyphen.
1198 */
1199 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301200
1201 /**
1202 * Static attribute for regex for digits.
1203 */
b.jananie6d43af2016-03-04 12:29:05 +05301204 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1205
1206 /**
janani b703cfe42016-05-17 13:12:22 +05301207 * Static attribute for regex with digits.
1208 */
1209 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1210
1211 /**
janani b1c6acc42016-04-15 16:18:30 +05301212 * Static attribute for regex for single letter.
1213 */
1214 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1215
1216 /**
1217 * Static attribute for regex for digits with single letter.
1218 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301219 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1220 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301221
1222 /**
janani b703cfe42016-05-17 13:12:22 +05301223 * Static attribute for regex with uppercase.
1224 */
1225 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1226
1227 /**
1228 * Static attribute for regex for single capital case letter.
1229 */
1230 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1231
1232 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301233 * Static attribute for regex for capital case letter with any number of
1234 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301235 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301236 public static final String
1237 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1238 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301239
1240 /**
janani b3e357f62016-05-19 17:39:50 +05301241 * Static attribute for regex for any string ending with service.
1242 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301243 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1244 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301245
1246 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301247 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301248 */
1249 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301250
1251 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301252 * Static attribute for builder syntax.
1253 */
1254 public static final String BUILDER = "Builder";
1255
1256 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301257 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301258 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301259 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301260
1261 /**
1262 * Static attribute for service syntax.
1263 */
1264 public static final String SERVICE = "Service";
1265
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301266 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301267 * Static attribute for interface syntax.
1268 */
1269 public static final String INTERFACE = "interface";
1270
1271 /**
1272 * Static attribute for enum syntax.
1273 */
1274 public static final String ENUM = "enum";
1275
1276 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301277 * Static attribute for type syntax.
1278 */
1279 public static final String TYPE = "Type";
1280
1281 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301282 * Static attribute for static syntax.
1283 */
1284 public static final String STATIC = "static";
1285
1286 /**
1287 * Static attribute for final syntax.
1288 */
1289 public static final String FINAL = "final";
1290
1291 /**
1292 * Static attribute for package syntax.
1293 */
1294 public static final String PACKAGE = "package";
1295
1296 /**
1297 * Static attribute for import syntax.
1298 */
1299 public static final String IMPORT = "import ";
1300
1301 /**
1302 * Static attribute for null syntax.
1303 */
1304 public static final String NULL = "null";
1305
1306 /**
1307 * Static attribute for return syntax.
1308 */
1309 public static final String RETURN = "return";
1310
1311 /**
1312 * Static attribute for java new syntax.
1313 */
1314 public static final String NEW = "new";
1315
1316 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301317 * Static attribute for java new syntax.
1318 */
1319 public static final String TO_STRING_METHOD = "toString";
1320
1321 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301322 * Static attribute for this syntax.
1323 */
1324 public static final String THIS = "this";
1325
1326 /**
1327 * Static attribute for implements syntax.
1328 */
1329 public static final String IMPLEMENTS = "implements";
1330
1331 /**
1332 * Static attribute for extends syntax.
1333 */
1334 public static final String EXTEND = "extends";
1335
1336 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301337 * Static attribute for service interface suffix syntax.
1338 */
1339 public static final String SERVICE_METHOD_STRING = "Service";
1340
1341 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301342 * For event file generation.
1343 */
1344 public static final String EVENT_STRING = "Event";
1345
1346 /**
1347 * For event listener file generation.
1348 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301349 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301350
1351 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301352 * For event subject file generation.
1353 */
1354 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1355
1356 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301357 * Static attribute for build method syntax.
1358 */
1359 public static final String BUILD = "build";
1360
1361 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301362 * Static attribute for build for filter in augment method syntax.
1363 */
1364 public static final String BUILD_FOR_FILTER = "buildForFilter";
1365
1366 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301367 * Static attribute for object.
1368 */
1369 public static final String OBJECT = "Object";
1370
1371 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301372 * Static attribute for app instance.
1373 */
1374 public static final String APP_INSTANCE = "appInstance";
1375
1376 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301377 * Static attribute for instance.
1378 */
1379 public static final String INSTANCE = "instance";
1380
1381 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301382 * Static attribute for override annotation.
1383 */
1384 public static final String OVERRIDE = "@Override";
1385
1386 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301387 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301388 */
b.jananie6d43af2016-03-04 12:29:05 +05301389 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301390
1391 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301392 * Static attribute for reflect.
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301393 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301394 public static final String REFLECT_IMPORTS = "java.lang.reflect";
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301395
1396 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301397 * Static attribute for map.
1398 */
1399 public static final String MAP = "Map";
1400
1401 /**
1402 * Static attribute for hash map.
1403 */
1404 public static final String HASH_MAP = "HashMap";
1405
1406
1407 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301408 * Static attribute for more object import package.
1409 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301410 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1411 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301412
1413 /**
1414 * Static attribute for more object import class.
1415 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301416 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301417 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301418
1419 /**
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301420 * Static attribute for more object import class.
1421 */
1422 public static final String MORE_OBJ_ATTR =
1423 "MoreObjects.ToStringHelper helper = ";
1424
1425 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301426 * Static attribute for to string method.
1427 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301428 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301429 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301430
1431 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301432 * Static attribute for to string method.
1433 */
1434 public static final String GOOGLE_MORE_OBJECT_METHOD_STATIC_STRING =
1435 "MoreObjects.toStringHelper";
1436
1437 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301438 * Static attribute for java utilities import package.
1439 */
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301440 public static final String JAVA_UTIL_PKG = "java.util";
1441
1442 /**
1443 * Static attribute for java utilities import package.
1444 */
1445 public static final String JAVA_UTIL_REGEX_PKG = "java.util.regex";
1446
1447 /**
1448 * Static attribute for java utilities import package.
1449 */
1450 public static final String SET_VALUE_PARA = "setValue";
1451
1452 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301453 * Static attribute for Method.
Bharat saraswal54e4bab2016-10-05 23:32:14 +05301454 */
Bharat saraswalb41904b2016-10-20 19:22:36 +05301455 public static final String METHOD = "Method";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301456
1457 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301458 * Static attribute for bitset.
1459 */
1460 public static final String BITSET = "BitSet";
1461
1462 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301463 * Static attribute for java utilities objects import class.
1464 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301465 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301466
1467 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301468 * Static attribute for AugmentedInfo class.
1469 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301470 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301471
1472 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301473 * Static attribute for AugmentedInfo class.
1474 */
1475 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1476 "yangAugmentedInfo";
1477
1478 /**
Bharat saraswal94844d62016-10-13 13:28:03 +05301479 * Static attribute for AugmentedInfo class.
1480 */
1481 public static final String YANG_AUGMENTED_INFO_MAP =
1482 "yangAugmentedInfoMap";
1483
1484 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301485 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301486 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301487 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301488
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301489 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301490 * Static attribute for list.
1491 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301492 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301493
1494 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301495 * Static attribute for queue.
1496 */
1497 public static final String QUEUE = "Queue";
1498
1499 /**
1500 * Static attribute for set.
1501 */
1502 public static final String SET = "Set";
1503
1504 /**
Bharat saraswalb41904b2016-10-20 19:22:36 +05301505 * Comment to be added for auto generated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301506 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301507 public static final String YANG_UTILS_TODO =
1508 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301509
1510 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301511 * Static attribute for AbstractEvent.
1512 */
1513 public static final String ABSTRACT_EVENT = "AbstractEvent";
1514
1515 /**
1516 * Static attribute for EventListener.
1517 */
1518 public static final String EVENT_LISTENER = "EventListener";
1519
1520 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301521 * Static attribute for or operator.
1522 */
1523 public static final String OR_OPERATION = "||";
1524
1525 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301526 * Static attribute for or operator.
1527 */
1528 public static final String AND_OPERATION = "&&";
1529
1530 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301531 * Static attribute for YANG file error.
1532 */
1533 public static final String YANG_FILE_ERROR = "YANG file error : ";
1534
1535 /**
1536 * Static attribute for unsupported error information.
1537 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301538 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1539 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301540
1541 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301542 * Static attribute for "is invalid" information.
1543 */
1544 public static final String IS_INVALID = " is invalid.";
1545
1546 /**
1547 * Static attribute for data model tree error information.
1548 */
1549 public static final String INVALID_TREE = "Internal datamodel error: " +
1550 "Datamodel tree is not correct";
1551
1552 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301553 * Static attribute for currently unsupported error information.
1554 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301555 public static final String CURRENTLY_UNSUPPORTED =
1556 " is not supported in current version, please check wiki" +
1557 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301558
1559 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301560 * Static attribute for leaf ref target node error information.
1561 */
1562 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1563 " node, in the leafref path ";
1564
1565 /**
1566 * Static attribute for leaf holder error information.
1567 */
1568 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1569 " type leaves holder in ";
1570
1571 /**
1572 * Static attribute for invalid resolve entity error information.
1573 */
1574 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1575 "Exception: Entity to resolved is other than type/uses";
1576
1577 /**
1578 * Static attribute for invalid resolve entity error information.
1579 */
1580 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1581 "to resolved is other than identityref";
1582
1583 /**
1584 * Static attribute for invalid state error information.
1585 */
1586 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1587 "Unsupported, linker state";
1588
1589 /**
1590 * Static attribute for leaf ref resolve entity error information.
1591 */
1592 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1593 "error: Unable to find base leaf/leaf-list for given leafref path ";
1594
1595 /**
1596 * Static attribute for compiler annotation resolve entity error
1597 * information.
1598 */
1599 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1600 "compiler annotation ";
1601
1602 /**
1603 * Static attribute for failed to link entity error information.
1604 */
1605 public static final String FAILED_TO_LINK = "Failed to link ";
1606
1607 /**
1608 * Static attribute for un-resolve entity error information.
1609 */
1610 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1611 "to resolved is not Resolvable";
1612
1613 /**
1614 * Static attribute for invalid resolve entity error information.
1615 */
1616 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1617 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1618
1619 /**
1620 * Static attribute for invalid resolve entity error information.
1621 */
1622 public static final String INVALID_TARGET = "Invalid target node type ";
1623 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301624 * Static attribute for typedef linker error information.
1625 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301626 public static final String TYPEDEF_LINKER_ERROR =
1627 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301628
1629 /**
1630 * Static attribute for grouping linker error information.
1631 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301632 public static final String GROUPING_LINKER_ERROR =
1633 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301634
1635 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301636 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301637 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301638 public static final String FEATURE_LINKER_ERROR =
1639 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301640
1641 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301642 * Static attribute for leafref linker error information.
1643 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301644 public static final String LEAFREF_LINKER_ERROR =
1645 "YANG file error: Unable to find base leaf/leaf-list for given " +
1646 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301647
1648 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301649 * Static attribute for base linker error information.
1650 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301651 public static final String BASE_LINKER_ERROR =
1652 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301653
1654 /**
1655 * Static attribute for identityref linker error information.
1656 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301657 public static final String IDENTITYREF_LINKER_ERROR =
1658 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301659
1660 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301661 * Static attribute for jar.
1662 */
1663 public static final String JAR = "jar";
1664
1665 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301666 * Static attribute for for.
1667 */
1668 public static final String FOR = "for";
1669
1670 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301671 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301672 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301673 public static final String INVOCATION_TARGET_EXCEPTION =
1674 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301675
1676 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301677 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301678 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301679 public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" +
1680 " java.lang.reflect.InvocationTargetException;\n";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301681
1682 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301683 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301684 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301685 public static final String ARRAY_LIST = "ArrayList<>()";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301686
1687 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301688 * Static attribute for arrayList import.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301689 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301690 public static final String ARRAY_LIST_IMPORT =
1691 IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301692
1693 /**
1694 * Static attribute for unused keyword.
1695 */
1696 public static final String UNUSED = "UNUSED";
1697
1698 /**
1699 * Static attribute for 1 keyword.
1700 */
1701 public static final String ONE = "1";
1702
1703 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301704 * Static attribute for YANG node operation type class.
Vidyashree Rama13960652016-04-26 15:06:06 +05301705 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301706 public static final String OPERATION_TYPE_CLASS =
Bharat saraswal94844d62016-10-13 13:28:03 +05301707 "OnosYangOpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301708
1709 /**
1710 * Static attribute for YANG node operation type attribute.
1711 */
1712 public static final String OPERATION_TYPE_ATTRIBUTE =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301713 "OpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301714
1715 /**
janani b3c396f02016-09-27 18:45:23 +05301716 * Static attribute for input keyword to be suffixed with rpc name.
1717 */
1718 public static final String INPUT_KEYWORD = "_input";
1719
1720 /**
1721 * Static attribute for output keyword to be suffixed with rpc name.
1722 */
1723 public static final String OUTPUT_KEYWORD = "_output";
1724
1725 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301726 * Static attribute for event class.
1727 */
1728 public static final String EVENT_CLASS = "event class";
1729
1730 /**
1731 * Static attribute for typedef class.
1732 */
1733 public static final String TYPEDEF_CLASS = "typedef class";
1734
1735 /**
1736 * Static attribute for impl class.
1737 */
1738 public static final String IMPL_CLASS = "impl class";
1739
1740 /**
1741 * Static attribute for union class.
1742 */
1743 public static final String UNION_CLASS = "union class";
1744
1745 /**
1746 * Static attribute for enum class.
1747 */
1748 public static final String ENUM_CLASS = "enum class";
1749
1750 /**
1751 * Static attribute for rpc class.
1752 */
1753 public static final String RPC_CLASS = "rpc class";
1754
1755 /**
1756 * Static attribute for builder class.
1757 */
1758 public static final String BUILDER_CLASS = "builder class";
1759
1760 /**
1761 * Static attribute for builder interface.
1762 */
1763 public static final String BUILDER_INTERFACE = "builder interface";
1764
1765 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301766 * Static attribute for bits.
1767 */
1768 public static final String BITS = "bits";
1769
1770 /**
1771 * Static attribute for YANG.
1772 */
1773 public static final String YANG = "yang";
1774
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301775 /**
1776 * Static attribute for error msg.
1777 */
1778 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1779 "multiple yang" + " files has same module/submodule" +
1780 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1781 " previous build present in your directory.";
1782
1783 /**
1784 * Static attribute for error msg.
1785 */
1786 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1787 "identity instance node ";
Bharat saraswal94844d62016-10-13 13:28:03 +05301788
1789 /**
1790 * Static attribute for error msg.
1791 */
1792 public static final String ERROR_MSG_FOR_AUGMENT_LINKING = "Augment " +
1793 "linking does not support linking when path contains " +
1794 "notification/grouping for path: ";
1795
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301796 /**
Bharat saraswal0663aff2016-10-18 23:16:14 +05301797 * Static attribute for error msg.
1798 */
1799 public static final String VERSION_ERROR = "Onos-yang-tools " +
1800 "does not support maven version below \"3.3.9\" , your current " +
1801 "version is ";
1802
1803 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301804 * Static attribute for in.
1805 */
1806 public static final String IN = " in ";
1807
1808 /**
1809 * Static attribute for at.
1810 */
1811 public static final String AT = " at ";
1812
Bharat saraswal0663aff2016-10-18 23:16:14 +05301813 /**
1814 * Static param for processChildNodesSubTreeFiltering.
1815 */
1816 public static final String PROCESS_CHILD_NODE_STF_PARAM =
1817 "processChildNodesSubTreeFiltering";
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301818
1819 /**
1820 * Static param for processLeafListSubTreeFiltering.
1821 */
1822 public static final String PROCESS_LEAF_LIST_STF_PARAM =
1823 "processLeafListSubTreeFiltering";
1824 /**
1825 * Static param for processLeafListSubTreeFiltering.
1826 */
1827 public static final String PROCESS_LEAF_STF_PARAM =
1828 "processLeafSubtreeFiltering";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301829 /**
1830 * Static param for subTreeFilteringResultBuilder.
1831 */
1832 public static final String STF_BUILDER_PARAM =
1833 "subTreeFilteringResultBuilder";
1834
1835 /**
1836 * Static param for isAnySelectOrContainmentNode.
1837 */
1838 public static final String SELECT_OR_CONTAINMENT_NODE_PARAM =
1839 "isAnySelectOrContainmentNode";
1840 /**
1841 * Static param for isSelectAllSchemaChild.
1842 */
1843 public static final String SELECT_ALL_CHILD_SCHEMA_PARAM =
1844 "isSelectAllSchemaChild";
1845
Bharat saraswalc2fd3222016-10-19 16:10:27 +05301846 //File type extension for java classes.
1847 public static final String JAVA_FILE_EXTENSION = ".java";
Bharat saraswal0663aff2016-10-18 23:16:14 +05301848
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301849 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301850 private UtilConstants() {
1851 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301852
1853 /**
1854 * Represents operation type.
1855 */
1856 public enum Operation {
1857 /**
1858 * Represents add operation.
1859 */
1860 ADD,
1861
1862 /**
1863 * Represents remove operation.
1864 */
1865 REMOVE
1866 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301867}