blob: d8d75f474661c5feb3282c0772c77c5d870ff6c5 [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 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530236 * Static attribute for period.
237 */
238 public static final String INVOKE = "invoke";
239
240 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530241 * Static attribute for parse byte.
242 */
243 public static final String PARSE_BYTE = "parseByte";
244
245 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530246 * Static attribute for parse boolean.
247 */
248 public static final String PARSE_BOOLEAN = "parseBoolean";
249
250 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530251 * Static attribute for parse short.
252 */
253 public static final String PARSE_SHORT = "parseShort";
254
255 /**
256 * Static attribute for parse int.
257 */
258 public static final String PARSE_INT = "parseInt";
259
260 /**
261 * Static attribute for parse long.
262 */
263 public static final String PARSE_LONG = "parseLong";
264
265 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530266 * Static attribute for base64.
267 */
268 public static final String BASE64 = "Base64";
269
270 /**
271 * Static attribute for getEncoder.
272 */
273 public static final String GET_ENCODER = "getEncoder";
274
275 /**
276 * Static attribute for encodeToString.
277 */
278 public static final String ENCODE_TO_STRING = "encodeToString";
279
280 /**
281 * Static attribute for getDecoder.
282 */
283 public static final String GET_DECODER = "getDecoder";
284
285 /**
286 * Static attribute for decode.
287 */
288 public static final String DECODE = "decode";
289
290 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530291 * Static attribute for omit null value.
292 */
293 public static final String OMIT_NULL_VALUE_STRING = "omitNullValues()";
294
295 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530296 * Static attribute for underscore.
297 */
b.jananie6d43af2016-03-04 12:29:05 +0530298 public static final String UNDER_SCORE = "_";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530299
300 /**
301 * Static attribute for semi-colan.
302 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530303 public static final String SEMI_COLON = ";";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530304
305 /**
306 * Static attribute for hyphen.
307 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530308 public static final String HYPHEN = "-";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530309
310 /**
311 * Static attribute for space.
312 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530313 public static final String SPACE = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530314
315 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530316 * Static attribute for isSelectAllSchemaChild.
317 */
318 public static final String SELECT_ALL_CHILD = "isSelectAllSchemaChild";
319
320 /**
Bharat saraswal748fc3c2016-09-06 16:38:20 +0530321 * Static attribute for schema name.
322 */
323 public static final String SCHEMA_NAME = "schemaName";
324
325 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530326 * Static attribute for validateRange.
327 */
328 public static final String VALIDATE_RANGE = "validateRange";
329
330 /**
331 * Static attribute for minRange.
332 */
333 public static final String MIN_RANGE = "minRange";
334
335 /**
336 * Static attribute for maxRange.
337 */
338 public static final String MAX_RANGE = "maxRange";
339
340 /**
341 * Static attribute for minRange.
342 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530343 public static final String SHORT_MIN_RANGE_ATTR =
344 "static final int INT16_MIN_RANGE = -32768;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530345
346 /**
347 * Static attribute for minRange.
348 */
349 public static final String SHORT_MIN_RANGE = "INT16_MIN_RANGE";
350
351 /**
352 * Static attribute for minRange.
353 */
354 public static final String SHORT_MAX_RANGE = "INT16_MAX_RANGE";
355
356 /**
357 * Static attribute for maxRange.
358 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530359 public static final String SHORT_MAX_RANGE_ATTR =
360 "static final int INT16_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530361
362
363 /**
364 * Static attribute for minRange.
365 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530366 public static final String UINT8_MIN_RANGE_ATTR =
367 "static final int UINT8_MIN_RANGE = 0;\n";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530368
369 /**
370 * Static attribute for maxRange.
371 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530372 public static final String UINT8_MAX_RANGE_ATTR =
373 "static final int UINT8_MAX_RANGE = 32767;";
Bharat saraswal2da23bf2016-08-25 15:28:39 +0530374
375
376 /**
377 * Static attribute for minRange.
378 */
379 public static final String UINT8_MIN_RANGE = "UINT8_MIN_RANGE";
380
381 /**
382 * Static attribute for maxRange.
383 */
384 public static final String UINT8_MAX_RANGE = "UINT8_MAX_RANGE";
385
386 /**
387 * Static attribute for minRange.
388 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530389 public static final String INT_MIN_RANGE_ATTR =
390 "static final int INT32_MIN_RANGE = -2147483648;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530391
392 /**
393 * Static attribute for minRange.
394 */
395 public static final String INT_MIN_RANGE = "INT32_MIN_RANGE";
396
397 /**
398 * Static attribute for minRange.
399 */
400 public static final String INT_MAX_RANGE = "INT32_MAX_RANGE";
401
402 /**
403 * Static attribute for maxRange.
404 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530405 public static final String INT_MAX_RANGE_ATTR =
406 "static final int INT32_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530407
408
409 /**
410 * Static attribute for minRange.
411 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530412 public static final String UINT_MIN_RANGE_ATTR =
413 "static final int UINT16_MIN_RANGE = 0;\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530414
415 /**
416 * Static attribute for maxRange.
417 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530418 public static final String UINT_MAX_RANGE_ATTR =
419 "static final int UINT16_MAX_RANGE = 2147483647;";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530420
421
422 /**
423 * Static attribute for minRange.
424 */
425 public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE";
426
427 /**
428 * Static attribute for maxRange.
429 */
430 public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE";
431
432 /**
433 * Static attribute for minRange.
434 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530435 public static final String LONG_MIN_RANGE_ATTR =
436 "static final BigInteger INT64_MIN_RANGE =" +
437 " new BigInteger(\"-9223372036854775808\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530438
439 /**
440 * Static attribute for maxRange.
441 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530442 public static final String LONG_MAX_RANGE_ATTR =
443 "static final BigInteger INT64_MAX_RANGE =" +
444 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530445
446 /**
447 * Static attribute for minRange.
448 */
449 public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE";
450
451 /**
452 * Static attribute for maxRange.
453 */
454 public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE";
455
456 /**
457 * Static attribute for minRange.
458 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530459 public static final String ULONG_MIN_RANGE_ATTR =
460 "static final BigInteger UINT32_MIN_RANGE =" +
461 " new BigInteger(\"0\");\n";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530462
463 /**
464 * Static attribute for maxRange.
465 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530466 public static final String ULONG_MAX_RANGE_ATTR =
467 "static final BigInteger UINT32_MAX_RANGE =" +
468 " new BigInteger(\"9223372036854775807\");";
Bharat saraswal64e7e232016-07-14 23:33:55 +0530469
470
471 /**
472 * Static attribute for minRange.
473 */
474 public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE";
475
476 /**
477 * Static attribute for maxRange.
478 */
479 public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE";
480
481 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530482 * Static attribute for subject.
483 */
484 public static final String SUBJECT = "Subject";
485
486 /**
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530487 * Static attribute for ListenerService.
488 */
489 public static final String LISTENER_SERVICE = "ListenerService";
490
491 /**
492 * Static attribute for listener package.
493 */
Bharat saraswal715d3fc2016-05-17 19:59:16 +0530494 public static final String ONOS_EVENT_PKG = "org.onosproject.event";
Bharat saraswal4aaab4d2016-05-17 14:19:38 +0530495
496 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +0530497 * Static attribute for colon.
498 */
499 public static final String COLON = ":";
500
501 /**
502 * Static attribute for caret.
503 */
504 public static final String CARET = "^";
505
506 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530507 * Static attribute for input string.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530508 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530509 public static final String INPUT = "input";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530510
511 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530512 * Static attribute for output string.
513 */
514 public static final String OUTPUT = "output";
515
516 /**
517 * Static attribute for current string.
518 */
519 public static final String CURRENT = "current";
520
521 /**
janani bb08850e2016-05-17 18:20:33 +0530522 * Static attribute for leafref string.
523 */
524 public static final String LEAFREF = "leafref";
525
526 /**
527 * Static attribute for identityref string.
528 */
529 public static final String IDENTITYREF = "identityref";
530
531 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +0530532 * Static attribute for output variable of rpc.
533 */
534 public static final String RPC_INPUT_VAR_NAME = "inputVar";
535
536 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530537 * Static attribute for new line.
538 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530539 public static final String EQUAL = "=";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530540
541 /**
542 * Static attribute for slash syntax.
543 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530544 public static final String SLASH = File.separator;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530545
546 /**
547 * Static attribute for add syntax.
548 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530549 public static final String ADD = "+";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530550
551 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530552 * Static attribute for single quote.
553 */
554 public static final String SINGLE_QUOTE = "\'";
555
556 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530557 * Static attribute for quotes.
558 */
b.jananie6d43af2016-03-04 12:29:05 +0530559 public static final String QUOTES = "\"";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530560
561 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530562 * Static attribute for zero.
563 */
564 public static final String ZERO = "0";
565
566 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530567 * Static attribute for ampersand.
568 */
b.jananie6d43af2016-03-04 12:29:05 +0530569 public static final String AND = "&";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530570
571 /**
572 * Static attribute for comma.
573 */
b.jananie6d43af2016-03-04 12:29:05 +0530574 public static final String COMMA = ",";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530575
576 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +0530577 * Static attribute for class.
578 */
579 public static final String CLASS_STRING = "Class";
580
581 /**
582 * Static attribute for put.
583 */
584 public static final String PUT = "put";
585
586 /**
587 * Static attribute for get.
588 */
589 public static final String GET = "get";
590
591 /**
janani b0e4e8ae2016-07-13 21:06:41 +0530592 * Static attribute for slash character.
593 */
594 public static final char CHAR_OF_SLASH = '/';
595
596 /**
597 * Static attribute for open square bracket character.
598 */
599 public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '[';
600
601 /**
602 * Static attribute for close square bracket character.
603 */
604 public static final char CHAR_OF_CLOSE_SQUARE_BRACKET = ']';
605
606 /**
607 * Static attribute for slash string.
608 */
609 public static final String SLASH_FOR_STRING = "/";
610
611 /**
612 * Static attribute for open square bracket.
613 */
614 public static final String OPEN_SQUARE_BRACKET = "[";
615
616 /**
617 * Static attribute for ancestor accessor.
618 */
619 public static final String ANCESTOR_ACCESSOR = "..";
620
621 /**
622 * Static attribute for ancestor accessor along with path.
623 */
624 public static final String ANCESTOR_ACCESSOR_IN_PATH = "../";
625
626 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530627 * Static attribute for add syntax.
628 */
b.jananie6d43af2016-03-04 12:29:05 +0530629 public static final String ADD_STRING = "add";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530630
631 /**
Mahesh Poojary Huawei41547ad2016-07-14 17:49:50 +0530632 * Static attribute for string replace syntax.
633 */
634 public static final String REPLACE_STRING = "replace";
635
636 /**
637 * Static attribute for string trim syntax.
638 */
639 public static final String TRIM_STRING = "trim";
640
641 /**
642 * Static attribute for string split syntax.
643 */
644 public static final String SPLIT_STRING = "split";
645
646 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530647 * Static attribute for Pattern.
648 */
649 public static final String PATTERN = "Pattern";
650
651 /**
652 * Static attribute for Quote.
653 */
654 public static final String QUOTE_STRING = "quote";
655
656 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530657 * Static attribute for from syntax.
658 */
659 public static final String FROM_STRING_METHOD_NAME = "fromString";
660
661 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530662 * Static attribute for check not null syntax.
663 */
b.jananie6d43af2016-03-04 12:29:05 +0530664 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530665
666 /**
667 * Static attribute for hash code syntax.
668 */
b.jananie6d43af2016-03-04 12:29:05 +0530669 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530670
671 /**
672 * Static attribute for equals syntax.
673 */
b.jananie6d43af2016-03-04 12:29:05 +0530674 public static final String EQUALS_STRING = "equals";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530675
676 /**
677 * Static attribute for object.
678 */
b.jananie6d43af2016-03-04 12:29:05 +0530679 public static final String OBJECT_STRING = "Object";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530680
681 /**
682 * Static attribute for instance of syntax.
683 */
b.jananie6d43af2016-03-04 12:29:05 +0530684 public static final String INSTANCE_OF = " instanceof ";
685
Bharat saraswald532a4c2016-03-25 18:19:46 +0530686 /**
687 * Static attribute for value syntax.
688 */
b.jananie6d43af2016-03-04 12:29:05 +0530689 public static final String VALUE = "value";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530690
691 /**
692 * Static attribute for suffix s.
693 */
Bharat saraswal84366c52016-03-23 19:40:35 +0530694 public static final String SUFFIX_S = "s";
b.jananie6d43af2016-03-04 12:29:05 +0530695
Bharat saraswald532a4c2016-03-25 18:19:46 +0530696 /**
697 * Static attribute for if.
698 */
b.jananie6d43af2016-03-04 12:29:05 +0530699 public static final String IF = "if";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530700
701 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +0530702 * Static attribute for else-if.
703 */
704 public static final String ELSE_IF = "else if";
705
706 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530707 * Static attribute for of.
708 */
b.jananie6d43af2016-03-04 12:29:05 +0530709 public static final String OF = "of";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530710
711 /**
712 * Static attribute for other.
713 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530714 public static final String OTHER = "other";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530715
716 /**
717 * Static attribute for obj syntax.
718 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530719 public static final String OBJ = "obj";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530720
721 /**
722 * Static attribute for hash syntax.
723 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530724 public static final String HASH = "hash";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530725
726 /**
727 * Static attribute for to syntax.
728 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530729 public static final String TO = "to";
b.jananie6d43af2016-03-04 12:29:05 +0530730
Bharat saraswald532a4c2016-03-25 18:19:46 +0530731 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530732 * Static attribute for to syntax.
733 */
734 public static final String TO_CAPS = "To";
735
736 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530737 * Static attribute for true syntax.
738 */
b.jananie6d43af2016-03-04 12:29:05 +0530739 public static final String TRUE = "true";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530740
741 /**
742 * Static attribute for false syntax.
743 */
b.jananie6d43af2016-03-04 12:29:05 +0530744 public static final String FALSE = "false";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530745
746 /**
747 * Static attribute for org.
748 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530749 public static final String ORG = "org";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530750
751 /**
752 * Static attribute for temp.
753 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530754 public static final String TEMP = "Temp";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530755
756 /**
757 * Static attribute for YANG file directory.
758 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +0530759 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530760
761 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530762 * Static attribute for diamond close bracket syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530763 */
764 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530765
766 /**
767 * Static attribute for diamond close bracket syntax.
768 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530769 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530770
771 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530772 * Static attribute for event type.
773 */
774 public static final String EVENT_TYPE = ".Type";
775
776 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530777 * Static attribute for exception syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530778 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530779 public static final String EXCEPTION = "Exception";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530780
781 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530782 * Static attribute for exception variable syntax.
Bharat saraswald532a4c2016-03-25 18:19:46 +0530783 */
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530784 public static final String EXCEPTION_VAR = "e";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530785
786 /**
787 * Static attribute for open parenthesis syntax.
788 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530789 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530790
791 /**
Bharat saraswal250a7472016-05-12 13:16:57 +0530792 * Static attribute for switch syntax.
793 */
794 public static final String SWITCH = "switch";
795
796 /**
797 * Static attribute for case syntax.
798 */
799 public static final String CASE = "case";
800
801 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530802 * Static attribute for temp val syntax.
803 */
804 public static final String TMP_VAL = "tmpVal";
805
806 /**
Bharat saraswal64e7e232016-07-14 23:33:55 +0530807 * Static attribute for close curly bracket syntax.
808 */
809 public static final String ELSE = "else";
810
811 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530812 * From string parameter name.
813 */
814 public static final String FROM_STRING_PARAM_NAME = "valInString";
815
816 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530817 * Static attribute for close parenthesis syntax.
818 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530819 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530820
821 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530822 * Static attribute for empty parameter function call.
823 */
824 public static final String EMPTY_PARAMETER_FUNCTION_CALL = "()";
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 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530847 * Static attribute for getter method prefix.
848 */
849 public static final String GET_METHOD = "getMethod";
850
851 /**
852 * Static attribute for getter method prefix.
853 */
854 public static final String GET_CLASS = "getClass()";
855
856 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530857 * Static attribute for setter method prefix.
858 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530859 public static final String SET_METHOD_PREFIX = "set";
860
861 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530862 * Static attribute for get filter leaf flags.
863 */
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530864 public static final String GET_VALUE_LEAF_FLAGS = "getValueLeafFlags";
865
866 /**
867 * Static attribute for get select filter leaf flags.
868 */
869 public static final String GET_SELECT_LEAF_FLAGS = "getSelectLeafFlags";
870
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530871
872 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530873 * Static attribute for getLeafIndex.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530874 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530875 public static final String GET_LEAF_INDEX = "getLeafIndex()";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530876
877 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530878 * Static attribute for op param.
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530879 */
Bharat saraswal8beac342016-08-04 02:00:03 +0530880 public static final String OP_PARAM = "OpParam";
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530881
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530882
883 /**
884 * Static attribute for is filter content match method prefix.
885 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530886 public static final String PROCESS_SUBTREE_FILTERING =
887 "processSubtreeFiltering";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530888
889 /**
890 * variable name of the subtree filtering result builder.
891 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530892 public static final String SUBTREE_FILTERING_RESULT_BUILDER =
893 "subTreeFilteringResultBuilder";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530894
895 /**
896 * variable name of the subtree filtering result flag.
897 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530898 public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG =
899 "isAnySelectOrContainmentNode";
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530900
901 /**
902 * variable name of the subtree filtering to select all child.
903 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530904 public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG =
905 "isSelectAllSchemaChild";
Bharat saraswal8beac342016-08-04 02:00:03 +0530906
907 /**
908 * Static attribute for break prefix.
909 */
910 public static final String BREAK = "break";
911
912 /**
913 * Static attribute for break prefix.
914 */
915 public static final String IS_EMPTY = "isEmpty()";
916
917 /**
918 * Static attribute for is isLeafValueSet method prefix.
919 */
920 public static final String VALUE_LEAF_SET = "isLeafValueSet";
921
922 /**
923 * Static attribute for is isSelectLeaf method prefix.
924 */
925 public static final String IS_SELECT_LEAF = "isSelectLeaf";
926
927 /**
928 * Static attribute for is selectLeaf method prefix.
929 */
930 public static final String SET_SELECT_LEAF = "selectLeaf";
931
932 /**
933 * Static attribute for is LeafIdentifier enum prefix.
934 */
935 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
Bharat saraswal9fab16b2016-09-23 23:27:24 +0530936 /**
937 * Static attribute for is leaf.
938 */
939 public static final String LEAF = "leaf";
Bharat saraswal8beac342016-08-04 02:00:03 +0530940
941 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530942 * Static attribute for four space indentation.
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530943 */
944 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswald532a4c2016-03-25 18:19:46 +0530945
946 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +0530947 * Static attribute for not syntax.
948 */
949 public static final String NOT = "!";
950
951 /**
Gaurav Agrawal97a5e1c2016-04-18 18:53:11 +0530952 * Static attribute for try syntax.
953 */
954 public static final String TRY = "try";
955
956 /**
957 * Static attribute for catch syntax.
958 */
959 public static final String CATCH = "catch";
960
961 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +0530962 * Static attribute for eight space indentation.
963 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530964 public static final String EIGHT_SPACE_INDENTATION =
965 FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530966
967 /**
968 * Static attribute for twelve space indentation.
969 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530970 public static final String TWELVE_SPACE_INDENTATION =
971 EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswald532a4c2016-03-25 18:19:46 +0530972
973 /**
974 * Static attribute for sixteen space indentation.
975 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530976 public static final String SIXTEEN_SPACE_INDENTATION =
977 TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswaldedf9f82016-02-12 20:48:30 +0530978
979 /**
Bharat saraswal8beac342016-08-04 02:00:03 +0530980 * Static attribute for twenty space indentation.
981 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530982 public static final String TWENTY_SPACE_INDENTATION =
983 SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal8beac342016-08-04 02:00:03 +0530984
985 /**
986 * Static attribute for twenty four space indentation.
987 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530988 public static final String TWENTY_FOUR_SPACE_INDENTATION =
989 TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530990
991 /**
992 * Static attribute for twenty eight space indentation.
993 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +0530994 public static final String TWENTY_EIGHT_SPACE_INDENTATION =
995 TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +0530996
997 /**
998 * Static attribute for thirty two space indentation.
999 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301000 public static final String THIRTY_TWO_SPACE_INDENTATION =
1001 TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301002
1003 /**
1004 * continue.
1005 */
1006 public static final String CONTINUE = "continue";
Bharat saraswal8beac342016-08-04 02:00:03 +05301007
1008 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301009 * Static attribute for generated code path.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301010 */
Bharat saraswal5600f0f2016-03-09 18:34:56 +05301011 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301012
1013 /**
1014 * Static attribute for base package.
1015 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301016 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301017
1018 /**
1019 * Static attribute for YANG date prefix.
1020 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301021 public static final String REVISION_PREFIX = "rev";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301022
1023 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301024 * Static attribute for YANG automatic prefix for identifiers with keywords
1025 * and beginning with digits.
janani b1c6acc42016-04-15 16:18:30 +05301026 */
1027 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
1028
1029 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301030 * Static attribute for YANG version prefix.
Bharat saraswald532a4c2016-03-25 18:19:46 +05301031 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301032 public static final String VERSION_PREFIX = "v";
1033
1034 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301035 * Static attribute for private modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301036 */
1037 public static final String PRIVATE = "private";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301038
1039 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301040 * Static attribute for public modifier.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301041 */
Bharat saraswald532a4c2016-03-25 18:19:46 +05301042 public static final String PUBLIC = "public";
1043
1044 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301045 * Static attribute for abstract modifier.
1046 */
1047 public static final String ABSTRACT = "abstract";
1048
1049 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301050 * Static attribute for protected modifier.
1051 */
1052 public static final String PROTECTED = "protected";
1053
1054 /**
Vinod Kumar S08710982016-03-03 19:55:30 +05301055 * Void java type.
1056 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301057 public static final String VOID = "void";
Vinod Kumar S08710982016-03-03 19:55:30 +05301058
1059 /**
1060 * String built in java type.
1061 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301062 public static final String STRING_DATA_TYPE = "String";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301063
Vinod Kumar S08710982016-03-03 19:55:30 +05301064 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301065 * Java.lang.* packages.
Vinod Kumar S08710982016-03-03 19:55:30 +05301066 */
1067 public static final String JAVA_LANG = "java.lang";
1068
1069 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301070 * Java.math.* packages.
1071 */
1072 public static final String JAVA_MATH = "java.math";
1073
1074 /**
1075 * Boolean built in java type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301076 */
Bharat saraswal84366c52016-03-23 19:40:35 +05301077 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar S08710982016-03-03 19:55:30 +05301078
1079 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301080 * BigInteger built in java type.
1081 */
1082 public static final String BIG_INTEGER = "BigInteger";
1083
1084 /**
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301085 * BigDecimal built in java type.
1086 */
1087 public static final String BIG_DECIMAL = "BigDecimal";
1088
1089 /**
1090 * BitSet built in java type.
1091 */
1092 public static final String BIT_SET = "BitSet";
1093
1094 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301095 * Byte java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301096 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301097 public static final String BYTE = "byte";
Vinod Kumar S08710982016-03-03 19:55:30 +05301098
1099 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301100 * Short java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301101 */
1102 public static final String SHORT = "short";
1103
1104 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301105 * Int java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301106 */
1107 public static final String INT = "int";
1108
1109 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301110 * Long java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301111 */
1112 public static final String LONG = "long";
1113
1114 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301115 * Double java built in type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301116 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301117 public static final String DOUBLE = "double";
1118
1119 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301120 * Boolean built in java wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301121 */
1122 public static final String BOOLEAN_WRAPPER = "Boolean";
1123
1124 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301125 * Byte java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301126 */
1127 public static final String BYTE_WRAPPER = "Byte";
1128
1129 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301130 * Short java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301131 */
1132 public static final String SHORT_WRAPPER = "Short";
1133
1134 /**
1135 * Integer java built in wrapper type.
1136 */
1137 public static final String INTEGER_WRAPPER = "Integer";
1138
1139 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301140 * Long java built in wrapper type.
Vinod Kumar S08710982016-03-03 19:55:30 +05301141 */
1142 public static final String LONG_WRAPPER = "Long";
1143
1144 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301145 * Static variable for question mark.
Vinod Kumar S08710982016-03-03 19:55:30 +05301146 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301147 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei2cd44332016-07-14 12:38:17 +05301148
1149 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301150 * Static variable for forType string.
1151 */
1152 public static final String FOR_TYPE_STRING = " for type ";
1153
1154 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301155 * List of keywords in java, this is used for checking if the input does not
1156 * contain these keywords.
b.jananie6d43af2016-03-04 12:29:05 +05301157 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301158 public static final List<String> JAVA_KEY_WORDS =
1159 Arrays.asList("abstract", "assert", "boolean", "break", "byte",
1160 "case", "catch", "char", "class", "const", "continue",
1161 "default", "do", "double", "else", "extends", "false",
1162 "final", "finally", "float", "for", "goto", "if",
1163 "implements", "import", "instanceof", "enum", "int",
1164 "interface", "long", "native", "new", "null",
1165 "package", "private", "protected", "public", "return",
1166 "short", "static", "strictfp", "super", "switch",
1167 "synchronized", "this", "throw", "throws", "transient",
1168 "true", "try", "void", "volatile", "while");
b.jananie6d43af2016-03-04 12:29:05 +05301169
1170 /**
janani b1c6acc42016-04-15 16:18:30 +05301171 * Static attribute for regex for all the special characters.
b.jananie6d43af2016-03-04 12:29:05 +05301172 */
janani b1c6acc42016-04-15 16:18:30 +05301173 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1174
1175 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301176 * Static attribute for regex for three special characters used in
1177 * identifier.
janani b1c6acc42016-04-15 16:18:30 +05301178 */
1179 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1180
1181 /**
1182 * Static attribute for regex for period.
1183 */
1184 public static final String REGEX_FOR_PERIOD = "[.]";
1185
1186 /**
1187 * Static attribute for regex for underscore.
1188 */
1189 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1190
1191 /**
1192 * Static attribute for regex for hyphen.
1193 */
1194 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301195
1196 /**
1197 * Static attribute for regex for digits.
1198 */
b.jananie6d43af2016-03-04 12:29:05 +05301199 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1200
1201 /**
janani b703cfe42016-05-17 13:12:22 +05301202 * Static attribute for regex with digits.
1203 */
1204 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1205
1206 /**
janani b1c6acc42016-04-15 16:18:30 +05301207 * Static attribute for regex for single letter.
1208 */
1209 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1210
1211 /**
1212 * Static attribute for regex for digits with single letter.
1213 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301214 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER =
1215 "[0-9]+[a-zA-Z]";
janani b1c6acc42016-04-15 16:18:30 +05301216
1217 /**
janani b703cfe42016-05-17 13:12:22 +05301218 * Static attribute for regex with uppercase.
1219 */
1220 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1221
1222 /**
1223 * Static attribute for regex for single capital case letter.
1224 */
1225 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1226
1227 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301228 * Static attribute for regex for capital case letter with any number of
1229 * digits and small case letters.
janani b703cfe42016-05-17 13:12:22 +05301230 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301231 public static final String
1232 REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES =
1233 "[A-Z][0-9a-z]+";
janani b703cfe42016-05-17 13:12:22 +05301234
1235 /**
janani b3e357f62016-05-19 17:39:50 +05301236 * Static attribute for regex for any string ending with service.
1237 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301238 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE =
1239 ".+Service";
janani b3e357f62016-05-19 17:39:50 +05301240
1241 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301242 * Static attribute for class syntax.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301243 */
1244 public static final String CLASS = "class";
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301245
1246 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301247 * Static attribute for builder syntax.
1248 */
1249 public static final String BUILDER = "Builder";
1250
1251 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301252 * Static attribute for builder syntax.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301253 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301254 public static final String BUILDER_LOWER_CASE = "builder";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301255
1256 /**
1257 * Static attribute for service syntax.
1258 */
1259 public static final String SERVICE = "Service";
1260
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301261 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301262 * Static attribute for interface syntax.
1263 */
1264 public static final String INTERFACE = "interface";
1265
1266 /**
1267 * Static attribute for enum syntax.
1268 */
1269 public static final String ENUM = "enum";
1270
1271 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301272 * Static attribute for type syntax.
1273 */
1274 public static final String TYPE = "Type";
1275
1276 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301277 * Static attribute for static syntax.
1278 */
1279 public static final String STATIC = "static";
1280
1281 /**
1282 * Static attribute for final syntax.
1283 */
1284 public static final String FINAL = "final";
1285
1286 /**
1287 * Static attribute for package syntax.
1288 */
1289 public static final String PACKAGE = "package";
1290
1291 /**
1292 * Static attribute for import syntax.
1293 */
1294 public static final String IMPORT = "import ";
1295
1296 /**
1297 * Static attribute for null syntax.
1298 */
1299 public static final String NULL = "null";
1300
1301 /**
1302 * Static attribute for return syntax.
1303 */
1304 public static final String RETURN = "return";
1305
1306 /**
1307 * Static attribute for java new syntax.
1308 */
1309 public static final String NEW = "new";
1310
1311 /**
1312 * Static attribute for this syntax.
1313 */
1314 public static final String THIS = "this";
1315
1316 /**
1317 * Static attribute for implements syntax.
1318 */
1319 public static final String IMPLEMENTS = "implements";
1320
1321 /**
1322 * Static attribute for extends syntax.
1323 */
1324 public static final String EXTEND = "extends";
1325
1326 /**
Gaurav Agrawal02a60de2016-04-20 15:49:17 +05301327 * Static attribute for service interface suffix syntax.
1328 */
1329 public static final String SERVICE_METHOD_STRING = "Service";
1330
1331 /**
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301332 * For event file generation.
1333 */
1334 public static final String EVENT_STRING = "Event";
1335
1336 /**
1337 * For event listener file generation.
1338 */
Bharat saraswalaab24b92016-08-02 18:43:16 +05301339 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301340
1341 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301342 * For event subject file generation.
1343 */
1344 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1345
1346 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301347 * Static attribute for build method syntax.
1348 */
1349 public static final String BUILD = "build";
1350
1351 /**
1352 * Static attribute for object.
1353 */
1354 public static final String OBJECT = "Object";
1355
1356 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301357 * Static attribute for app instance.
1358 */
1359 public static final String APP_INSTANCE = "appInstance";
1360
1361 /**
Bharat saraswale50edca2016-08-05 01:58:25 +05301362 * Static attribute for instance.
1363 */
1364 public static final String INSTANCE = "instance";
1365
1366 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301367 * Static attribute for override annotation.
1368 */
1369 public static final String OVERRIDE = "@Override";
1370
1371 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301372 * Static attribute for collections.
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301373 */
b.jananie6d43af2016-03-04 12:29:05 +05301374 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301375
1376 /**
Mahesh Poojary Huawei1025a172016-09-27 16:06:07 +05301377 * Static attribute for regex.
1378 */
1379 public static final String REGEX_IMPORTS = "java.util.regex";
1380
1381 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301382 * Static attribute for map.
1383 */
1384 public static final String MAP = "Map";
1385
1386 /**
1387 * Static attribute for hash map.
1388 */
1389 public static final String HASH_MAP = "HashMap";
1390
1391
1392 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301393 * Static attribute for more object import package.
1394 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301395 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG =
1396 "com.google.common.base";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301397
1398 /**
1399 * Static attribute for more object import class.
1400 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301401 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301402 "MoreObjects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301403
1404 /**
1405 * Static attribute for to string method.
1406 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301407 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301408 "MoreObjects.toStringHelper(getClass())";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301409
1410 /**
1411 * Static attribute for java utilities import package.
1412 */
Vinod Kumar S9f26ae52016-03-23 15:30:27 +05301413 public static final String JAVA_UTIL_OBJECTS_IMPORT_PKG = "java.util";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301414
1415 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301416 * Static attribute for bitset.
1417 */
1418 public static final String BITSET = "BitSet";
1419
1420 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301421 * Static attribute for java utilities objects import class.
1422 */
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301423 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301424
1425 /**
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301426 * Static attribute for AugmentedInfo class.
1427 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301428 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswale2bc60d2016-04-16 02:28:25 +05301429
1430 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301431 * Static attribute for AugmentedInfo class.
1432 */
1433 public static final String YANG_AUGMENTED_INFO_LOWER_CASE =
1434 "yangAugmentedInfo";
1435
1436 /**
Bharat saraswalaf413b82016-07-14 15:18:20 +05301437 * Static attribute for augmented.
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301438 */
Bharat saraswalaf413b82016-07-14 15:18:20 +05301439 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huaweid81eccb2016-06-01 14:30:22 +05301440
Bharat saraswal4aaab4d2016-05-17 14:19:38 +05301441 /**
Bharat saraswald532a4c2016-03-25 18:19:46 +05301442 * Static attribute for list.
1443 */
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301444 public static final String LIST = "List";
Bharat saraswald532a4c2016-03-25 18:19:46 +05301445
1446 /**
Vidyashree Ramab3670472016-08-06 15:49:56 +05301447 * Static attribute for queue.
1448 */
1449 public static final String QUEUE = "Queue";
1450
1451 /**
1452 * Static attribute for set.
1453 */
1454 public static final String SET = "Set";
1455
1456 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301457 * Comment to be added for auto generated impl methods.
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301458 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301459 public static final String YANG_UTILS_TODO =
1460 "//TODO: YANG utils generated code";
VinodKumarS-Huawei6266db32016-05-10 17:58:57 +05301461
1462 /**
Bharat saraswal715d3fc2016-05-17 19:59:16 +05301463 * Static attribute for AbstractEvent.
1464 */
1465 public static final String ABSTRACT_EVENT = "AbstractEvent";
1466
1467 /**
1468 * Static attribute for EventListener.
1469 */
1470 public static final String EVENT_LISTENER = "EventListener";
1471
1472 /**
Shankara-Huaweia1039e52016-07-14 16:53:09 +05301473 * Static attribute for or operator.
1474 */
1475 public static final String OR_OPERATION = "||";
1476
1477 /**
VinodKumarS-Huawei9a91b482016-08-19 23:22:59 +05301478 * Static attribute for or operator.
1479 */
1480 public static final String AND_OPERATION = "&&";
1481
1482 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301483 * Static attribute for YANG file error.
1484 */
1485 public static final String YANG_FILE_ERROR = "YANG file error : ";
1486
1487 /**
1488 * Static attribute for unsupported error information.
1489 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301490 public static final String UNSUPPORTED_YANG_CONSTRUCT =
1491 " is not supported.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301492
1493 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301494 * Static attribute for "is invalid" information.
1495 */
1496 public static final String IS_INVALID = " is invalid.";
1497
1498 /**
1499 * Static attribute for data model tree error information.
1500 */
1501 public static final String INVALID_TREE = "Internal datamodel error: " +
1502 "Datamodel tree is not correct";
1503
1504 /**
Vidyashree Ramab6248172016-05-17 16:16:15 +05301505 * Static attribute for currently unsupported error information.
1506 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301507 public static final String CURRENTLY_UNSUPPORTED =
1508 " is not supported in current version, please check wiki" +
1509 " for YANG utils road map.";
Vidyashree Ramab6248172016-05-17 16:16:15 +05301510
1511 /**
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301512 * Static attribute for leaf ref target node error information.
1513 */
1514 public static final String LEAFREF_ERROR = "YANG file error: The target" +
1515 " node, in the leafref path ";
1516
1517 /**
1518 * Static attribute for leaf holder error information.
1519 */
1520 public static final String LEAF_HOLDER_ERROR = "Referred node should be of" +
1521 " type leaves holder in ";
1522
1523 /**
1524 * Static attribute for invalid resolve entity error information.
1525 */
1526 public static final String INVALID_RESOLVED_ENTITY = "Data Model " +
1527 "Exception: Entity to resolved is other than type/uses";
1528
1529 /**
1530 * Static attribute for invalid resolve entity error information.
1531 */
1532 public static final String INVALID_ENTITY = "Data Model Exception: Entity " +
1533 "to resolved is other than identityref";
1534
1535 /**
1536 * Static attribute for invalid state error information.
1537 */
1538 public static final String INVALID_LINKER_STATE = "Data Model Exception: " +
1539 "Unsupported, linker state";
1540
1541 /**
1542 * Static attribute for leaf ref resolve entity error information.
1543 */
1544 public static final String FAILED_TO_FIND_LEAD_INFO_HOLDER = "YANG file " +
1545 "error: Unable to find base leaf/leaf-list for given leafref path ";
1546
1547 /**
1548 * Static attribute for compiler annotation resolve entity error
1549 * information.
1550 */
1551 public static final String FAILED_TO_FIND_ANNOTATION = "Failed to link " +
1552 "compiler annotation ";
1553
1554 /**
1555 * Static attribute for failed to link entity error information.
1556 */
1557 public static final String FAILED_TO_LINK = "Failed to link ";
1558
1559 /**
1560 * Static attribute for un-resolve entity error information.
1561 */
1562 public static final String UNRESOLVABLE = "Data Model Exception: Entity " +
1563 "to resolved is not Resolvable";
1564
1565 /**
1566 * Static attribute for invalid resolve entity error information.
1567 */
1568 public static final String LINKER_ERROR = "Data Model Exception: Entity" +
1569 " to resolved is other than type/uses/if-feature/leafref/base/identityref";
1570
1571 /**
1572 * Static attribute for invalid resolve entity error information.
1573 */
1574 public static final String INVALID_TARGET = "Invalid target node type ";
1575 /**
Vidyashree Rama5daea742016-05-20 16:29:25 +05301576 * Static attribute for typedef linker error information.
1577 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301578 public static final String TYPEDEF_LINKER_ERROR =
1579 "YANG file error: Unable to find base typedef for given type";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301580
1581 /**
1582 * Static attribute for grouping linker error information.
1583 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301584 public static final String GROUPING_LINKER_ERROR =
1585 "YANG file error: Unable to find base grouping for given uses";
Vidyashree Rama5daea742016-05-20 16:29:25 +05301586
1587 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301588 * Static attribute for if-feature linker error information.
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301589 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301590 public static final String FEATURE_LINKER_ERROR =
1591 "YANG file error: Unable to find feature for given if-feature";
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301592
1593 /**
janani b0e4e8ae2016-07-13 21:06:41 +05301594 * Static attribute for leafref linker error information.
1595 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301596 public static final String LEAFREF_LINKER_ERROR =
1597 "YANG file error: Unable to find base leaf/leaf-list for given " +
1598 "leafref";
janani b0e4e8ae2016-07-13 21:06:41 +05301599
1600 /**
Shankara-Huawei234cd092016-07-14 11:35:34 +05301601 * Static attribute for base linker error information.
1602 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301603 public static final String BASE_LINKER_ERROR =
1604 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301605
1606 /**
1607 * Static attribute for identityref linker error information.
1608 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301609 public static final String IDENTITYREF_LINKER_ERROR =
1610 "YANG file error: Unable to find base identity for given base";
Shankara-Huawei234cd092016-07-14 11:35:34 +05301611
1612 /**
Bharat saraswalc2d3be12016-06-16 00:29:12 +05301613 * Static attribute for jar.
1614 */
1615 public static final String JAR = "jar";
1616
1617 /**
Bharat saraswal039f59c2016-07-14 21:57:13 +05301618 * Static attribute for for.
1619 */
1620 public static final String FOR = "for";
1621
1622 /**
1623 * Static attribute for YangAugmentedOpParamInfo.
1624 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301625 public static final String YANG_AUGMENTED_OP_PARAM_INFO =
1626 "YangAugmentedOpParamInfo";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301627
1628 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301629 * Static attribute for NoSuchMethodException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301630 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301631 public static final String NO_SUCH_METHOD_EXCEPTION =
1632 "NoSuchMethodException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301633
1634 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301635 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301636 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301637 public static final String INVOCATION_TARGET_EXCEPTION =
1638 "InvocationTargetException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301639
1640 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301641 * Static attribute for InvocationTargetException.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301642 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301643 public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" +
1644 " java.lang.reflect.InvocationTargetException;\n";
1645 /**
1646 * Static attribute for IllegalAccessException.
1647 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301648 public static final String ILLEGAL_ACCESS_EXCEPTION =
1649 "IllegalAccessException";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301650
1651 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301652 * Static attribute for arrayList.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301653 */
Bharat saraswal8beac342016-08-04 02:00:03 +05301654 public static final String ARRAY_LIST = "ArrayList<>()";
Bharat saraswal039f59c2016-07-14 21:57:13 +05301655
1656 /**
Bharat saraswal8beac342016-08-04 02:00:03 +05301657 * Static attribute for arrayList import.
Bharat saraswal039f59c2016-07-14 21:57:13 +05301658 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301659 public static final String ARRAY_LIST_IMPORT =
1660 IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Gaurav Agrawal8a147522016-08-10 13:43:01 +05301661
1662 /**
1663 * Static attribute for unused keyword.
1664 */
1665 public static final String UNUSED = "UNUSED";
1666
1667 /**
1668 * Static attribute for 1 keyword.
1669 */
1670 public static final String ONE = "1";
1671
1672 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301673 * Static attribute for YANG node operation type class.
Vidyashree Rama13960652016-04-26 15:06:06 +05301674 */
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301675 public static final String OPERATION_TYPE_CLASS =
1676 "OnosYangNodeOperationType";
1677
1678 /**
1679 * Static attribute for YANG node operation type attribute.
1680 */
1681 public static final String OPERATION_TYPE_ATTRIBUTE =
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301682 "OpType";
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301683
1684 /**
janani b3c396f02016-09-27 18:45:23 +05301685 * Static attribute for input keyword to be suffixed with rpc name.
1686 */
1687 public static final String INPUT_KEYWORD = "_input";
1688
1689 /**
1690 * Static attribute for output keyword to be suffixed with rpc name.
1691 */
1692 public static final String OUTPUT_KEYWORD = "_output";
1693
1694 /**
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301695 * Static attribute for event class.
1696 */
1697 public static final String EVENT_CLASS = "event class";
1698
1699 /**
1700 * Static attribute for typedef class.
1701 */
1702 public static final String TYPEDEF_CLASS = "typedef class";
1703
1704 /**
1705 * Static attribute for impl class.
1706 */
1707 public static final String IMPL_CLASS = "impl class";
1708
1709 /**
1710 * Static attribute for union class.
1711 */
1712 public static final String UNION_CLASS = "union class";
1713
1714 /**
1715 * Static attribute for enum class.
1716 */
1717 public static final String ENUM_CLASS = "enum class";
1718
1719 /**
1720 * Static attribute for rpc class.
1721 */
1722 public static final String RPC_CLASS = "rpc class";
1723
1724 /**
1725 * Static attribute for builder class.
1726 */
1727 public static final String BUILDER_CLASS = "builder class";
1728
1729 /**
1730 * Static attribute for builder interface.
1731 */
1732 public static final String BUILDER_INTERFACE = "builder interface";
1733
1734 /**
1735 * Static attribute for binary.
1736 */
1737 public static final String BINARY = "binary";
1738
1739 /**
1740 * Static attribute for bits.
1741 */
1742 public static final String BITS = "bits";
1743
1744 /**
1745 * Static attribute for YANG.
1746 */
1747 public static final String YANG = "yang";
1748
Bharat saraswal9fab16b2016-09-23 23:27:24 +05301749 /**
1750 * Static attribute for error msg.
1751 */
1752 public static final String ERROR_MSG_FOR_GEN_CODE = "please check whether " +
1753 "multiple yang" + " files has same module/submodule" +
1754 " \"name\" and \"namespace\"" + "or You may have generated code of" +
1755 " previous build present in your directory.";
1756
1757 /**
1758 * Static attribute for error msg.
1759 */
1760 public static final String ERROR_MSG_JAVA_IDENTITY = "Expected java " +
1761 "identity instance node ";
1762 /**
1763 * Static attribute for in.
1764 */
1765 public static final String IN = " in ";
1766
1767 /**
1768 * Static attribute for at.
1769 */
1770 public static final String AT = " at ";
1771
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301772 // No instantiation.
Vidyashree Rama13960652016-04-26 15:06:06 +05301773 private UtilConstants() {
1774 }
Gaurav Agrawal3b57f362016-09-07 13:16:35 +05301775
1776 /**
1777 * Represents operation type.
1778 */
1779 public enum Operation {
1780 /**
1781 * Represents add operation.
1782 */
1783 ADD,
1784
1785 /**
1786 * Represents remove operation.
1787 */
1788 REMOVE
1789 }
Bharat saraswaldedf9f82016-02-12 20:48:30 +05301790}