janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 3 | * |
| 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 | |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 17 | package org.onosproject.yangutils.utils.io; |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 18 | |
| 19 | /** |
| 20 | * Representation of YANG to java naming conflict resolver util. |
| 21 | */ |
| 22 | public final class YangToJavaNamingConflictUtil { |
| 23 | |
| 24 | /** |
| 25 | * Contains the replacement value for a period. |
| 26 | */ |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 27 | private String replacementForPeriodInIdentifier; |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * Contains the replacement value for an underscore. |
| 31 | */ |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 32 | private String replacementForUnderscoreInIdentifier; |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 33 | |
| 34 | /** |
| 35 | * Contains the replacement value for a hyphen. |
| 36 | */ |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 37 | private String replacementForHyphenInIdentifier; |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 38 | |
| 39 | /** |
janani b | 3e357f6 | 2016-05-19 17:39:50 +0530 | [diff] [blame] | 40 | * Contains the prefix value for adding with the identifier. |
| 41 | */ |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 42 | private String prefixForIdentifier; |
janani b | 3e357f6 | 2016-05-19 17:39:50 +0530 | [diff] [blame] | 43 | |
| 44 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 45 | * Creates an object for YANG to java naming conflict util. |
| 46 | */ |
| 47 | public YangToJavaNamingConflictUtil() { |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Sets the replacement value for a period. |
| 52 | * |
| 53 | * @param periodReplacement replacement value for period |
| 54 | */ |
| 55 | public void setReplacementForPeriod(String periodReplacement) { |
| 56 | replacementForPeriodInIdentifier = periodReplacement; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Returns the replaced period value. |
| 61 | * |
| 62 | * @return replaced period |
| 63 | */ |
| 64 | public String getReplacementForPeriod() { |
| 65 | return replacementForPeriodInIdentifier; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Sets the replacement value for a hyphen. |
| 70 | * |
| 71 | * @param hyphenReplacement replacement value for hyphen |
| 72 | */ |
| 73 | public void setReplacementForHyphen(String hyphenReplacement) { |
| 74 | replacementForHyphenInIdentifier = hyphenReplacement; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Returns the replaced hyphen value. |
| 79 | * |
| 80 | * @return replaced hyphen |
| 81 | */ |
| 82 | public String getReplacementForHyphen() { |
| 83 | return replacementForHyphenInIdentifier; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Sets the replacement value for an underscore. |
| 88 | * |
| 89 | * @param underscoreReplacement replacement value for underscore |
| 90 | */ |
| 91 | public void setReplacementForUnderscore(String underscoreReplacement) { |
| 92 | replacementForUnderscoreInIdentifier = underscoreReplacement; |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Returns the replaced underscore value. |
| 97 | * |
| 98 | * @return replaced underscore |
| 99 | */ |
| 100 | public String getReplacementForUnderscore() { |
| 101 | return replacementForUnderscoreInIdentifier; |
| 102 | } |
janani b | 3e357f6 | 2016-05-19 17:39:50 +0530 | [diff] [blame] | 103 | |
| 104 | /** |
| 105 | * Sets the prefix value for adding with the identifier. |
| 106 | * |
| 107 | * @param prefix prefix for identifier |
| 108 | */ |
| 109 | public void setPrefixForIdentifier(String prefix) { |
| 110 | prefixForIdentifier = prefix; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Returns the prefix for identifier. |
| 115 | * |
| 116 | * @return prefix for identifier |
| 117 | */ |
| 118 | public String getPrefixForIdentifier() { |
| 119 | return prefixForIdentifier; |
| 120 | } |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 121 | } |