Committed by
Gerrit Code Review
Coding gudilines for class and methods javadocs fixed.
Change-Id: I0153e6391c9ec9eacaac65c3989834b6bf5c65bf
Showing
150 changed files
with
1057 additions
and
1039 deletions
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * ENUM to identify the YANG resolution type. | 20 | + * Represents ENUM to identify the YANG resolution type. |
21 | */ | 21 | */ |
22 | public enum ResolutionType { | 22 | public enum ResolutionType { |
23 | /** | 23 | /** | ... | ... |
... | @@ -17,29 +17,30 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -17,29 +17,30 @@ package org.onosproject.yangutils.datamodel; |
17 | * Abstraction of error message and application info processing. | 17 | * Abstraction of error message and application info processing. |
18 | */ | 18 | */ |
19 | public interface YangAppErrorInfo { | 19 | public interface YangAppErrorInfo { |
20 | + | ||
20 | /** | 21 | /** |
21 | - * Get the application's error message for data error. | 22 | + * Returns the application's error message for data error. |
22 | * | 23 | * |
23 | * @return application's error message for data error. | 24 | * @return application's error message for data error. |
24 | */ | 25 | */ |
25 | String getGetErrorMessage(); | 26 | String getGetErrorMessage(); |
26 | 27 | ||
27 | /** | 28 | /** |
28 | - * Set the application's error message for data error. | 29 | + * Sets the application's error message for data error. |
29 | * | 30 | * |
30 | * @param errorMessage application's error message for data error. | 31 | * @param errorMessage application's error message for data error. |
31 | */ | 32 | */ |
32 | void setErrorMessage(String errorMessage); | 33 | void setErrorMessage(String errorMessage); |
33 | 34 | ||
34 | /** | 35 | /** |
35 | - * Get the application's error tag for data error. | 36 | + * Returns the application's error tag for data error. |
36 | * | 37 | * |
37 | * @return application's error tag for data error. | 38 | * @return application's error tag for data error. |
38 | */ | 39 | */ |
39 | String getGetErrorAppTag(); | 40 | String getGetErrorAppTag(); |
40 | 41 | ||
41 | /** | 42 | /** |
42 | - * Set the application's error tag for data error. | 43 | + * Sets the application's error tag for data error. |
43 | * | 44 | * |
44 | * @param errorMessage application's error tag for data error. | 45 | * @param errorMessage application's error tag for data error. |
45 | */ | 46 | */ | ... | ... |
... | @@ -76,7 +76,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -76,7 +76,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
76 | * +--------------+---------+-------------+------------------+ | 76 | * +--------------+---------+-------------+------------------+ |
77 | */ | 77 | */ |
78 | /** | 78 | /** |
79 | - * Data model node to maintain information defined in YANG augment. | 79 | + * Representation of data model node to maintain information defined in YANG augment. |
80 | */ | 80 | */ |
81 | public class YangAugment extends YangNode | 81 | public class YangAugment extends YangNode |
82 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { | 82 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { |
... | @@ -124,7 +124,7 @@ public class YangAugment extends YangNode | ... | @@ -124,7 +124,7 @@ public class YangAugment extends YangNode |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Get the augmented node. | 127 | + * Returns the augmented node. |
128 | * | 128 | * |
129 | * @return the augmented node | 129 | * @return the augmented node |
130 | */ | 130 | */ |
... | @@ -133,7 +133,7 @@ public class YangAugment extends YangNode | ... | @@ -133,7 +133,7 @@ public class YangAugment extends YangNode |
133 | } | 133 | } |
134 | 134 | ||
135 | /** | 135 | /** |
136 | - * Set the augmented node. | 136 | + * Sets the augmented node. |
137 | * | 137 | * |
138 | * @param nodeIdentifiers the augmented node | 138 | * @param nodeIdentifiers the augmented node |
139 | */ | 139 | */ |
... | @@ -142,7 +142,7 @@ public class YangAugment extends YangNode | ... | @@ -142,7 +142,7 @@ public class YangAugment extends YangNode |
142 | } | 142 | } |
143 | 143 | ||
144 | /** | 144 | /** |
145 | - * Get the description. | 145 | + * Returns the description. |
146 | * | 146 | * |
147 | * @return the description | 147 | * @return the description |
148 | */ | 148 | */ |
... | @@ -176,7 +176,7 @@ public class YangAugment extends YangNode | ... | @@ -176,7 +176,7 @@ public class YangAugment extends YangNode |
176 | } | 176 | } |
177 | 177 | ||
178 | /** | 178 | /** |
179 | - * Get the list of leaves. | 179 | + * Returns the list of leaves. |
180 | * | 180 | * |
181 | * @return the list of leaves | 181 | * @return the list of leaves |
182 | */ | 182 | */ |
... | @@ -186,7 +186,7 @@ public class YangAugment extends YangNode | ... | @@ -186,7 +186,7 @@ public class YangAugment extends YangNode |
186 | } | 186 | } |
187 | 187 | ||
188 | /** | 188 | /** |
189 | - * Set the list of leaves. | 189 | + * Sets the list of leaves. |
190 | * | 190 | * |
191 | * @param leafsList the list of leaf to set | 191 | * @param leafsList the list of leaf to set |
192 | */ | 192 | */ |
... | @@ -195,7 +195,7 @@ public class YangAugment extends YangNode | ... | @@ -195,7 +195,7 @@ public class YangAugment extends YangNode |
195 | } | 195 | } |
196 | 196 | ||
197 | /** | 197 | /** |
198 | - * Add a leaf. | 198 | + * Adds a leaf. |
199 | * | 199 | * |
200 | * @param leaf the leaf to be added | 200 | * @param leaf the leaf to be added |
201 | */ | 201 | */ |
... | @@ -209,7 +209,7 @@ public class YangAugment extends YangNode | ... | @@ -209,7 +209,7 @@ public class YangAugment extends YangNode |
209 | } | 209 | } |
210 | 210 | ||
211 | /** | 211 | /** |
212 | - * Get the list of leaf-list. | 212 | + * Returns the list of leaf-list. |
213 | * | 213 | * |
214 | * @return the list of leaf-list | 214 | * @return the list of leaf-list |
215 | */ | 215 | */ |
... | @@ -219,7 +219,7 @@ public class YangAugment extends YangNode | ... | @@ -219,7 +219,7 @@ public class YangAugment extends YangNode |
219 | } | 219 | } |
220 | 220 | ||
221 | /** | 221 | /** |
222 | - * Set the list of leaf-list. | 222 | + * Sets the list of leaf-list. |
223 | * | 223 | * |
224 | * @param listOfLeafList the list of leaf-list to set | 224 | * @param listOfLeafList the list of leaf-list to set |
225 | */ | 225 | */ |
... | @@ -228,7 +228,7 @@ public class YangAugment extends YangNode | ... | @@ -228,7 +228,7 @@ public class YangAugment extends YangNode |
228 | } | 228 | } |
229 | 229 | ||
230 | /** | 230 | /** |
231 | - * Add a leaf-list. | 231 | + * Adds a leaf-list. |
232 | * | 232 | * |
233 | * @param leafList the leaf-list to be added | 233 | * @param leafList the leaf-list to be added |
234 | */ | 234 | */ |
... | @@ -242,7 +242,7 @@ public class YangAugment extends YangNode | ... | @@ -242,7 +242,7 @@ public class YangAugment extends YangNode |
242 | } | 242 | } |
243 | 243 | ||
244 | /** | 244 | /** |
245 | - * Get the textual reference. | 245 | + * Returns the textual reference. |
246 | * | 246 | * |
247 | * @return the reference | 247 | * @return the reference |
248 | */ | 248 | */ |
... | @@ -252,7 +252,7 @@ public class YangAugment extends YangNode | ... | @@ -252,7 +252,7 @@ public class YangAugment extends YangNode |
252 | } | 252 | } |
253 | 253 | ||
254 | /** | 254 | /** |
255 | - * Set the textual reference. | 255 | + * Sets the textual reference. |
256 | * | 256 | * |
257 | * @param reference the reference to set | 257 | * @param reference the reference to set |
258 | */ | 258 | */ |
... | @@ -262,7 +262,7 @@ public class YangAugment extends YangNode | ... | @@ -262,7 +262,7 @@ public class YangAugment extends YangNode |
262 | } | 262 | } |
263 | 263 | ||
264 | /** | 264 | /** |
265 | - * Get the status. | 265 | + * Returns the status. |
266 | * | 266 | * |
267 | * @return the status | 267 | * @return the status |
268 | */ | 268 | */ |
... | @@ -272,7 +272,7 @@ public class YangAugment extends YangNode | ... | @@ -272,7 +272,7 @@ public class YangAugment extends YangNode |
272 | } | 272 | } |
273 | 273 | ||
274 | /** | 274 | /** |
275 | - * Set the status. | 275 | + * Sets the status. |
276 | * | 276 | * |
277 | * @param status the status to set | 277 | * @param status the status to set |
278 | */ | 278 | */ |
... | @@ -292,7 +292,7 @@ public class YangAugment extends YangNode | ... | @@ -292,7 +292,7 @@ public class YangAugment extends YangNode |
292 | } | 292 | } |
293 | 293 | ||
294 | /** | 294 | /** |
295 | - * Validate the data on entering the corresponding parse tree node. | 295 | + * Validates the data on entering the corresponding parse tree node. |
296 | * | 296 | * |
297 | * @throws DataModelException a violation of data model rules | 297 | * @throws DataModelException a violation of data model rules |
298 | */ | 298 | */ |
... | @@ -302,7 +302,7 @@ public class YangAugment extends YangNode | ... | @@ -302,7 +302,7 @@ public class YangAugment extends YangNode |
302 | } | 302 | } |
303 | 303 | ||
304 | /** | 304 | /** |
305 | - * Validate the data on exiting the corresponding parse tree node. | 305 | + * Validates the data on exiting the corresponding parse tree node. |
306 | * | 306 | * |
307 | * @throws DataModelException a violation of data model rules | 307 | * @throws DataModelException a violation of data model rules |
308 | */ | 308 | */ |
... | @@ -312,7 +312,7 @@ public class YangAugment extends YangNode | ... | @@ -312,7 +312,7 @@ public class YangAugment extends YangNode |
312 | } | 312 | } |
313 | 313 | ||
314 | /** | 314 | /** |
315 | - * Get the target nodes name where the augmentation is being done. | 315 | + * Returns the target nodes name where the augmentation is being done. |
316 | * | 316 | * |
317 | * @return target nodes name where the augmentation is being done | 317 | * @return target nodes name where the augmentation is being done |
318 | */ | 318 | */ |
... | @@ -322,14 +322,13 @@ public class YangAugment extends YangNode | ... | @@ -322,14 +322,13 @@ public class YangAugment extends YangNode |
322 | } | 322 | } |
323 | 323 | ||
324 | /** | 324 | /** |
325 | - * Set the target nodes name where the augmentation is being done. | 325 | + * Sets the target nodes name where the augmentation is being done. |
326 | * | 326 | * |
327 | * @param name target nodes name where the augmentation is being done | 327 | * @param name target nodes name where the augmentation is being done |
328 | */ | 328 | */ |
329 | @Override | 329 | @Override |
330 | public void setName(String name) { | 330 | public void setName(String name) { |
331 | this.name = name; | 331 | this.name = name; |
332 | - | ||
333 | } | 332 | } |
334 | 333 | ||
335 | } | 334 | } | ... | ... |
... | @@ -44,7 +44,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -44,7 +44,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
44 | */ | 44 | */ |
45 | 45 | ||
46 | /** | 46 | /** |
47 | - * Maintains the belongs-to data type information. | 47 | + * Represents the belongs-to data type information. |
48 | */ | 48 | */ |
49 | public class YangBelongsTo implements Parsable { | 49 | public class YangBelongsTo implements Parsable { |
50 | 50 | ||
... | @@ -73,7 +73,7 @@ public class YangBelongsTo implements Parsable { | ... | @@ -73,7 +73,7 @@ public class YangBelongsTo implements Parsable { |
73 | } | 73 | } |
74 | 74 | ||
75 | /** | 75 | /** |
76 | - * Get the belongs to module name. | 76 | + * Returns the belongs to module name. |
77 | * | 77 | * |
78 | * @return the belongs to module name | 78 | * @return the belongs to module name |
79 | */ | 79 | */ |
... | @@ -82,7 +82,7 @@ public class YangBelongsTo implements Parsable { | ... | @@ -82,7 +82,7 @@ public class YangBelongsTo implements Parsable { |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | - * Set the belongs to module name. | 85 | + * Sets the belongs to module name. |
86 | * | 86 | * |
87 | * @param belongsToModuleName the belongs to module name to set | 87 | * @param belongsToModuleName the belongs to module name to set |
88 | * | 88 | * |
... | @@ -92,7 +92,7 @@ public class YangBelongsTo implements Parsable { | ... | @@ -92,7 +92,7 @@ public class YangBelongsTo implements Parsable { |
92 | } | 92 | } |
93 | 93 | ||
94 | /** | 94 | /** |
95 | - * Get the prefix. | 95 | + * Returns the prefix. |
96 | * | 96 | * |
97 | * @return the prefix | 97 | * @return the prefix |
98 | */ | 98 | */ |
... | @@ -101,7 +101,7 @@ public class YangBelongsTo implements Parsable { | ... | @@ -101,7 +101,7 @@ public class YangBelongsTo implements Parsable { |
101 | } | 101 | } |
102 | 102 | ||
103 | /** | 103 | /** |
104 | - * Set the prefix. | 104 | + * Sets the prefix. |
105 | * | 105 | * |
106 | * @param prefix the prefix to set | 106 | * @param prefix the prefix to set |
107 | */ | 107 | */ |
... | @@ -120,7 +120,7 @@ public class YangBelongsTo implements Parsable { | ... | @@ -120,7 +120,7 @@ public class YangBelongsTo implements Parsable { |
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** |
123 | - * Validate the data on entering the corresponding parse tree node. | 123 | + * Validates the data on entering the corresponding parse tree node. |
124 | * | 124 | * |
125 | * @throws DataModelException a violation of data model rules | 125 | * @throws DataModelException a violation of data model rules |
126 | */ | 126 | */ |
... | @@ -130,7 +130,7 @@ public class YangBelongsTo implements Parsable { | ... | @@ -130,7 +130,7 @@ public class YangBelongsTo implements Parsable { |
130 | } | 130 | } |
131 | 131 | ||
132 | /** | 132 | /** |
133 | - * Validate the data on exiting the corresponding parse tree node. | 133 | + * Validates the data on exiting the corresponding parse tree node. |
134 | * | 134 | * |
135 | * @throws DataModelException a violation of data model rules | 135 | * @throws DataModelException a violation of data model rules |
136 | */ | 136 | */ | ... | ... |
... | @@ -16,12 +16,12 @@ | ... | @@ -16,12 +16,12 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | +import java.util.Objects; | ||
20 | + | ||
19 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
20 | import org.onosproject.yangutils.parser.Parsable; | 22 | import org.onosproject.yangutils.parser.Parsable; |
21 | import org.onosproject.yangutils.utils.YangConstructType; | 23 | import org.onosproject.yangutils.utils.YangConstructType; |
22 | 24 | ||
23 | -import java.util.Objects; | ||
24 | - | ||
25 | /*- | 25 | /*- |
26 | * The "bit" statement, which is a sub-statement to the "type" statement, | 26 | * The "bit" statement, which is a sub-statement to the "type" statement, |
27 | * MUST be present if the type is "bits". It is repeatedly used to | 27 | * MUST be present if the type is "bits". It is repeatedly used to |
... | @@ -44,7 +44,7 @@ import java.util.Objects; | ... | @@ -44,7 +44,7 @@ import java.util.Objects; |
44 | */ | 44 | */ |
45 | 45 | ||
46 | /** | 46 | /** |
47 | - * Maintains the bit data type information. | 47 | + * Represents the bit data type information. |
48 | */ | 48 | */ |
49 | public class YangBit implements YangCommonInfo, Parsable { | 49 | public class YangBit implements YangCommonInfo, Parsable { |
50 | 50 | ||
... | @@ -90,7 +90,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -90,7 +90,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
90 | } | 90 | } |
91 | 91 | ||
92 | /** | 92 | /** |
93 | - * Set the bit name. | 93 | + * Sets the bit name. |
94 | * | 94 | * |
95 | * @param bitName the bit name to set | 95 | * @param bitName the bit name to set |
96 | */ | 96 | */ |
... | @@ -109,7 +109,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -109,7 +109,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
109 | } | 109 | } |
110 | 110 | ||
111 | /** | 111 | /** |
112 | - * Set the description. | 112 | + * Sets the description. |
113 | * | 113 | * |
114 | * @param description set the description | 114 | * @param description set the description |
115 | */ | 115 | */ |
... | @@ -129,7 +129,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -129,7 +129,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
129 | } | 129 | } |
130 | 130 | ||
131 | /** | 131 | /** |
132 | - * Set the textual reference. | 132 | + * Sets the textual reference. |
133 | * | 133 | * |
134 | * @param reference the reference to set | 134 | * @param reference the reference to set |
135 | */ | 135 | */ |
... | @@ -149,7 +149,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -149,7 +149,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
149 | } | 149 | } |
150 | 150 | ||
151 | /** | 151 | /** |
152 | - * Set the status. | 152 | + * Sets the status. |
153 | * | 153 | * |
154 | * @param status the status to set | 154 | * @param status the status to set |
155 | */ | 155 | */ |
... | @@ -168,7 +168,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -168,7 +168,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
171 | - * Set the bit position. | 171 | + * Sets the bit position. |
172 | * | 172 | * |
173 | * @param position the position to set | 173 | * @param position the position to set |
174 | */ | 174 | */ |
... | @@ -188,6 +188,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -188,6 +188,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
188 | 188 | ||
189 | @Override | 189 | @Override |
190 | public boolean equals(Object obj) { | 190 | public boolean equals(Object obj) { |
191 | + | ||
191 | if (this == obj) { | 192 | if (this == obj) { |
192 | return true; | 193 | return true; |
193 | } | 194 | } |
... | @@ -204,7 +205,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -204,7 +205,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
204 | } | 205 | } |
205 | 206 | ||
206 | /** | 207 | /** |
207 | - * Validate the data on entering the corresponding parse tree node. | 208 | + * Validates the data on entering the corresponding parse tree node. |
208 | * | 209 | * |
209 | * @throws DataModelException a violation of data model rules | 210 | * @throws DataModelException a violation of data model rules |
210 | */ | 211 | */ |
... | @@ -214,7 +215,7 @@ public class YangBit implements YangCommonInfo, Parsable { | ... | @@ -214,7 +215,7 @@ public class YangBit implements YangCommonInfo, Parsable { |
214 | } | 215 | } |
215 | 216 | ||
216 | /** | 217 | /** |
217 | - * Validate the data on exiting the corresponding parse tree node. | 218 | + * Validates the data on exiting the corresponding parse tree node. |
218 | * | 219 | * |
219 | * @throws DataModelException a violation of data model rules | 220 | * @throws DataModelException a violation of data model rules |
220 | */ | 221 | */ | ... | ... |
... | @@ -32,7 +32,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -32,7 +32,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
32 | */ | 32 | */ |
33 | 33 | ||
34 | /** | 34 | /** |
35 | - * Maintains the bits data type information. | 35 | + * Represents the bits data type information. |
36 | */ | 36 | */ |
37 | public class YangBits implements Parsable { | 37 | public class YangBits implements Parsable { |
38 | 38 | ||
... | @@ -43,7 +43,7 @@ public class YangBits implements Parsable { | ... | @@ -43,7 +43,7 @@ public class YangBits implements Parsable { |
43 | private String bitsName; | 43 | private String bitsName; |
44 | 44 | ||
45 | /** | 45 | /** |
46 | - * Create a YANG bits type object. | 46 | + * Creates a YANG bits type object. |
47 | */ | 47 | */ |
48 | public YangBits() { | 48 | public YangBits() { |
49 | setBitSet(new HashSet<YangBit>()); | 49 | setBitSet(new HashSet<YangBit>()); |
... | @@ -59,7 +59,7 @@ public class YangBits implements Parsable { | ... | @@ -59,7 +59,7 @@ public class YangBits implements Parsable { |
59 | } | 59 | } |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Set the bit set. | 62 | + * Sets the bit set. |
63 | * | 63 | * |
64 | * @param bitSet the bit set | 64 | * @param bitSet the bit set |
65 | */ | 65 | */ |
... | @@ -68,7 +68,7 @@ public class YangBits implements Parsable { | ... | @@ -68,7 +68,7 @@ public class YangBits implements Parsable { |
68 | } | 68 | } |
69 | 69 | ||
70 | /** | 70 | /** |
71 | - * Add bit info. | 71 | + * Adds bit info. |
72 | * | 72 | * |
73 | * @param bitInfo the bit information to be added | 73 | * @param bitInfo the bit information to be added |
74 | * @throws DataModelException due to violation in data model rules | 74 | * @throws DataModelException due to violation in data model rules |
... | @@ -100,7 +100,7 @@ public class YangBits implements Parsable { | ... | @@ -100,7 +100,7 @@ public class YangBits implements Parsable { |
100 | } | 100 | } |
101 | 101 | ||
102 | /** | 102 | /** |
103 | - * Set bits name. | 103 | + * Sets bits name. |
104 | * | 104 | * |
105 | * @param bitsName bit name to be set | 105 | * @param bitsName bit name to be set |
106 | */ | 106 | */ |
... | @@ -109,7 +109,7 @@ public class YangBits implements Parsable { | ... | @@ -109,7 +109,7 @@ public class YangBits implements Parsable { |
109 | } | 109 | } |
110 | 110 | ||
111 | /** | 111 | /** |
112 | - * Validate the data on entering the corresponding parse tree node. | 112 | + * Validates the data on entering the corresponding parse tree node. |
113 | * | 113 | * |
114 | * @throws DataModelException a violation of data model rules | 114 | * @throws DataModelException a violation of data model rules |
115 | */ | 115 | */ |
... | @@ -119,7 +119,7 @@ public class YangBits implements Parsable { | ... | @@ -119,7 +119,7 @@ public class YangBits implements Parsable { |
119 | } | 119 | } |
120 | 120 | ||
121 | /** | 121 | /** |
122 | - * Validate the data on exiting the corresponding parse tree node. | 122 | + * Validates the data on exiting the corresponding parse tree node. |
123 | * | 123 | * |
124 | * @throws DataModelException a violation of data model rules | 124 | * @throws DataModelException a violation of data model rules |
125 | */ | 125 | */ | ... | ... |
... | @@ -89,7 +89,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.CASE_DATA; | ... | @@ -89,7 +89,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.CASE_DATA; |
89 | * +--------------+---------+-------------+------------------+ | 89 | * +--------------+---------+-------------+------------------+ |
90 | */ | 90 | */ |
91 | /** | 91 | /** |
92 | - * Data model node to maintain information defined in YANG case. | 92 | + * Represents data model node to maintain information defined in YANG case. |
93 | */ | 93 | */ |
94 | public class YangCase extends YangNode | 94 | public class YangCase extends YangNode |
95 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { | 95 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { |
... | @@ -127,14 +127,14 @@ public class YangCase extends YangNode | ... | @@ -127,14 +127,14 @@ public class YangCase extends YangNode |
127 | private YangStatusType status; | 127 | private YangStatusType status; |
128 | 128 | ||
129 | /** | 129 | /** |
130 | - * Create a choice node. | 130 | + * Creates a choice node. |
131 | */ | 131 | */ |
132 | public YangCase() { | 132 | public YangCase() { |
133 | super(YangNodeType.CASE_NODE); | 133 | super(YangNodeType.CASE_NODE); |
134 | } | 134 | } |
135 | 135 | ||
136 | /** | 136 | /** |
137 | - * Get the case name. | 137 | + * Returns the case name. |
138 | * | 138 | * |
139 | * @return case name | 139 | * @return case name |
140 | */ | 140 | */ |
... | @@ -144,7 +144,7 @@ public class YangCase extends YangNode | ... | @@ -144,7 +144,7 @@ public class YangCase extends YangNode |
144 | } | 144 | } |
145 | 145 | ||
146 | /** | 146 | /** |
147 | - * Set the case name. | 147 | + * Sets the case name. |
148 | * | 148 | * |
149 | * @param name case name | 149 | * @param name case name |
150 | */ | 150 | */ |
... | @@ -154,7 +154,7 @@ public class YangCase extends YangNode | ... | @@ -154,7 +154,7 @@ public class YangCase extends YangNode |
154 | } | 154 | } |
155 | 155 | ||
156 | /** | 156 | /** |
157 | - * Get the description. | 157 | + * Returns the description. |
158 | * | 158 | * |
159 | * @return the description | 159 | * @return the description |
160 | */ | 160 | */ |
... | @@ -164,7 +164,7 @@ public class YangCase extends YangNode | ... | @@ -164,7 +164,7 @@ public class YangCase extends YangNode |
164 | } | 164 | } |
165 | 165 | ||
166 | /** | 166 | /** |
167 | - * Set the description. | 167 | + * Sets the description. |
168 | * | 168 | * |
169 | * @param description set the description | 169 | * @param description set the description |
170 | */ | 170 | */ |
... | @@ -174,7 +174,7 @@ public class YangCase extends YangNode | ... | @@ -174,7 +174,7 @@ public class YangCase extends YangNode |
174 | } | 174 | } |
175 | 175 | ||
176 | /** | 176 | /** |
177 | - * Get the list of leaves. | 177 | + * Returns the list of leaves. |
178 | * | 178 | * |
179 | * @return the list of leaves | 179 | * @return the list of leaves |
180 | */ | 180 | */ |
... | @@ -184,7 +184,7 @@ public class YangCase extends YangNode | ... | @@ -184,7 +184,7 @@ public class YangCase extends YangNode |
184 | } | 184 | } |
185 | 185 | ||
186 | /** | 186 | /** |
187 | - * Set the list of leaves. | 187 | + * Sets the list of leaves. |
188 | * | 188 | * |
189 | * @param leafsList the list of leaf to set | 189 | * @param leafsList the list of leaf to set |
190 | */ | 190 | */ |
... | @@ -193,7 +193,7 @@ public class YangCase extends YangNode | ... | @@ -193,7 +193,7 @@ public class YangCase extends YangNode |
193 | } | 193 | } |
194 | 194 | ||
195 | /** | 195 | /** |
196 | - * Add a leaf. | 196 | + * Adds a leaf. |
197 | * | 197 | * |
198 | * @param leaf the leaf to be added | 198 | * @param leaf the leaf to be added |
199 | */ | 199 | */ |
... | @@ -207,7 +207,7 @@ public class YangCase extends YangNode | ... | @@ -207,7 +207,7 @@ public class YangCase extends YangNode |
207 | } | 207 | } |
208 | 208 | ||
209 | /** | 209 | /** |
210 | - * Get the list of leaf-list. | 210 | + * Returns the list of leaf-list. |
211 | * | 211 | * |
212 | * @return the list of leaf-list | 212 | * @return the list of leaf-list |
213 | */ | 213 | */ |
... | @@ -217,7 +217,7 @@ public class YangCase extends YangNode | ... | @@ -217,7 +217,7 @@ public class YangCase extends YangNode |
217 | } | 217 | } |
218 | 218 | ||
219 | /** | 219 | /** |
220 | - * Set the list of leaf-list. | 220 | + * Sets the list of leaf-list. |
221 | * | 221 | * |
222 | * @param listOfLeafList the list of leaf-list to set | 222 | * @param listOfLeafList the list of leaf-list to set |
223 | */ | 223 | */ |
... | @@ -226,7 +226,7 @@ public class YangCase extends YangNode | ... | @@ -226,7 +226,7 @@ public class YangCase extends YangNode |
226 | } | 226 | } |
227 | 227 | ||
228 | /** | 228 | /** |
229 | - * Add a leaf-list. | 229 | + * Adds a leaf-list. |
230 | * | 230 | * |
231 | * @param leafList the leaf-list to be added | 231 | * @param leafList the leaf-list to be added |
232 | */ | 232 | */ |
... | @@ -240,7 +240,7 @@ public class YangCase extends YangNode | ... | @@ -240,7 +240,7 @@ public class YangCase extends YangNode |
240 | } | 240 | } |
241 | 241 | ||
242 | /** | 242 | /** |
243 | - * Get the textual reference. | 243 | + * Returns the textual reference. |
244 | * | 244 | * |
245 | * @return the reference | 245 | * @return the reference |
246 | */ | 246 | */ |
... | @@ -250,7 +250,7 @@ public class YangCase extends YangNode | ... | @@ -250,7 +250,7 @@ public class YangCase extends YangNode |
250 | } | 250 | } |
251 | 251 | ||
252 | /** | 252 | /** |
253 | - * Set the textual reference. | 253 | + * Sets the textual reference. |
254 | * | 254 | * |
255 | * @param reference the reference to set | 255 | * @param reference the reference to set |
256 | */ | 256 | */ |
... | @@ -260,7 +260,7 @@ public class YangCase extends YangNode | ... | @@ -260,7 +260,7 @@ public class YangCase extends YangNode |
260 | } | 260 | } |
261 | 261 | ||
262 | /** | 262 | /** |
263 | - * Get the status. | 263 | + * Returns the status. |
264 | * | 264 | * |
265 | * @return the status | 265 | * @return the status |
266 | */ | 266 | */ |
... | @@ -270,7 +270,7 @@ public class YangCase extends YangNode | ... | @@ -270,7 +270,7 @@ public class YangCase extends YangNode |
270 | } | 270 | } |
271 | 271 | ||
272 | /** | 272 | /** |
273 | - * Set the status. | 273 | + * Sets the status. |
274 | * | 274 | * |
275 | * @param status the status to set | 275 | * @param status the status to set |
276 | */ | 276 | */ |
... | @@ -290,7 +290,7 @@ public class YangCase extends YangNode | ... | @@ -290,7 +290,7 @@ public class YangCase extends YangNode |
290 | } | 290 | } |
291 | 291 | ||
292 | /** | 292 | /** |
293 | - * Validate the data on entering the corresponding parse tree node. | 293 | + * Validates the data on entering the corresponding parse tree node. |
294 | * | 294 | * |
295 | * @throws DataModelException a violation of data model rules | 295 | * @throws DataModelException a violation of data model rules |
296 | */ | 296 | */ |
... | @@ -300,7 +300,7 @@ public class YangCase extends YangNode | ... | @@ -300,7 +300,7 @@ public class YangCase extends YangNode |
300 | } | 300 | } |
301 | 301 | ||
302 | /** | 302 | /** |
303 | - * Validate the data on exiting the corresponding parse tree node. | 303 | + * Validates the data on exiting the corresponding parse tree node. |
304 | * | 304 | * |
305 | * @throws DataModelException a violation of data model rules | 305 | * @throws DataModelException a violation of data model rules |
306 | */ | 306 | */ | ... | ... |
... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.CHOICE_DATA; | ... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.CHOICE_DATA; |
57 | * +--------------+---------+-------------+------------------+ | 57 | * +--------------+---------+-------------+------------------+ |
58 | */ | 58 | */ |
59 | /** | 59 | /** |
60 | - * Data model node to maintain information defined in YANG choice. | 60 | + * Represents data model node to maintain information defined in YANG choice. |
61 | */ | 61 | */ |
62 | public class YangChoice extends YangNode implements YangCommonInfo, Parsable, CollisionDetector { | 62 | public class YangChoice extends YangNode implements YangCommonInfo, Parsable, CollisionDetector { |
63 | 63 | ||
... | @@ -141,7 +141,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -141,7 +141,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
141 | } | 141 | } |
142 | 142 | ||
143 | /** | 143 | /** |
144 | - * Get the choice name. | 144 | + * Returns the choice name. |
145 | * | 145 | * |
146 | * @return choice name | 146 | * @return choice name |
147 | */ | 147 | */ |
... | @@ -151,7 +151,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -151,7 +151,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
151 | } | 151 | } |
152 | 152 | ||
153 | /** | 153 | /** |
154 | - * Set the choice name. | 154 | + * Sets the choice name. |
155 | * | 155 | * |
156 | * @param name choice name | 156 | * @param name choice name |
157 | */ | 157 | */ |
... | @@ -161,7 +161,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -161,7 +161,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
161 | } | 161 | } |
162 | 162 | ||
163 | /** | 163 | /** |
164 | - * Get config flag. | 164 | + * Returns config flag. |
165 | * | 165 | * |
166 | * @return the config flag | 166 | * @return the config flag |
167 | */ | 167 | */ |
... | @@ -170,7 +170,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -170,7 +170,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
170 | } | 170 | } |
171 | 171 | ||
172 | /** | 172 | /** |
173 | - * Set config flag. | 173 | + * Sets config flag. |
174 | * | 174 | * |
175 | * @param isCfg the config flag | 175 | * @param isCfg the config flag |
176 | */ | 176 | */ |
... | @@ -179,7 +179,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -179,7 +179,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
179 | } | 179 | } |
180 | 180 | ||
181 | /** | 181 | /** |
182 | - * Get the default case. | 182 | + * Returns the default case. |
183 | * | 183 | * |
184 | * @return the default case | 184 | * @return the default case |
185 | */ | 185 | */ |
... | @@ -188,7 +188,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -188,7 +188,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
188 | } | 188 | } |
189 | 189 | ||
190 | /** | 190 | /** |
191 | - * Set the default case. | 191 | + * Sets the default case. |
192 | * | 192 | * |
193 | * @param defaultCase the default case to set | 193 | * @param defaultCase the default case to set |
194 | */ | 194 | */ |
... | @@ -197,7 +197,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -197,7 +197,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
197 | } | 197 | } |
198 | 198 | ||
199 | /** | 199 | /** |
200 | - * Get the mandatory status. | 200 | + * Returns the mandatory status. |
201 | * | 201 | * |
202 | * @return the mandatory status | 202 | * @return the mandatory status |
203 | */ | 203 | */ |
... | @@ -206,7 +206,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -206,7 +206,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
206 | } | 206 | } |
207 | 207 | ||
208 | /** | 208 | /** |
209 | - * Set the mandatory status. | 209 | + * Sets the mandatory status. |
210 | * | 210 | * |
211 | * @param mandatory the mandatory status | 211 | * @param mandatory the mandatory status |
212 | */ | 212 | */ |
... | @@ -215,7 +215,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -215,7 +215,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
215 | } | 215 | } |
216 | 216 | ||
217 | /** | 217 | /** |
218 | - * Get the description. | 218 | + * Returns the description. |
219 | * | 219 | * |
220 | * @return the description | 220 | * @return the description |
221 | */ | 221 | */ |
... | @@ -225,7 +225,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -225,7 +225,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
225 | } | 225 | } |
226 | 226 | ||
227 | /** | 227 | /** |
228 | - * Set the description. | 228 | + * Sets the description. |
229 | * | 229 | * |
230 | * @param description set the description | 230 | * @param description set the description |
231 | */ | 231 | */ |
... | @@ -235,7 +235,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -235,7 +235,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
235 | } | 235 | } |
236 | 236 | ||
237 | /** | 237 | /** |
238 | - * Get the textual reference. | 238 | + * Returns the textual reference. |
239 | * | 239 | * |
240 | * @return the reference | 240 | * @return the reference |
241 | */ | 241 | */ |
... | @@ -245,7 +245,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -245,7 +245,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
245 | } | 245 | } |
246 | 246 | ||
247 | /** | 247 | /** |
248 | - * Set the textual reference. | 248 | + * Sets the textual reference. |
249 | * | 249 | * |
250 | * @param reference the reference to set | 250 | * @param reference the reference to set |
251 | */ | 251 | */ |
... | @@ -255,7 +255,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -255,7 +255,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
255 | } | 255 | } |
256 | 256 | ||
257 | /** | 257 | /** |
258 | - * Get the status. | 258 | + * Returns the status. |
259 | * | 259 | * |
260 | * @return the status | 260 | * @return the status |
261 | */ | 261 | */ |
... | @@ -265,7 +265,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -265,7 +265,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
265 | } | 265 | } |
266 | 266 | ||
267 | /** | 267 | /** |
268 | - * Set the status. | 268 | + * Sets the status. |
269 | * | 269 | * |
270 | * @param status the status to set | 270 | * @param status the status to set |
271 | */ | 271 | */ |
... | @@ -285,7 +285,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -285,7 +285,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
285 | } | 285 | } |
286 | 286 | ||
287 | /** | 287 | /** |
288 | - * Validate the data on entering the corresponding parse tree node. | 288 | + * Validates the data on entering the corresponding parse tree node. |
289 | * | 289 | * |
290 | * @throws DataModelException a violation of data model rules | 290 | * @throws DataModelException a violation of data model rules |
291 | */ | 291 | */ |
... | @@ -295,7 +295,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co | ... | @@ -295,7 +295,7 @@ public class YangChoice extends YangNode implements YangCommonInfo, Parsable, Co |
295 | } | 295 | } |
296 | 296 | ||
297 | /** | 297 | /** |
298 | - * Validate the data on exiting the corresponding parse tree node. | 298 | + * Validates the data on exiting the corresponding parse tree node. |
299 | * | 299 | * |
300 | * @throws DataModelException a violation of data model rules | 300 | * @throws DataModelException a violation of data model rules |
301 | */ | 301 | */ | ... | ... |
... | @@ -85,7 +85,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -85,7 +85,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
85 | */ | 85 | */ |
86 | 86 | ||
87 | /** | 87 | /** |
88 | - * Data model node to maintain information defined in YANG container. | 88 | + * Represents data model node to maintain information defined in YANG container. |
89 | */ | 89 | */ |
90 | public class YangContainer extends YangNode implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { | 90 | public class YangContainer extends YangNode implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { |
91 | 91 | ||
... | @@ -138,7 +138,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -138,7 +138,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
138 | } | 138 | } |
139 | 139 | ||
140 | /** | 140 | /** |
141 | - * Get the YANG name of container. | 141 | + * Returns the YANG name of container. |
142 | * | 142 | * |
143 | * @return the name of container as defined in YANG file | 143 | * @return the name of container as defined in YANG file |
144 | */ | 144 | */ |
... | @@ -148,7 +148,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -148,7 +148,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
148 | } | 148 | } |
149 | 149 | ||
150 | /** | 150 | /** |
151 | - * Set the YANG name of container. | 151 | + * Sets the YANG name of container. |
152 | * | 152 | * |
153 | * @param name the name of container as defined in YANG file | 153 | * @param name the name of container as defined in YANG file |
154 | */ | 154 | */ |
... | @@ -158,7 +158,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -158,7 +158,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
158 | } | 158 | } |
159 | 159 | ||
160 | /** | 160 | /** |
161 | - * Get the config flag. | 161 | + * Returns the config flag. |
162 | * | 162 | * |
163 | * @return the isConfig | 163 | * @return the isConfig |
164 | */ | 164 | */ |
... | @@ -167,7 +167,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -167,7 +167,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
167 | } | 167 | } |
168 | 168 | ||
169 | /** | 169 | /** |
170 | - * Set the config flag. | 170 | + * Sets the config flag. |
171 | * | 171 | * |
172 | * @param isCfg the config flag | 172 | * @param isCfg the config flag |
173 | */ | 173 | */ |
... | @@ -176,7 +176,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -176,7 +176,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
176 | } | 176 | } |
177 | 177 | ||
178 | /** | 178 | /** |
179 | - * Get the description. | 179 | + * Returns the description. |
180 | * | 180 | * |
181 | * @return the description | 181 | * @return the description |
182 | */ | 182 | */ |
... | @@ -186,7 +186,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -186,7 +186,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
186 | } | 186 | } |
187 | 187 | ||
188 | /** | 188 | /** |
189 | - * Set the description. | 189 | + * Sets the description. |
190 | * | 190 | * |
191 | * @param description set the description | 191 | * @param description set the description |
192 | */ | 192 | */ |
... | @@ -196,7 +196,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -196,7 +196,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
196 | } | 196 | } |
197 | 197 | ||
198 | /** | 198 | /** |
199 | - * Get the list of leaves. | 199 | + * Returns the list of leaves. |
200 | * | 200 | * |
201 | * @return the list of leaves | 201 | * @return the list of leaves |
202 | */ | 202 | */ |
... | @@ -206,7 +206,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -206,7 +206,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
206 | } | 206 | } |
207 | 207 | ||
208 | /** | 208 | /** |
209 | - * Set the list of leaves. | 209 | + * Sets the list of leaves. |
210 | * | 210 | * |
211 | * @param leafsList the list of leaf to set | 211 | * @param leafsList the list of leaf to set |
212 | */ | 212 | */ |
... | @@ -215,12 +215,13 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -215,12 +215,13 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
215 | } | 215 | } |
216 | 216 | ||
217 | /** | 217 | /** |
218 | - * Add a leaf. | 218 | + * Adds a leaf. |
219 | * | 219 | * |
220 | * @param leaf the leaf to be added | 220 | * @param leaf the leaf to be added |
221 | */ | 221 | */ |
222 | @Override | 222 | @Override |
223 | public void addLeaf(YangLeaf leaf) { | 223 | public void addLeaf(YangLeaf leaf) { |
224 | + | ||
224 | if (getListOfLeaf() == null) { | 225 | if (getListOfLeaf() == null) { |
225 | setListOfLeaf(new LinkedList<YangLeaf>()); | 226 | setListOfLeaf(new LinkedList<YangLeaf>()); |
226 | } | 227 | } |
... | @@ -229,7 +230,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -229,7 +230,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
229 | } | 230 | } |
230 | 231 | ||
231 | /** | 232 | /** |
232 | - * Get the list of leaf-list. | 233 | + * Returns the list of leaf-list. |
233 | * | 234 | * |
234 | * @return the list of leaf-list | 235 | * @return the list of leaf-list |
235 | */ | 236 | */ |
... | @@ -239,7 +240,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -239,7 +240,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
239 | } | 240 | } |
240 | 241 | ||
241 | /** | 242 | /** |
242 | - * Set the list of leaf-list. | 243 | + * Sets the list of leaf-list. |
243 | * | 244 | * |
244 | * @param listOfLeafList the list of leaf-list to set | 245 | * @param listOfLeafList the list of leaf-list to set |
245 | */ | 246 | */ |
... | @@ -248,12 +249,13 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -248,12 +249,13 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
248 | } | 249 | } |
249 | 250 | ||
250 | /** | 251 | /** |
251 | - * Add a leaf-list. | 252 | + * Adds a leaf-list. |
252 | * | 253 | * |
253 | * @param leafList the leaf-list to be added | 254 | * @param leafList the leaf-list to be added |
254 | */ | 255 | */ |
255 | @Override | 256 | @Override |
256 | public void addLeafList(YangLeafList leafList) { | 257 | public void addLeafList(YangLeafList leafList) { |
258 | + | ||
257 | if (getListOfLeafList() == null) { | 259 | if (getListOfLeafList() == null) { |
258 | setListOfLeafList(new LinkedList<YangLeafList>()); | 260 | setListOfLeafList(new LinkedList<YangLeafList>()); |
259 | } | 261 | } |
... | @@ -262,7 +264,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -262,7 +264,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
262 | } | 264 | } |
263 | 265 | ||
264 | /** | 266 | /** |
265 | - * Get the presence string if present. | 267 | + * Returns the presence string if present. |
266 | * | 268 | * |
267 | * @return the presence | 269 | * @return the presence |
268 | */ | 270 | */ |
... | @@ -271,7 +273,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -271,7 +273,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
271 | } | 273 | } |
272 | 274 | ||
273 | /** | 275 | /** |
274 | - * Set the presence string. | 276 | + * Sets the presence string. |
275 | * | 277 | * |
276 | * @param presence the presence flag | 278 | * @param presence the presence flag |
277 | */ | 279 | */ |
... | @@ -280,7 +282,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -280,7 +282,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
280 | } | 282 | } |
281 | 283 | ||
282 | /** | 284 | /** |
283 | - * Get the textual reference. | 285 | + * Returns the textual reference. |
284 | * | 286 | * |
285 | * @return the reference | 287 | * @return the reference |
286 | */ | 288 | */ |
... | @@ -290,7 +292,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -290,7 +292,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
290 | } | 292 | } |
291 | 293 | ||
292 | /** | 294 | /** |
293 | - * Set the textual reference. | 295 | + * Sets the textual reference. |
294 | * | 296 | * |
295 | * @param reference the reference to set | 297 | * @param reference the reference to set |
296 | */ | 298 | */ |
... | @@ -300,7 +302,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -300,7 +302,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
300 | } | 302 | } |
301 | 303 | ||
302 | /** | 304 | /** |
303 | - * Get the status. | 305 | + * Returns the status. |
304 | * | 306 | * |
305 | * @return the status | 307 | * @return the status |
306 | */ | 308 | */ |
... | @@ -310,7 +312,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -310,7 +312,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
310 | } | 312 | } |
311 | 313 | ||
312 | /** | 314 | /** |
313 | - * Set the status. | 315 | + * Sets the status. |
314 | * | 316 | * |
315 | * @param status the status to set | 317 | * @param status the status to set |
316 | */ | 318 | */ |
... | @@ -330,7 +332,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -330,7 +332,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
330 | } | 332 | } |
331 | 333 | ||
332 | /** | 334 | /** |
333 | - * Validate the data on entering the corresponding parse tree node. | 335 | + * Validates the data on entering the corresponding parse tree node. |
334 | * | 336 | * |
335 | * @throws DataModelException a violation of data model rules | 337 | * @throws DataModelException a violation of data model rules |
336 | */ | 338 | */ |
... | @@ -340,7 +342,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom | ... | @@ -340,7 +342,7 @@ public class YangContainer extends YangNode implements YangLeavesHolder, YangCom |
340 | } | 342 | } |
341 | 343 | ||
342 | /** | 344 | /** |
343 | - * Validate the data on exiting the corresponding parse tree node. | 345 | + * Validates the data on exiting the corresponding parse tree node. |
344 | * | 346 | * |
345 | * @throws DataModelException a violation of data model rules | 347 | * @throws DataModelException a violation of data model rules |
346 | */ | 348 | */ | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * ENUM to identify the YANG data type. | 20 | + * Represents ENUM to identify the YANG data type. |
21 | */ | 21 | */ |
22 | public enum YangDataTypes { | 22 | public enum YangDataTypes { |
23 | /** | 23 | /** | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Maintains the derived information. | 20 | + * Represents the derived information. |
21 | * | 21 | * |
22 | * @param <T> extended information. | 22 | * @param <T> extended information. |
23 | */ | 23 | */ |
... | @@ -52,7 +52,7 @@ public class YangDerivedInfo<T> { | ... | @@ -52,7 +52,7 @@ public class YangDerivedInfo<T> { |
52 | } | 52 | } |
53 | 53 | ||
54 | /** | 54 | /** |
55 | - * Set the referred typedef reference. | 55 | + * Sets the referred typedef reference. |
56 | * | 56 | * |
57 | * @param referredTypeDef referred typedef reference | 57 | * @param referredTypeDef referred typedef reference |
58 | */ | 58 | */ |
... | @@ -70,7 +70,7 @@ public class YangDerivedInfo<T> { | ... | @@ -70,7 +70,7 @@ public class YangDerivedInfo<T> { |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | - * Set resolved extended information after successful linking. | 73 | + * Sets resolved extended information after successful linking. |
74 | * | 74 | * |
75 | * @param resolvedExtendedInfo resolved extended information | 75 | * @param resolvedExtendedInfo resolved extended information |
76 | */ | 76 | */ |
... | @@ -88,7 +88,7 @@ public class YangDerivedInfo<T> { | ... | @@ -88,7 +88,7 @@ public class YangDerivedInfo<T> { |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
91 | - * Set extended information. | 91 | + * Sets extended information. |
92 | * | 92 | * |
93 | * @param extendedInfo extended information | 93 | * @param extendedInfo extended information |
94 | */ | 94 | */ | ... | ... |
... | @@ -21,8 +21,9 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -21,8 +21,9 @@ package org.onosproject.yangutils.datamodel; |
21 | * parsing and translator processing of description. | 21 | * parsing and translator processing of description. |
22 | */ | 22 | */ |
23 | public interface YangDesc { | 23 | public interface YangDesc { |
24 | + | ||
24 | /** | 25 | /** |
25 | - * Get the description of YANG entity. | 26 | + * Returns the description of YANG entity. |
26 | * | 27 | * |
27 | * @return the description of YANG entity. | 28 | * @return the description of YANG entity. |
28 | */ | 29 | */ | ... | ... |
... | @@ -16,12 +16,12 @@ | ... | @@ -16,12 +16,12 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | +import java.util.Objects; | ||
20 | + | ||
19 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
20 | import org.onosproject.yangutils.parser.Parsable; | 22 | import org.onosproject.yangutils.parser.Parsable; |
21 | import org.onosproject.yangutils.utils.YangConstructType; | 23 | import org.onosproject.yangutils.utils.YangConstructType; |
22 | 24 | ||
23 | -import java.util.Objects; | ||
24 | - | ||
25 | /*- | 25 | /*- |
26 | * The "ENUM" statement, which is a sub-statement to the "type" | 26 | * The "ENUM" statement, which is a sub-statement to the "type" |
27 | * statement, MUST be present if the type is "enumeration". It is | 27 | * statement, MUST be present if the type is "enumeration". It is |
... | @@ -48,7 +48,7 @@ import java.util.Objects; | ... | @@ -48,7 +48,7 @@ import java.util.Objects; |
48 | */ | 48 | */ |
49 | 49 | ||
50 | /** | 50 | /** |
51 | - * Maintains the ENUM data type information. | 51 | + * Represents the ENUM data type information. |
52 | */ | 52 | */ |
53 | public class YangEnum implements YangCommonInfo, Parsable { | 53 | public class YangEnum implements YangCommonInfo, Parsable { |
54 | 54 | ||
... | @@ -85,7 +85,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -85,7 +85,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
85 | } | 85 | } |
86 | 86 | ||
87 | /** | 87 | /** |
88 | - * Get the named value. | 88 | + * Returns the named value. |
89 | * | 89 | * |
90 | * @return the named value | 90 | * @return the named value |
91 | */ | 91 | */ |
... | @@ -94,7 +94,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -94,7 +94,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
94 | } | 94 | } |
95 | 95 | ||
96 | /** | 96 | /** |
97 | - * Set the named value. | 97 | + * Sets the named value. |
98 | * | 98 | * |
99 | * @param namedValue the named value to set | 99 | * @param namedValue the named value to set |
100 | */ | 100 | */ |
... | @@ -103,7 +103,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -103,7 +103,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | - * Get the description. | 106 | + * Returns the description. |
107 | * | 107 | * |
108 | * @return the description | 108 | * @return the description |
109 | */ | 109 | */ |
... | @@ -113,7 +113,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -113,7 +113,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
113 | } | 113 | } |
114 | 114 | ||
115 | /** | 115 | /** |
116 | - * Set the description. | 116 | + * Sets the description. |
117 | * | 117 | * |
118 | * @param description set the description | 118 | * @param description set the description |
119 | */ | 119 | */ |
... | @@ -123,7 +123,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -123,7 +123,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
123 | } | 123 | } |
124 | 124 | ||
125 | /** | 125 | /** |
126 | - * Get the textual reference. | 126 | + * Returns the textual reference. |
127 | * | 127 | * |
128 | * @return the reference | 128 | * @return the reference |
129 | */ | 129 | */ |
... | @@ -133,7 +133,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -133,7 +133,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
133 | } | 133 | } |
134 | 134 | ||
135 | /** | 135 | /** |
136 | - * Set the textual reference. | 136 | + * Sets the textual reference. |
137 | * | 137 | * |
138 | * @param reference the reference to set | 138 | * @param reference the reference to set |
139 | */ | 139 | */ |
... | @@ -143,7 +143,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -143,7 +143,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
143 | } | 143 | } |
144 | 144 | ||
145 | /** | 145 | /** |
146 | - * Get the status. | 146 | + * Returns the status. |
147 | * | 147 | * |
148 | * @return the status | 148 | * @return the status |
149 | */ | 149 | */ |
... | @@ -153,7 +153,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -153,7 +153,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
153 | } | 153 | } |
154 | 154 | ||
155 | /** | 155 | /** |
156 | - * Set the status. | 156 | + * Sets the status. |
157 | * | 157 | * |
158 | * @param status the status to set | 158 | * @param status the status to set |
159 | */ | 159 | */ |
... | @@ -163,7 +163,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -163,7 +163,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
163 | } | 163 | } |
164 | 164 | ||
165 | /** | 165 | /** |
166 | - * Get the value. | 166 | + * Returns the value. |
167 | * | 167 | * |
168 | * @return the value | 168 | * @return the value |
169 | */ | 169 | */ |
... | @@ -172,7 +172,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -172,7 +172,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
172 | } | 172 | } |
173 | 173 | ||
174 | /** | 174 | /** |
175 | - * Set the value. | 175 | + * Sets the value. |
176 | * | 176 | * |
177 | * @param value the value to set | 177 | * @param value the value to set |
178 | */ | 178 | */ |
... | @@ -208,7 +208,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -208,7 +208,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
208 | } | 208 | } |
209 | 209 | ||
210 | /** | 210 | /** |
211 | - * Validate the data on entering the corresponding parse tree node. | 211 | + * Validates the data on entering the corresponding parse tree node. |
212 | * | 212 | * |
213 | * @throws DataModelException a violation of data model rules | 213 | * @throws DataModelException a violation of data model rules |
214 | */ | 214 | */ |
... | @@ -218,7 +218,7 @@ public class YangEnum implements YangCommonInfo, Parsable { | ... | @@ -218,7 +218,7 @@ public class YangEnum implements YangCommonInfo, Parsable { |
218 | } | 218 | } |
219 | 219 | ||
220 | /** | 220 | /** |
221 | - * Validate the data on exiting the corresponding parse tree node. | 221 | + * Validates the data on exiting the corresponding parse tree node. |
222 | * | 222 | * |
223 | * @throws DataModelException a violation of data model rules | 223 | * @throws DataModelException a violation of data model rules |
224 | */ | 224 | */ | ... | ... |
... | @@ -29,7 +29,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -29,7 +29,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
29 | */ | 29 | */ |
30 | 30 | ||
31 | /** | 31 | /** |
32 | - * Maintains the enumeration data type information. | 32 | + * Represents the enumeration data type information. |
33 | */ | 33 | */ |
34 | public class YangEnumeration implements Parsable { | 34 | public class YangEnumeration implements Parsable { |
35 | 35 | ||
... | @@ -47,7 +47,7 @@ public class YangEnumeration implements Parsable { | ... | @@ -47,7 +47,7 @@ public class YangEnumeration implements Parsable { |
47 | } | 47 | } |
48 | 48 | ||
49 | /** | 49 | /** |
50 | - * Get the ENUM set. | 50 | + * Returns the ENUM set. |
51 | * | 51 | * |
52 | * @return the ENUM set | 52 | * @return the ENUM set |
53 | */ | 53 | */ |
... | @@ -56,7 +56,7 @@ public class YangEnumeration implements Parsable { | ... | @@ -56,7 +56,7 @@ public class YangEnumeration implements Parsable { |
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | - * Set the ENUM set. | 59 | + * Sets the ENUM set. |
60 | * | 60 | * |
61 | * @param enumSet the ENUM set to set | 61 | * @param enumSet the ENUM set to set |
62 | */ | 62 | */ |
... | @@ -65,7 +65,7 @@ public class YangEnumeration implements Parsable { | ... | @@ -65,7 +65,7 @@ public class YangEnumeration implements Parsable { |
65 | } | 65 | } |
66 | 66 | ||
67 | /** | 67 | /** |
68 | - * Add ENUM information. | 68 | + * Adds ENUM information. |
69 | * | 69 | * |
70 | * @param enumInfo the ENUM information to be added | 70 | * @param enumInfo the ENUM information to be added |
71 | * @throws DataModelException due to violation in data model rules | 71 | * @throws DataModelException due to violation in data model rules |
... | @@ -86,7 +86,7 @@ public class YangEnumeration implements Parsable { | ... | @@ -86,7 +86,7 @@ public class YangEnumeration implements Parsable { |
86 | } | 86 | } |
87 | 87 | ||
88 | /** | 88 | /** |
89 | - * Set the enumeration name. | 89 | + * Sets the enumeration name. |
90 | * | 90 | * |
91 | * @param enumerationName enumeration name | 91 | * @param enumerationName enumeration name |
92 | */ | 92 | */ |
... | @@ -105,7 +105,7 @@ public class YangEnumeration implements Parsable { | ... | @@ -105,7 +105,7 @@ public class YangEnumeration implements Parsable { |
105 | } | 105 | } |
106 | 106 | ||
107 | /** | 107 | /** |
108 | - * Validate the data on entering the corresponding parse tree node. | 108 | + * Validates the data on entering the corresponding parse tree node. |
109 | * | 109 | * |
110 | * @throws DataModelException a violation of data model rules | 110 | * @throws DataModelException a violation of data model rules |
111 | */ | 111 | */ |
... | @@ -115,7 +115,7 @@ public class YangEnumeration implements Parsable { | ... | @@ -115,7 +115,7 @@ public class YangEnumeration implements Parsable { |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | - * Validate the data on exiting the corresponding parse tree node. | 118 | + * Validates the data on exiting the corresponding parse tree node. |
119 | * | 119 | * |
120 | * @throws DataModelException a violation of data model rules | 120 | * @throws DataModelException a violation of data model rules |
121 | */ | 121 | */ | ... | ... |
... | @@ -17,6 +17,7 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -17,6 +17,7 @@ package org.onosproject.yangutils.datamodel; |
17 | 17 | ||
18 | import java.util.LinkedList; | 18 | import java.util.LinkedList; |
19 | import java.util.List; | 19 | import java.util.List; |
20 | + | ||
20 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
21 | import org.onosproject.yangutils.parser.Parsable; | 22 | import org.onosproject.yangutils.parser.Parsable; |
22 | import org.onosproject.yangutils.utils.YangConstructType; | 23 | import org.onosproject.yangutils.utils.YangConstructType; |
... | @@ -74,7 +75,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -74,7 +75,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
74 | */ | 75 | */ |
75 | 76 | ||
76 | /** | 77 | /** |
77 | - * Data model node to maintain information defined in YANG grouping. | 78 | + * Represents data model node to maintain information defined in YANG grouping. |
78 | */ | 79 | */ |
79 | public class YangGrouping extends YangNode | 80 | public class YangGrouping extends YangNode |
80 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { | 81 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { |
... | @@ -119,7 +120,7 @@ public class YangGrouping extends YangNode | ... | @@ -119,7 +120,7 @@ public class YangGrouping extends YangNode |
119 | } | 120 | } |
120 | 121 | ||
121 | /** | 122 | /** |
122 | - * Get YANG grouping name. | 123 | + * Returns YANG grouping name. |
123 | * | 124 | * |
124 | * @return YANG grouping name | 125 | * @return YANG grouping name |
125 | */ | 126 | */ |
... | @@ -129,7 +130,7 @@ public class YangGrouping extends YangNode | ... | @@ -129,7 +130,7 @@ public class YangGrouping extends YangNode |
129 | } | 130 | } |
130 | 131 | ||
131 | /** | 132 | /** |
132 | - * Set YANG grouping name. | 133 | + * Sets YANG grouping name. |
133 | * | 134 | * |
134 | * @param name YANG grouping name | 135 | * @param name YANG grouping name |
135 | */ | 136 | */ |
... | @@ -139,7 +140,7 @@ public class YangGrouping extends YangNode | ... | @@ -139,7 +140,7 @@ public class YangGrouping extends YangNode |
139 | } | 140 | } |
140 | 141 | ||
141 | /** | 142 | /** |
142 | - * Get the description. | 143 | + * Returns the description. |
143 | * | 144 | * |
144 | * @return the description | 145 | * @return the description |
145 | */ | 146 | */ |
... | @@ -149,7 +150,7 @@ public class YangGrouping extends YangNode | ... | @@ -149,7 +150,7 @@ public class YangGrouping extends YangNode |
149 | } | 150 | } |
150 | 151 | ||
151 | /** | 152 | /** |
152 | - * Set the description. | 153 | + * Sets the description. |
153 | * | 154 | * |
154 | * @param description set the description | 155 | * @param description set the description |
155 | */ | 156 | */ |
... | @@ -159,7 +160,7 @@ public class YangGrouping extends YangNode | ... | @@ -159,7 +160,7 @@ public class YangGrouping extends YangNode |
159 | } | 160 | } |
160 | 161 | ||
161 | /** | 162 | /** |
162 | - * Get the list of leaves. | 163 | + * Returns the list of leaves. |
163 | * | 164 | * |
164 | * @return the list of leaves | 165 | * @return the list of leaves |
165 | */ | 166 | */ |
... | @@ -169,7 +170,7 @@ public class YangGrouping extends YangNode | ... | @@ -169,7 +170,7 @@ public class YangGrouping extends YangNode |
169 | } | 170 | } |
170 | 171 | ||
171 | /** | 172 | /** |
172 | - * Set the list of leaves. | 173 | + * Sets the list of leaves. |
173 | * | 174 | * |
174 | * @param leafsList the list of leaf to set | 175 | * @param leafsList the list of leaf to set |
175 | */ | 176 | */ |
... | @@ -178,7 +179,7 @@ public class YangGrouping extends YangNode | ... | @@ -178,7 +179,7 @@ public class YangGrouping extends YangNode |
178 | } | 179 | } |
179 | 180 | ||
180 | /** | 181 | /** |
181 | - * Add a leaf. | 182 | + * Adds a leaf. |
182 | * | 183 | * |
183 | * @param leaf the leaf to be added | 184 | * @param leaf the leaf to be added |
184 | */ | 185 | */ |
... | @@ -188,7 +189,7 @@ public class YangGrouping extends YangNode | ... | @@ -188,7 +189,7 @@ public class YangGrouping extends YangNode |
188 | } | 189 | } |
189 | 190 | ||
190 | /** | 191 | /** |
191 | - * Get the list of leaf-list. | 192 | + * Returns the list of leaf-list. |
192 | * | 193 | * |
193 | * @return the list of leaf-list | 194 | * @return the list of leaf-list |
194 | */ | 195 | */ |
... | @@ -198,7 +199,7 @@ public class YangGrouping extends YangNode | ... | @@ -198,7 +199,7 @@ public class YangGrouping extends YangNode |
198 | } | 199 | } |
199 | 200 | ||
200 | /** | 201 | /** |
201 | - * Set the list of leaf-list. | 202 | + * Sets the list of leaf-list. |
202 | * | 203 | * |
203 | * @param listOfLeafList the list of leaf-list to set | 204 | * @param listOfLeafList the list of leaf-list to set |
204 | */ | 205 | */ |
... | @@ -207,7 +208,7 @@ public class YangGrouping extends YangNode | ... | @@ -207,7 +208,7 @@ public class YangGrouping extends YangNode |
207 | } | 208 | } |
208 | 209 | ||
209 | /** | 210 | /** |
210 | - * Add a leaf-list. | 211 | + * Adds a leaf-list. |
211 | * | 212 | * |
212 | * @param leafList the leaf-list to be added | 213 | * @param leafList the leaf-list to be added |
213 | */ | 214 | */ |
... | @@ -217,7 +218,7 @@ public class YangGrouping extends YangNode | ... | @@ -217,7 +218,7 @@ public class YangGrouping extends YangNode |
217 | } | 218 | } |
218 | 219 | ||
219 | /** | 220 | /** |
220 | - * Get the textual reference. | 221 | + * Returns the textual reference. |
221 | * | 222 | * |
222 | * @return the reference | 223 | * @return the reference |
223 | */ | 224 | */ |
... | @@ -227,7 +228,7 @@ public class YangGrouping extends YangNode | ... | @@ -227,7 +228,7 @@ public class YangGrouping extends YangNode |
227 | } | 228 | } |
228 | 229 | ||
229 | /** | 230 | /** |
230 | - * Set the textual reference. | 231 | + * Sets the textual reference. |
231 | * | 232 | * |
232 | * @param reference the reference to set | 233 | * @param reference the reference to set |
233 | */ | 234 | */ |
... | @@ -237,7 +238,7 @@ public class YangGrouping extends YangNode | ... | @@ -237,7 +238,7 @@ public class YangGrouping extends YangNode |
237 | } | 238 | } |
238 | 239 | ||
239 | /** | 240 | /** |
240 | - * Get the status. | 241 | + * Returns the status. |
241 | * | 242 | * |
242 | * @return the status | 243 | * @return the status |
243 | */ | 244 | */ |
... | @@ -247,7 +248,7 @@ public class YangGrouping extends YangNode | ... | @@ -247,7 +248,7 @@ public class YangGrouping extends YangNode |
247 | } | 248 | } |
248 | 249 | ||
249 | /** | 250 | /** |
250 | - * Set the status. | 251 | + * Sets the status. |
251 | * | 252 | * |
252 | * @param status the status to set | 253 | * @param status the status to set |
253 | */ | 254 | */ |
... | @@ -267,7 +268,7 @@ public class YangGrouping extends YangNode | ... | @@ -267,7 +268,7 @@ public class YangGrouping extends YangNode |
267 | } | 268 | } |
268 | 269 | ||
269 | /** | 270 | /** |
270 | - * Validate the data on entering the corresponding parse tree node. | 271 | + * Validates the data on entering the corresponding parse tree node. |
271 | * | 272 | * |
272 | * @throws DataModelException a violation of data model rules | 273 | * @throws DataModelException a violation of data model rules |
273 | */ | 274 | */ |
... | @@ -277,7 +278,7 @@ public class YangGrouping extends YangNode | ... | @@ -277,7 +278,7 @@ public class YangGrouping extends YangNode |
277 | } | 278 | } |
278 | 279 | ||
279 | /** | 280 | /** |
280 | - * Validate the data on exiting the corresponding parse tree node. | 281 | + * Validates the data on exiting the corresponding parse tree node. |
281 | * | 282 | * |
282 | * @throws DataModelException a violation of data model rules | 283 | * @throws DataModelException a violation of data model rules |
283 | */ | 284 | */ |
... | @@ -299,7 +300,6 @@ public class YangGrouping extends YangNode | ... | @@ -299,7 +300,6 @@ public class YangGrouping extends YangNode |
299 | */ | 300 | */ |
300 | @Override | 301 | @Override |
301 | public void detectCollidingChild(String identifierName, YangConstructType dataType) throws DataModelException { | 302 | public void detectCollidingChild(String identifierName, YangConstructType dataType) throws DataModelException { |
302 | - | ||
303 | // Asks helper to detect colliding child. | 303 | // Asks helper to detect colliding child. |
304 | detectCollidingChildUtil(identifierName, dataType, this); | 304 | detectCollidingChildUtil(identifierName, dataType, this); |
305 | } | 305 | } | ... | ... |
... | @@ -60,7 +60,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -60,7 +60,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
60 | * +---------------+---------+-------------+------------------+ | 60 | * +---------------+---------+-------------+------------------+ |
61 | */ | 61 | */ |
62 | /** | 62 | /** |
63 | - * Maintains the information about the imported modules. | 63 | + * Represents the information about the imported modules. |
64 | */ | 64 | */ |
65 | public class YangImport implements Parsable { | 65 | public class YangImport implements Parsable { |
66 | 66 | ||
... | @@ -90,14 +90,14 @@ public class YangImport implements Parsable { | ... | @@ -90,14 +90,14 @@ public class YangImport implements Parsable { |
90 | private String revision; | 90 | private String revision; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | - * Default constructor. | 93 | + * Creates a YANG import. |
94 | */ | 94 | */ |
95 | public YangImport() { | 95 | public YangImport() { |
96 | 96 | ||
97 | } | 97 | } |
98 | 98 | ||
99 | /** | 99 | /** |
100 | - * Get the imported module name. | 100 | + * Returns the imported module name. |
101 | * | 101 | * |
102 | * @return the module name | 102 | * @return the module name |
103 | */ | 103 | */ |
... | @@ -106,7 +106,7 @@ public class YangImport implements Parsable { | ... | @@ -106,7 +106,7 @@ public class YangImport implements Parsable { |
106 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
109 | - * Set module name. | 109 | + * Sets module name. |
110 | * | 110 | * |
111 | * @param moduleName the module name to set | 111 | * @param moduleName the module name to set |
112 | */ | 112 | */ |
... | @@ -115,7 +115,7 @@ public class YangImport implements Parsable { | ... | @@ -115,7 +115,7 @@ public class YangImport implements Parsable { |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | - * Get the prefix used to identify the entities from the imported module. | 118 | + * Returns the prefix used to identify the entities from the imported module. |
119 | * | 119 | * |
120 | * @return the prefix used to identify the entities from the imported | 120 | * @return the prefix used to identify the entities from the imported |
121 | * module | 121 | * module |
... | @@ -125,7 +125,7 @@ public class YangImport implements Parsable { | ... | @@ -125,7 +125,7 @@ public class YangImport implements Parsable { |
125 | } | 125 | } |
126 | 126 | ||
127 | /** | 127 | /** |
128 | - * Set prefix identifier. | 128 | + * Sets prefix identifier. |
129 | * | 129 | * |
130 | * @param prefixId set the prefix identifier of the imported module | 130 | * @param prefixId set the prefix identifier of the imported module |
131 | */ | 131 | */ |
... | @@ -134,7 +134,7 @@ public class YangImport implements Parsable { | ... | @@ -134,7 +134,7 @@ public class YangImport implements Parsable { |
134 | } | 134 | } |
135 | 135 | ||
136 | /** | 136 | /** |
137 | - * Get the revision of the imported module. | 137 | + * Returns the revision of the imported module. |
138 | * | 138 | * |
139 | * @return the revision of the imported module | 139 | * @return the revision of the imported module |
140 | */ | 140 | */ |
... | @@ -143,7 +143,7 @@ public class YangImport implements Parsable { | ... | @@ -143,7 +143,7 @@ public class YangImport implements Parsable { |
143 | } | 143 | } |
144 | 144 | ||
145 | /** | 145 | /** |
146 | - * Set the revision of the imported module. | 146 | + * Sets the revision of the imported module. |
147 | * | 147 | * |
148 | * @param rev set the revision of the imported module | 148 | * @param rev set the revision of the imported module |
149 | */ | 149 | */ |
... | @@ -162,7 +162,7 @@ public class YangImport implements Parsable { | ... | @@ -162,7 +162,7 @@ public class YangImport implements Parsable { |
162 | } | 162 | } |
163 | 163 | ||
164 | /** | 164 | /** |
165 | - * Validate the data on entering the corresponding parse tree node. | 165 | + * Validates the data on entering the corresponding parse tree node. |
166 | * | 166 | * |
167 | * @throws DataModelException a violation of data model rules | 167 | * @throws DataModelException a violation of data model rules |
168 | */ | 168 | */ |
... | @@ -173,7 +173,7 @@ public class YangImport implements Parsable { | ... | @@ -173,7 +173,7 @@ public class YangImport implements Parsable { |
173 | } | 173 | } |
174 | 174 | ||
175 | /** | 175 | /** |
176 | - * Validate the data on exiting the corresponding parse tree node. | 176 | + * Validates the data on exiting the corresponding parse tree node. |
177 | * | 177 | * |
178 | * @throws DataModelException a violation of data model rules | 178 | * @throws DataModelException a violation of data model rules |
179 | */ | 179 | */ |
... | @@ -193,7 +193,7 @@ public class YangImport implements Parsable { | ... | @@ -193,7 +193,7 @@ public class YangImport implements Parsable { |
193 | } | 193 | } |
194 | 194 | ||
195 | /** | 195 | /** |
196 | - * Set the dresolution information node. | 196 | + * Sets the dresolution information node. |
197 | * | 197 | * |
198 | * @param resolutionInfoNode the resolution information node | 198 | * @param resolutionInfoNode the resolution information node |
199 | */ | 199 | */ | ... | ... |
... | @@ -34,8 +34,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -34,8 +34,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
34 | * +---------------+---------+-------------+------------------+ | 34 | * +---------------+---------+-------------+------------------+ |
35 | */ | 35 | */ |
36 | /** | 36 | /** |
37 | - * Maintains the information about the included sub-modules. | 37 | + * Represents the information about the included sub-modules. |
38 | - * | ||
39 | */ | 38 | */ |
40 | public class YangInclude implements Parsable { | 39 | public class YangInclude implements Parsable { |
41 | 40 | ||
... | @@ -56,13 +55,13 @@ public class YangInclude implements Parsable { | ... | @@ -56,13 +55,13 @@ public class YangInclude implements Parsable { |
56 | private HasResolutionInfo resolutionInfoNode; | 55 | private HasResolutionInfo resolutionInfoNode; |
57 | 56 | ||
58 | /** | 57 | /** |
59 | - * Default constructor. | 58 | + * Creates a YANG include. |
60 | */ | 59 | */ |
61 | public YangInclude() { | 60 | public YangInclude() { |
62 | } | 61 | } |
63 | 62 | ||
64 | /** | 63 | /** |
65 | - * Get the name of included sub-module. | 64 | + * Returns the name of included sub-module. |
66 | * | 65 | * |
67 | * @return the sub-module name | 66 | * @return the sub-module name |
68 | */ | 67 | */ |
... | @@ -71,7 +70,7 @@ public class YangInclude implements Parsable { | ... | @@ -71,7 +70,7 @@ public class YangInclude implements Parsable { |
71 | } | 70 | } |
72 | 71 | ||
73 | /** | 72 | /** |
74 | - * Set the name of included sub-modules. | 73 | + * Sets the name of included sub-modules. |
75 | * | 74 | * |
76 | * @param subModuleName the sub-module name to set | 75 | * @param subModuleName the sub-module name to set |
77 | */ | 76 | */ |
... | @@ -80,7 +79,7 @@ public class YangInclude implements Parsable { | ... | @@ -80,7 +79,7 @@ public class YangInclude implements Parsable { |
80 | } | 79 | } |
81 | 80 | ||
82 | /** | 81 | /** |
83 | - * Get the revision. | 82 | + * Returns the revision. |
84 | * | 83 | * |
85 | * @return the revision | 84 | * @return the revision |
86 | */ | 85 | */ |
... | @@ -89,7 +88,7 @@ public class YangInclude implements Parsable { | ... | @@ -89,7 +88,7 @@ public class YangInclude implements Parsable { |
89 | } | 88 | } |
90 | 89 | ||
91 | /** | 90 | /** |
92 | - * Set the revision. | 91 | + * Sets the revision. |
93 | * | 92 | * |
94 | * @param revision the revision to set | 93 | * @param revision the revision to set |
95 | */ | 94 | */ |
... | @@ -108,7 +107,7 @@ public class YangInclude implements Parsable { | ... | @@ -108,7 +107,7 @@ public class YangInclude implements Parsable { |
108 | } | 107 | } |
109 | 108 | ||
110 | /** | 109 | /** |
111 | - * Validate the data on entering the corresponding parse tree node. | 110 | + * Validates the data on entering the corresponding parse tree node. |
112 | * | 111 | * |
113 | * @throws DataModelException a violation of data model rules | 112 | * @throws DataModelException a violation of data model rules |
114 | */ | 113 | */ |
... | @@ -119,7 +118,7 @@ public class YangInclude implements Parsable { | ... | @@ -119,7 +118,7 @@ public class YangInclude implements Parsable { |
119 | } | 118 | } |
120 | 119 | ||
121 | /** | 120 | /** |
122 | - * Validate the data on exiting the corresponding parse tree node. | 121 | + * Validates the data on exiting the corresponding parse tree node. |
123 | * | 122 | * |
124 | * @throws DataModelException a violation of data model rules | 123 | * @throws DataModelException a violation of data model rules |
125 | */ | 124 | */ |
... | @@ -139,7 +138,7 @@ public class YangInclude implements Parsable { | ... | @@ -139,7 +138,7 @@ public class YangInclude implements Parsable { |
139 | } | 138 | } |
140 | 139 | ||
141 | /** | 140 | /** |
142 | - * Set the dresolution information node. | 141 | + * Sets the dresolution information node. |
143 | * | 142 | * |
144 | * @param resolutionInfoNode the resolution information node | 143 | * @param resolutionInfoNode the resolution information node |
145 | */ | 144 | */ | ... | ... |
... | @@ -18,6 +18,7 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -18,6 +18,7 @@ package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | import java.util.LinkedList; | 19 | import java.util.LinkedList; |
20 | import java.util.List; | 20 | import java.util.List; |
21 | + | ||
21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 22 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
22 | import org.onosproject.yangutils.parser.Parsable; | 23 | import org.onosproject.yangutils.parser.Parsable; |
23 | import org.onosproject.yangutils.utils.YangConstructType; | 24 | import org.onosproject.yangutils.utils.YangConstructType; |
... | @@ -65,7 +66,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -65,7 +66,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
65 | */ | 66 | */ |
66 | 67 | ||
67 | /** | 68 | /** |
68 | - * Data model node to maintain information defined in YANG input. | 69 | + * Represents data model node to maintain information defined in YANG input. |
69 | */ | 70 | */ |
70 | public class YangInput extends YangNode implements YangLeavesHolder, Parsable, CollisionDetector { | 71 | public class YangInput extends YangNode implements YangLeavesHolder, Parsable, CollisionDetector { |
71 | 72 | ... | ... |
... | @@ -54,8 +54,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -54,8 +54,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
54 | * +--------------+---------+-------------+------------------+ | 54 | * +--------------+---------+-------------+------------------+ |
55 | */ | 55 | */ |
56 | /** | 56 | /** |
57 | - * Leaf data represented in YANG. | 57 | + * Represents leaf data represented in YANG. |
58 | - * | ||
59 | */ | 58 | */ |
60 | public class YangLeaf implements YangCommonInfo, Parsable { | 59 | public class YangLeaf implements YangCommonInfo, Parsable { |
61 | 60 | ||
... | @@ -100,13 +99,13 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -100,13 +99,13 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
100 | private YangType<?> dataType; | 99 | private YangType<?> dataType; |
101 | 100 | ||
102 | /** | 101 | /** |
103 | - * Default constructor to create a YANG leaf. | 102 | + * Creates a YANG leaf. |
104 | */ | 103 | */ |
105 | public YangLeaf() { | 104 | public YangLeaf() { |
106 | } | 105 | } |
107 | 106 | ||
108 | /** | 107 | /** |
109 | - * Get the name of leaf. | 108 | + * Returns the name of leaf. |
110 | * | 109 | * |
111 | * @return the leaf name | 110 | * @return the leaf name |
112 | */ | 111 | */ |
... | @@ -115,7 +114,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -115,7 +114,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
115 | } | 114 | } |
116 | 115 | ||
117 | /** | 116 | /** |
118 | - * Set the name of leaf. | 117 | + * Sets the name of leaf. |
119 | * | 118 | * |
120 | * @param leafName the leaf name to set | 119 | * @param leafName the leaf name to set |
121 | */ | 120 | */ |
... | @@ -124,7 +123,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -124,7 +123,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
124 | } | 123 | } |
125 | 124 | ||
126 | /** | 125 | /** |
127 | - * Get the config flag. | 126 | + * Returns the config flag. |
128 | * | 127 | * |
129 | * @return if config flag | 128 | * @return if config flag |
130 | */ | 129 | */ |
... | @@ -133,7 +132,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -133,7 +132,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
133 | } | 132 | } |
134 | 133 | ||
135 | /** | 134 | /** |
136 | - * Set the config flag. | 135 | + * Sets the config flag. |
137 | * | 136 | * |
138 | * @param isCfg the flag value to set | 137 | * @param isCfg the flag value to set |
139 | */ | 138 | */ |
... | @@ -142,7 +141,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -142,7 +141,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
142 | } | 141 | } |
143 | 142 | ||
144 | /** | 143 | /** |
145 | - * Get the description. | 144 | + * Returns the description. |
146 | * | 145 | * |
147 | * @return the description | 146 | * @return the description |
148 | */ | 147 | */ |
... | @@ -152,7 +151,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -152,7 +151,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
152 | } | 151 | } |
153 | 152 | ||
154 | /** | 153 | /** |
155 | - * Set the description. | 154 | + * Sets the description. |
156 | * | 155 | * |
157 | * @param description set the description | 156 | * @param description set the description |
158 | */ | 157 | */ |
... | @@ -162,7 +161,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -162,7 +161,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
162 | } | 161 | } |
163 | 162 | ||
164 | /** | 163 | /** |
165 | - * Get if the leaf is mandatory. | 164 | + * Returns if the leaf is mandatory. |
166 | * | 165 | * |
167 | * @return if leaf is mandatory | 166 | * @return if leaf is mandatory |
168 | */ | 167 | */ |
... | @@ -171,7 +170,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -171,7 +170,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
171 | } | 170 | } |
172 | 171 | ||
173 | /** | 172 | /** |
174 | - * Set if the leaf is mandatory. | 173 | + * Sets if the leaf is mandatory. |
175 | * | 174 | * |
176 | * @param isReq if the leaf is mandatory | 175 | * @param isReq if the leaf is mandatory |
177 | */ | 176 | */ |
... | @@ -180,7 +179,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -180,7 +179,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
180 | } | 179 | } |
181 | 180 | ||
182 | /** | 181 | /** |
183 | - * Get the textual reference. | 182 | + * Returns the textual reference. |
184 | * | 183 | * |
185 | * @return the reference | 184 | * @return the reference |
186 | */ | 185 | */ |
... | @@ -190,7 +189,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -190,7 +189,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
190 | } | 189 | } |
191 | 190 | ||
192 | /** | 191 | /** |
193 | - * Set the textual reference. | 192 | + * Sets the textual reference. |
194 | * | 193 | * |
195 | * @param reference the reference to set | 194 | * @param reference the reference to set |
196 | */ | 195 | */ |
... | @@ -200,7 +199,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -200,7 +199,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
200 | } | 199 | } |
201 | 200 | ||
202 | /** | 201 | /** |
203 | - * Get the status. | 202 | + * Returns the status. |
204 | * | 203 | * |
205 | * @return the status | 204 | * @return the status |
206 | */ | 205 | */ |
... | @@ -210,7 +209,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -210,7 +209,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
210 | } | 209 | } |
211 | 210 | ||
212 | /** | 211 | /** |
213 | - * Set the status. | 212 | + * Sets the status. |
214 | * | 213 | * |
215 | * @param status the status to set | 214 | * @param status the status to set |
216 | */ | 215 | */ |
... | @@ -220,7 +219,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -220,7 +219,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
220 | } | 219 | } |
221 | 220 | ||
222 | /** | 221 | /** |
223 | - * Get the units. | 222 | + * Returns the units. |
224 | * | 223 | * |
225 | * @return the units | 224 | * @return the units |
226 | */ | 225 | */ |
... | @@ -229,7 +228,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -229,7 +228,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
229 | } | 228 | } |
230 | 229 | ||
231 | /** | 230 | /** |
232 | - * Set the units. | 231 | + * Sets the units. |
233 | * | 232 | * |
234 | * @param units the units to set | 233 | * @param units the units to set |
235 | */ | 234 | */ |
... | @@ -238,7 +237,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -238,7 +237,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
238 | } | 237 | } |
239 | 238 | ||
240 | /** | 239 | /** |
241 | - * Get the data type. | 240 | + * Returns the data type. |
242 | * | 241 | * |
243 | * @return the data type | 242 | * @return the data type |
244 | */ | 243 | */ |
... | @@ -247,7 +246,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -247,7 +246,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
247 | } | 246 | } |
248 | 247 | ||
249 | /** | 248 | /** |
250 | - * Set the data type. | 249 | + * Sets the data type. |
251 | * | 250 | * |
252 | * @param dataType the data type to set | 251 | * @param dataType the data type to set |
253 | */ | 252 | */ |
... | @@ -266,7 +265,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -266,7 +265,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
266 | } | 265 | } |
267 | 266 | ||
268 | /** | 267 | /** |
269 | - * Validate the data on entering the corresponding parse tree node. | 268 | + * Validates the data on entering the corresponding parse tree node. |
270 | * | 269 | * |
271 | * @throws DataModelException a violation of data model rules | 270 | * @throws DataModelException a violation of data model rules |
272 | */ | 271 | */ |
... | @@ -277,7 +276,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { | ... | @@ -277,7 +276,7 @@ public class YangLeaf implements YangCommonInfo, Parsable { |
277 | } | 276 | } |
278 | 277 | ||
279 | /** | 278 | /** |
280 | - * Validate the data on exiting the corresponding parse tree node. | 279 | + * Validates the data on exiting the corresponding parse tree node. |
281 | * | 280 | * |
282 | * @throws DataModelException a violation of data model rules | 281 | * @throws DataModelException a violation of data model rules |
283 | */ | 282 | */ | ... | ... |
... | @@ -50,7 +50,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -50,7 +50,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
50 | * +--------------+---------+-------------+------------------+ | 50 | * +--------------+---------+-------------+------------------+ |
51 | */ | 51 | */ |
52 | /** | 52 | /** |
53 | - * Leaf-list data represented in YANG. | 53 | + * Represents leaf-list data represented in YANG. |
54 | */ | 54 | */ |
55 | public class YangLeafList implements YangCommonInfo, Parsable { | 55 | public class YangLeafList implements YangCommonInfo, Parsable { |
56 | 56 | ||
... | @@ -122,13 +122,13 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -122,13 +122,13 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
122 | private YangType<?> dataType; | 122 | private YangType<?> dataType; |
123 | 123 | ||
124 | /** | 124 | /** |
125 | - * Default Constructor to create a YANG leaf-list. | 125 | + * Creates a YANG leaf-list. |
126 | */ | 126 | */ |
127 | public YangLeafList() { | 127 | public YangLeafList() { |
128 | } | 128 | } |
129 | 129 | ||
130 | /** | 130 | /** |
131 | - * Get the leaf-list name. | 131 | + * Returns the leaf-list name. |
132 | * | 132 | * |
133 | * @return the leaf-list name | 133 | * @return the leaf-list name |
134 | */ | 134 | */ |
... | @@ -137,7 +137,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -137,7 +137,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
137 | } | 137 | } |
138 | 138 | ||
139 | /** | 139 | /** |
140 | - * Set the leaf-list name. | 140 | + * Sets the leaf-list name. |
141 | * | 141 | * |
142 | * @param leafListName the leaf-list name to set | 142 | * @param leafListName the leaf-list name to set |
143 | */ | 143 | */ |
... | @@ -146,7 +146,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -146,7 +146,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
146 | } | 146 | } |
147 | 147 | ||
148 | /** | 148 | /** |
149 | - * Get the config flag. | 149 | + * Returns the config flag. |
150 | * | 150 | * |
151 | * @return the config flag | 151 | * @return the config flag |
152 | */ | 152 | */ |
... | @@ -155,7 +155,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -155,7 +155,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
155 | } | 155 | } |
156 | 156 | ||
157 | /** | 157 | /** |
158 | - * Set the config flag. | 158 | + * Sets the config flag. |
159 | * | 159 | * |
160 | * @param isCfg the config flag | 160 | * @param isCfg the config flag |
161 | */ | 161 | */ |
... | @@ -164,7 +164,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -164,7 +164,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
164 | } | 164 | } |
165 | 165 | ||
166 | /** | 166 | /** |
167 | - * Get the description. | 167 | + * Returns the description. |
168 | * | 168 | * |
169 | * @return the description | 169 | * @return the description |
170 | */ | 170 | */ |
... | @@ -174,7 +174,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -174,7 +174,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
174 | } | 174 | } |
175 | 175 | ||
176 | /** | 176 | /** |
177 | - * Set the description. | 177 | + * Sets the description. |
178 | * | 178 | * |
179 | * @param description set the description | 179 | * @param description set the description |
180 | */ | 180 | */ |
... | @@ -184,7 +184,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -184,7 +184,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
184 | } | 184 | } |
185 | 185 | ||
186 | /** | 186 | /** |
187 | - * Get the max elements no. | 187 | + * Returns the max elements no. |
188 | * | 188 | * |
189 | * @return the max elements no | 189 | * @return the max elements no |
190 | */ | 190 | */ |
... | @@ -193,7 +193,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -193,7 +193,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
193 | } | 193 | } |
194 | 194 | ||
195 | /** | 195 | /** |
196 | - * Set the max elements no. | 196 | + * Sets the max elements no. |
197 | * | 197 | * |
198 | * @param maxElelements max elements no | 198 | * @param maxElelements max elements no |
199 | */ | 199 | */ |
... | @@ -202,7 +202,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -202,7 +202,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |
205 | - * Get the min elements no. | 205 | + * Returns the min elements no. |
206 | * | 206 | * |
207 | * @return the min elements no | 207 | * @return the min elements no |
208 | */ | 208 | */ |
... | @@ -211,7 +211,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -211,7 +211,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
211 | } | 211 | } |
212 | 212 | ||
213 | /** | 213 | /** |
214 | - * Set the min elements no. | 214 | + * Sets the min elements no. |
215 | * | 215 | * |
216 | * @param minElements the min elements no | 216 | * @param minElements the min elements no |
217 | */ | 217 | */ |
... | @@ -220,7 +220,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -220,7 +220,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
220 | } | 220 | } |
221 | 221 | ||
222 | /** | 222 | /** |
223 | - * Get the textual reference. | 223 | + * Returns the textual reference. |
224 | * | 224 | * |
225 | * @return the reference | 225 | * @return the reference |
226 | */ | 226 | */ |
... | @@ -230,7 +230,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -230,7 +230,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
230 | } | 230 | } |
231 | 231 | ||
232 | /** | 232 | /** |
233 | - * Set the textual reference. | 233 | + * Sets the textual reference. |
234 | * | 234 | * |
235 | * @param reference the reference to set | 235 | * @param reference the reference to set |
236 | */ | 236 | */ |
... | @@ -240,7 +240,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -240,7 +240,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
240 | } | 240 | } |
241 | 241 | ||
242 | /** | 242 | /** |
243 | - * Get the status. | 243 | + * Returns the status. |
244 | * | 244 | * |
245 | * @return the status | 245 | * @return the status |
246 | */ | 246 | */ |
... | @@ -250,7 +250,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -250,7 +250,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
250 | } | 250 | } |
251 | 251 | ||
252 | /** | 252 | /** |
253 | - * Set the status. | 253 | + * Sets the status. |
254 | * | 254 | * |
255 | * @param status the status to set | 255 | * @param status the status to set |
256 | */ | 256 | */ |
... | @@ -260,7 +260,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -260,7 +260,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
260 | } | 260 | } |
261 | 261 | ||
262 | /** | 262 | /** |
263 | - * Get the units. | 263 | + * Returns the units. |
264 | * | 264 | * |
265 | * @return the units | 265 | * @return the units |
266 | */ | 266 | */ |
... | @@ -269,7 +269,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -269,7 +269,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
269 | } | 269 | } |
270 | 270 | ||
271 | /** | 271 | /** |
272 | - * Set the units. | 272 | + * Sets the units. |
273 | * | 273 | * |
274 | * @param units the units to set | 274 | * @param units the units to set |
275 | */ | 275 | */ |
... | @@ -278,7 +278,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -278,7 +278,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
278 | } | 278 | } |
279 | 279 | ||
280 | /** | 280 | /** |
281 | - * Get the data type. | 281 | + * Returns the data type. |
282 | * | 282 | * |
283 | * @return the data type | 283 | * @return the data type |
284 | */ | 284 | */ |
... | @@ -287,7 +287,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -287,7 +287,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
287 | } | 287 | } |
288 | 288 | ||
289 | /** | 289 | /** |
290 | - * Set the data type. | 290 | + * Sets the data type. |
291 | * | 291 | * |
292 | * @param dataType the data type to set | 292 | * @param dataType the data type to set |
293 | */ | 293 | */ |
... | @@ -306,7 +306,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -306,7 +306,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
306 | } | 306 | } |
307 | 307 | ||
308 | /** | 308 | /** |
309 | - * Validate the data on entering the corresponding parse tree node. | 309 | + * Validates the data on entering the corresponding parse tree node. |
310 | * | 310 | * |
311 | * @throws DataModelException a violation of data model rules | 311 | * @throws DataModelException a violation of data model rules |
312 | */ | 312 | */ |
... | @@ -317,7 +317,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { | ... | @@ -317,7 +317,7 @@ public class YangLeafList implements YangCommonInfo, Parsable { |
317 | } | 317 | } |
318 | 318 | ||
319 | /** | 319 | /** |
320 | - * Validate the data on exiting the corresponding parse tree node. | 320 | + * Validates the data on exiting the corresponding parse tree node. |
321 | * | 321 | * |
322 | * @throws DataModelException a violation of data model rules | 322 | * @throws DataModelException a violation of data model rules |
323 | */ | 323 | */ | ... | ... |
1 | -/*Copyright 2016.year Open Networking Laboratory | 1 | +/* |
2 | - | 2 | + * Copyright 2016 Open Networking Laboratory |
3 | -Licensed under the Apache License, Version 2.0 (the "License"); | 3 | + * |
4 | -you may not use this file except in compliance with the License. | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | -You may obtain a copy of the License at | 5 | + * you may not use this file except in compliance with the License. |
6 | - | 6 | + * You may obtain a copy of the License at |
7 | - http://www.apache.org/licenses/LICENSE-2.0 | 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 | + */ | ||
8 | 16 | ||
9 | -Unless required by applicable law or agreed to in writing, software | ||
10 | -distributed under the License is distributed on an "AS IS" BASIS, | ||
11 | -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
12 | -See the License for the specific language governing permissions and | ||
13 | -limitations under the License.*/ | ||
14 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
15 | 18 | ||
16 | import java.util.List; | 19 | import java.util.List; |
... | @@ -23,7 +26,7 @@ import java.util.List; | ... | @@ -23,7 +26,7 @@ import java.util.List; |
23 | public interface YangLeavesHolder { | 26 | public interface YangLeavesHolder { |
24 | 27 | ||
25 | /** | 28 | /** |
26 | - * Get the list of leaves from data holder like container / list. | 29 | + * Returns the list of leaves from data holder like container / list. |
27 | * | 30 | * |
28 | * @return the list of leaves. | 31 | * @return the list of leaves. |
29 | */ | 32 | */ |
... | @@ -37,7 +40,7 @@ public interface YangLeavesHolder { | ... | @@ -37,7 +40,7 @@ public interface YangLeavesHolder { |
37 | void addLeaf(YangLeaf leaf); | 40 | void addLeaf(YangLeaf leaf); |
38 | 41 | ||
39 | /** | 42 | /** |
40 | - * Get the list of leaf-list from data holder like container / list. | 43 | + * Returns the list of leaf-list from data holder like container / list. |
41 | * | 44 | * |
42 | * @return the list of leaf-list. | 45 | * @return the list of leaf-list. |
43 | */ | 46 | */ | ... | ... |
... | @@ -65,7 +65,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -65,7 +65,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
65 | */ | 65 | */ |
66 | 66 | ||
67 | /** | 67 | /** |
68 | - * List data represented in YANG. | 68 | + * Represents list data represented in YANG. |
69 | */ | 69 | */ |
70 | public class YangList extends YangNode | 70 | public class YangList extends YangNode |
71 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { | 71 | implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector { |
... | @@ -166,14 +166,14 @@ public class YangList extends YangNode | ... | @@ -166,14 +166,14 @@ public class YangList extends YangNode |
166 | private YangStatusType status = YangStatusType.CURRENT; | 166 | private YangStatusType status = YangStatusType.CURRENT; |
167 | 167 | ||
168 | /** | 168 | /** |
169 | - * Constructor. | 169 | + * Creates a YANG list object. |
170 | */ | 170 | */ |
171 | public YangList() { | 171 | public YangList() { |
172 | super(YangNodeType.LIST_NODE); | 172 | super(YangNodeType.LIST_NODE); |
173 | } | 173 | } |
174 | 174 | ||
175 | /** | 175 | /** |
176 | - * Get the YANG list name. | 176 | + * Returns the YANG list name. |
177 | * | 177 | * |
178 | * @return YANG list name | 178 | * @return YANG list name |
179 | */ | 179 | */ |
... | @@ -183,7 +183,7 @@ public class YangList extends YangNode | ... | @@ -183,7 +183,7 @@ public class YangList extends YangNode |
183 | } | 183 | } |
184 | 184 | ||
185 | /** | 185 | /** |
186 | - * Set the YANG list name. | 186 | + * Sets the YANG list name. |
187 | * | 187 | * |
188 | * @param name YANG list name | 188 | * @param name YANG list name |
189 | */ | 189 | */ |
... | @@ -193,7 +193,7 @@ public class YangList extends YangNode | ... | @@ -193,7 +193,7 @@ public class YangList extends YangNode |
193 | } | 193 | } |
194 | 194 | ||
195 | /** | 195 | /** |
196 | - * Get the config flag. | 196 | + * Returns the config flag. |
197 | * | 197 | * |
198 | * @return the isConfig | 198 | * @return the isConfig |
199 | */ | 199 | */ |
... | @@ -202,7 +202,7 @@ public class YangList extends YangNode | ... | @@ -202,7 +202,7 @@ public class YangList extends YangNode |
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |
205 | - * Set the config flag. | 205 | + * Sets the config flag. |
206 | * | 206 | * |
207 | * @param isCfg the config flag | 207 | * @param isCfg the config flag |
208 | */ | 208 | */ |
... | @@ -211,7 +211,7 @@ public class YangList extends YangNode | ... | @@ -211,7 +211,7 @@ public class YangList extends YangNode |
211 | } | 211 | } |
212 | 212 | ||
213 | /** | 213 | /** |
214 | - * Get the description. | 214 | + * Returns the description. |
215 | * | 215 | * |
216 | * @return the description | 216 | * @return the description |
217 | */ | 217 | */ |
... | @@ -221,7 +221,7 @@ public class YangList extends YangNode | ... | @@ -221,7 +221,7 @@ public class YangList extends YangNode |
221 | } | 221 | } |
222 | 222 | ||
223 | /** | 223 | /** |
224 | - * Set the description. | 224 | + * Sets the description. |
225 | * | 225 | * |
226 | * @param description set the description | 226 | * @param description set the description |
227 | */ | 227 | */ |
... | @@ -231,7 +231,7 @@ public class YangList extends YangNode | ... | @@ -231,7 +231,7 @@ public class YangList extends YangNode |
231 | } | 231 | } |
232 | 232 | ||
233 | /** | 233 | /** |
234 | - * Get the list of key field names. | 234 | + * Returns the list of key field names. |
235 | * | 235 | * |
236 | * @return the list of key field names | 236 | * @return the list of key field names |
237 | */ | 237 | */ |
... | @@ -240,7 +240,7 @@ public class YangList extends YangNode | ... | @@ -240,7 +240,7 @@ public class YangList extends YangNode |
240 | } | 240 | } |
241 | 241 | ||
242 | /** | 242 | /** |
243 | - * Set the list of key field names. | 243 | + * Sets the list of key field names. |
244 | * | 244 | * |
245 | * @param keyList the list of key field names | 245 | * @param keyList the list of key field names |
246 | */ | 246 | */ |
... | @@ -249,7 +249,7 @@ public class YangList extends YangNode | ... | @@ -249,7 +249,7 @@ public class YangList extends YangNode |
249 | } | 249 | } |
250 | 250 | ||
251 | /** | 251 | /** |
252 | - * Add a key field name. | 252 | + * Adds a key field name. |
253 | * | 253 | * |
254 | * @param key key field name. | 254 | * @param key key field name. |
255 | * @throws DataModelException a violation of data model rules | 255 | * @throws DataModelException a violation of data model rules |
... | @@ -268,7 +268,7 @@ public class YangList extends YangNode | ... | @@ -268,7 +268,7 @@ public class YangList extends YangNode |
268 | } | 268 | } |
269 | 269 | ||
270 | /** | 270 | /** |
271 | - * Get the list of leaves. | 271 | + * Returns the list of leaves. |
272 | * | 272 | * |
273 | * @return the list of leaves | 273 | * @return the list of leaves |
274 | */ | 274 | */ |
... | @@ -278,7 +278,7 @@ public class YangList extends YangNode | ... | @@ -278,7 +278,7 @@ public class YangList extends YangNode |
278 | } | 278 | } |
279 | 279 | ||
280 | /** | 280 | /** |
281 | - * Set the list of leaves. | 281 | + * Sets the list of leaves. |
282 | * | 282 | * |
283 | * @param leafsList the list of leaf to set | 283 | * @param leafsList the list of leaf to set |
284 | */ | 284 | */ |
... | @@ -287,7 +287,7 @@ public class YangList extends YangNode | ... | @@ -287,7 +287,7 @@ public class YangList extends YangNode |
287 | } | 287 | } |
288 | 288 | ||
289 | /** | 289 | /** |
290 | - * Add a leaf. | 290 | + * Adds a leaf. |
291 | * | 291 | * |
292 | * @param leaf the leaf to be added | 292 | * @param leaf the leaf to be added |
293 | */ | 293 | */ |
... | @@ -301,7 +301,7 @@ public class YangList extends YangNode | ... | @@ -301,7 +301,7 @@ public class YangList extends YangNode |
301 | } | 301 | } |
302 | 302 | ||
303 | /** | 303 | /** |
304 | - * Get the list of leaf-list. | 304 | + * Returns the list of leaf-list. |
305 | * | 305 | * |
306 | * @return the list of leaf-list | 306 | * @return the list of leaf-list |
307 | */ | 307 | */ |
... | @@ -311,7 +311,7 @@ public class YangList extends YangNode | ... | @@ -311,7 +311,7 @@ public class YangList extends YangNode |
311 | } | 311 | } |
312 | 312 | ||
313 | /** | 313 | /** |
314 | - * Set the list of leaf-list. | 314 | + * Sets the list of leaf-list. |
315 | * | 315 | * |
316 | * @param listOfLeafList the list of leaf-list to set | 316 | * @param listOfLeafList the list of leaf-list to set |
317 | */ | 317 | */ |
... | @@ -320,7 +320,7 @@ public class YangList extends YangNode | ... | @@ -320,7 +320,7 @@ public class YangList extends YangNode |
320 | } | 320 | } |
321 | 321 | ||
322 | /** | 322 | /** |
323 | - * Add a leaf-list. | 323 | + * Adds a leaf-list. |
324 | * | 324 | * |
325 | * @param leafList the leaf-list to be added | 325 | * @param leafList the leaf-list to be added |
326 | */ | 326 | */ |
... | @@ -334,7 +334,7 @@ public class YangList extends YangNode | ... | @@ -334,7 +334,7 @@ public class YangList extends YangNode |
334 | } | 334 | } |
335 | 335 | ||
336 | /** | 336 | /** |
337 | - * Get the max elements. | 337 | + * Returns the max elements. |
338 | * | 338 | * |
339 | * @return the max elements | 339 | * @return the max elements |
340 | */ | 340 | */ |
... | @@ -343,7 +343,7 @@ public class YangList extends YangNode | ... | @@ -343,7 +343,7 @@ public class YangList extends YangNode |
343 | } | 343 | } |
344 | 344 | ||
345 | /** | 345 | /** |
346 | - * Set the max elements. | 346 | + * Sets the max elements. |
347 | * | 347 | * |
348 | * @param max the max elements | 348 | * @param max the max elements |
349 | */ | 349 | */ |
... | @@ -352,7 +352,7 @@ public class YangList extends YangNode | ... | @@ -352,7 +352,7 @@ public class YangList extends YangNode |
352 | } | 352 | } |
353 | 353 | ||
354 | /** | 354 | /** |
355 | - * Get the minimum elements. | 355 | + * Returns the minimum elements. |
356 | * | 356 | * |
357 | * @return the minimum elements | 357 | * @return the minimum elements |
358 | */ | 358 | */ |
... | @@ -361,7 +361,7 @@ public class YangList extends YangNode | ... | @@ -361,7 +361,7 @@ public class YangList extends YangNode |
361 | } | 361 | } |
362 | 362 | ||
363 | /** | 363 | /** |
364 | - * Set the minimum elements. | 364 | + * Sets the minimum elements. |
365 | * | 365 | * |
366 | * @param minElements the minimum elements | 366 | * @param minElements the minimum elements |
367 | */ | 367 | */ |
... | @@ -370,7 +370,7 @@ public class YangList extends YangNode | ... | @@ -370,7 +370,7 @@ public class YangList extends YangNode |
370 | } | 370 | } |
371 | 371 | ||
372 | /** | 372 | /** |
373 | - * Get the textual reference. | 373 | + * Returns the textual reference. |
374 | * | 374 | * |
375 | * @return the reference | 375 | * @return the reference |
376 | */ | 376 | */ |
... | @@ -380,7 +380,7 @@ public class YangList extends YangNode | ... | @@ -380,7 +380,7 @@ public class YangList extends YangNode |
380 | } | 380 | } |
381 | 381 | ||
382 | /** | 382 | /** |
383 | - * Set the textual reference. | 383 | + * Sets the textual reference. |
384 | * | 384 | * |
385 | * @param reference the reference to set | 385 | * @param reference the reference to set |
386 | */ | 386 | */ |
... | @@ -390,7 +390,7 @@ public class YangList extends YangNode | ... | @@ -390,7 +390,7 @@ public class YangList extends YangNode |
390 | } | 390 | } |
391 | 391 | ||
392 | /** | 392 | /** |
393 | - * Get the status. | 393 | + * Returns the status. |
394 | * | 394 | * |
395 | * @return the status | 395 | * @return the status |
396 | */ | 396 | */ |
... | @@ -400,7 +400,7 @@ public class YangList extends YangNode | ... | @@ -400,7 +400,7 @@ public class YangList extends YangNode |
400 | } | 400 | } |
401 | 401 | ||
402 | /** | 402 | /** |
403 | - * Set the status. | 403 | + * Sets the status. |
404 | * | 404 | * |
405 | * @param status the status to set | 405 | * @param status the status to set |
406 | */ | 406 | */ |
... | @@ -420,7 +420,7 @@ public class YangList extends YangNode | ... | @@ -420,7 +420,7 @@ public class YangList extends YangNode |
420 | } | 420 | } |
421 | 421 | ||
422 | /** | 422 | /** |
423 | - * Validate the data on entering the corresponding parse tree node. | 423 | + * Validates the data on entering the corresponding parse tree node. |
424 | * | 424 | * |
425 | * @throws DataModelException a violation of data model rules | 425 | * @throws DataModelException a violation of data model rules |
426 | */ | 426 | */ |
... | @@ -430,7 +430,7 @@ public class YangList extends YangNode | ... | @@ -430,7 +430,7 @@ public class YangList extends YangNode |
430 | } | 430 | } |
431 | 431 | ||
432 | /** | 432 | /** |
433 | - * Validate the data on exiting the corresponding parse tree node. | 433 | + * Validates the data on exiting the corresponding parse tree node. |
434 | * | 434 | * |
435 | * @throws DataModelException a violation of data model rules | 435 | * @throws DataModelException a violation of data model rules |
436 | */ | 436 | */ | ... | ... |
... | @@ -17,6 +17,7 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -17,6 +17,7 @@ package org.onosproject.yangutils.datamodel; |
17 | 17 | ||
18 | import java.util.LinkedList; | 18 | import java.util.LinkedList; |
19 | import java.util.List; | 19 | import java.util.List; |
20 | + | ||
20 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
21 | import org.onosproject.yangutils.parser.Parsable; | 22 | import org.onosproject.yangutils.parser.Parsable; |
22 | import org.onosproject.yangutils.utils.YangConstructType; | 23 | import org.onosproject.yangutils.utils.YangConstructType; |
... | @@ -65,7 +66,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.resolveLi | ... | @@ -65,7 +66,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.resolveLi |
65 | */ | 66 | */ |
66 | 67 | ||
67 | /** | 68 | /** |
68 | - * Data model node to maintain information defined in YANG module. | 69 | + * Represents data model node to maintain information defined in YANG module. |
69 | */ | 70 | */ |
70 | public class YangModule extends YangNode | 71 | public class YangModule extends YangNode |
71 | implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo { | 72 | implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo { |
... | @@ -188,7 +189,7 @@ public class YangModule extends YangNode | ... | @@ -188,7 +189,7 @@ public class YangModule extends YangNode |
188 | private List<YangResolutionInfo> unresolvedResolutionList; | 189 | private List<YangResolutionInfo> unresolvedResolutionList; |
189 | 190 | ||
190 | /** | 191 | /** |
191 | - * Create a YANG node of module type. | 192 | + * Creates a YANG node of module type. |
192 | */ | 193 | */ |
193 | public YangModule() { | 194 | public YangModule() { |
194 | 195 | ||
... | @@ -201,7 +202,7 @@ public class YangModule extends YangNode | ... | @@ -201,7 +202,7 @@ public class YangModule extends YangNode |
201 | } | 202 | } |
202 | 203 | ||
203 | /** | 204 | /** |
204 | - * Get name of the module. | 205 | + * Returns name of the module. |
205 | * | 206 | * |
206 | * @return module name | 207 | * @return module name |
207 | */ | 208 | */ |
... | @@ -211,7 +212,7 @@ public class YangModule extends YangNode | ... | @@ -211,7 +212,7 @@ public class YangModule extends YangNode |
211 | } | 212 | } |
212 | 213 | ||
213 | /** | 214 | /** |
214 | - * Set module name. | 215 | + * Sets module name. |
215 | * | 216 | * |
216 | * @param moduleName module name | 217 | * @param moduleName module name |
217 | */ | 218 | */ |
... | @@ -221,7 +222,7 @@ public class YangModule extends YangNode | ... | @@ -221,7 +222,7 @@ public class YangModule extends YangNode |
221 | } | 222 | } |
222 | 223 | ||
223 | /** | 224 | /** |
224 | - * Get the contact details of the module owner. | 225 | + * Returns the contact details of the module owner. |
225 | * | 226 | * |
226 | * @return the contact details of YANG owner | 227 | * @return the contact details of YANG owner |
227 | */ | 228 | */ |
... | @@ -230,7 +231,7 @@ public class YangModule extends YangNode | ... | @@ -230,7 +231,7 @@ public class YangModule extends YangNode |
230 | } | 231 | } |
231 | 232 | ||
232 | /** | 233 | /** |
233 | - * Set the contact details of the module owner. | 234 | + * Sets the contact details of the module owner. |
234 | * | 235 | * |
235 | * @param contact the contact details of YANG owner | 236 | * @param contact the contact details of YANG owner |
236 | */ | 237 | */ |
... | @@ -239,7 +240,7 @@ public class YangModule extends YangNode | ... | @@ -239,7 +240,7 @@ public class YangModule extends YangNode |
239 | } | 240 | } |
240 | 241 | ||
241 | /** | 242 | /** |
242 | - * Get the description of module. | 243 | + * Returns the description of module. |
243 | * | 244 | * |
244 | * @return the description of YANG module | 245 | * @return the description of YANG module |
245 | */ | 246 | */ |
... | @@ -249,7 +250,7 @@ public class YangModule extends YangNode | ... | @@ -249,7 +250,7 @@ public class YangModule extends YangNode |
249 | } | 250 | } |
250 | 251 | ||
251 | /** | 252 | /** |
252 | - * Set the description of module. | 253 | + * Sets the description of module. |
253 | * | 254 | * |
254 | * @param description set the description of YANG module | 255 | * @param description set the description of YANG module |
255 | */ | 256 | */ |
... | @@ -259,7 +260,7 @@ public class YangModule extends YangNode | ... | @@ -259,7 +260,7 @@ public class YangModule extends YangNode |
259 | } | 260 | } |
260 | 261 | ||
261 | /** | 262 | /** |
262 | - * Get the list of imported modules. | 263 | + * Returns the list of imported modules. |
263 | * | 264 | * |
264 | * @return the list of imported modules | 265 | * @return the list of imported modules |
265 | */ | 266 | */ |
... | @@ -268,7 +269,7 @@ public class YangModule extends YangNode | ... | @@ -268,7 +269,7 @@ public class YangModule extends YangNode |
268 | } | 269 | } |
269 | 270 | ||
270 | /** | 271 | /** |
271 | - * Add the imported module information to the import list. | 272 | + * Adds the imported module information to the import list. |
272 | * | 273 | * |
273 | * @param importedModule module being imported | 274 | * @param importedModule module being imported |
274 | */ | 275 | */ |
... | @@ -282,7 +283,7 @@ public class YangModule extends YangNode | ... | @@ -282,7 +283,7 @@ public class YangModule extends YangNode |
282 | } | 283 | } |
283 | 284 | ||
284 | /** | 285 | /** |
285 | - * Get the list of included sub modules. | 286 | + * Returns the list of included sub modules. |
286 | * | 287 | * |
287 | * @return the included list of sub modules | 288 | * @return the included list of sub modules |
288 | */ | 289 | */ |
... | @@ -291,7 +292,7 @@ public class YangModule extends YangNode | ... | @@ -291,7 +292,7 @@ public class YangModule extends YangNode |
291 | } | 292 | } |
292 | 293 | ||
293 | /** | 294 | /** |
294 | - * Add the included sub module information to the include list. | 295 | + * Adds the included sub module information to the include list. |
295 | * | 296 | * |
296 | * @param includeModule submodule being included | 297 | * @param includeModule submodule being included |
297 | */ | 298 | */ |
... | @@ -305,7 +306,7 @@ public class YangModule extends YangNode | ... | @@ -305,7 +306,7 @@ public class YangModule extends YangNode |
305 | } | 306 | } |
306 | 307 | ||
307 | /** | 308 | /** |
308 | - * Get the list of leaves in module. | 309 | + * Returns the list of leaves in module. |
309 | * | 310 | * |
310 | * @return the list of leaves | 311 | * @return the list of leaves |
311 | */ | 312 | */ |
... | @@ -315,7 +316,7 @@ public class YangModule extends YangNode | ... | @@ -315,7 +316,7 @@ public class YangModule extends YangNode |
315 | } | 316 | } |
316 | 317 | ||
317 | /** | 318 | /** |
318 | - * Add a leaf in module. | 319 | + * Adds a leaf in module. |
319 | * | 320 | * |
320 | * @param leaf the leaf to be added | 321 | * @param leaf the leaf to be added |
321 | */ | 322 | */ |
... | @@ -325,7 +326,7 @@ public class YangModule extends YangNode | ... | @@ -325,7 +326,7 @@ public class YangModule extends YangNode |
325 | } | 326 | } |
326 | 327 | ||
327 | /** | 328 | /** |
328 | - * Get the list of leaf-list from module. | 329 | + * Returns the list of leaf-list from module. |
329 | * | 330 | * |
330 | * @return the list of leaf-list | 331 | * @return the list of leaf-list |
331 | */ | 332 | */ |
... | @@ -335,7 +336,7 @@ public class YangModule extends YangNode | ... | @@ -335,7 +336,7 @@ public class YangModule extends YangNode |
335 | } | 336 | } |
336 | 337 | ||
337 | /** | 338 | /** |
338 | - * Add a leaf-list in module. | 339 | + * Adds a leaf-list in module. |
339 | * | 340 | * |
340 | * @param leafList the leaf-list to be added | 341 | * @param leafList the leaf-list to be added |
341 | */ | 342 | */ |
... | @@ -345,7 +346,7 @@ public class YangModule extends YangNode | ... | @@ -345,7 +346,7 @@ public class YangModule extends YangNode |
345 | } | 346 | } |
346 | 347 | ||
347 | /** | 348 | /** |
348 | - * Get the name space of module elements. | 349 | + * Returns the name space of module elements. |
349 | * | 350 | * |
350 | * @return the nameSpace | 351 | * @return the nameSpace |
351 | */ | 352 | */ |
... | @@ -354,7 +355,7 @@ public class YangModule extends YangNode | ... | @@ -354,7 +355,7 @@ public class YangModule extends YangNode |
354 | } | 355 | } |
355 | 356 | ||
356 | /** | 357 | /** |
357 | - * Set the name space of module elements. | 358 | + * Sets the name space of module elements. |
358 | * | 359 | * |
359 | * @param nameSpace the nameSpace to set | 360 | * @param nameSpace the nameSpace to set |
360 | */ | 361 | */ |
... | @@ -363,7 +364,7 @@ public class YangModule extends YangNode | ... | @@ -363,7 +364,7 @@ public class YangModule extends YangNode |
363 | } | 364 | } |
364 | 365 | ||
365 | /** | 366 | /** |
366 | - * Get the modules organization. | 367 | + * Returns the modules organization. |
367 | * | 368 | * |
368 | * @return the organization | 369 | * @return the organization |
369 | */ | 370 | */ |
... | @@ -372,7 +373,7 @@ public class YangModule extends YangNode | ... | @@ -372,7 +373,7 @@ public class YangModule extends YangNode |
372 | } | 373 | } |
373 | 374 | ||
374 | /** | 375 | /** |
375 | - * Set the modules organization. | 376 | + * Sets the modules organization. |
376 | * | 377 | * |
377 | * @param org the organization to set | 378 | * @param org the organization to set |
378 | */ | 379 | */ |
... | @@ -381,7 +382,7 @@ public class YangModule extends YangNode | ... | @@ -381,7 +382,7 @@ public class YangModule extends YangNode |
381 | } | 382 | } |
382 | 383 | ||
383 | /** | 384 | /** |
384 | - * Get the prefix. | 385 | + * Returns the prefix. |
385 | * | 386 | * |
386 | * @return the prefix | 387 | * @return the prefix |
387 | */ | 388 | */ |
... | @@ -390,7 +391,7 @@ public class YangModule extends YangNode | ... | @@ -390,7 +391,7 @@ public class YangModule extends YangNode |
390 | } | 391 | } |
391 | 392 | ||
392 | /** | 393 | /** |
393 | - * Set the prefix. | 394 | + * Sets the prefix. |
394 | * | 395 | * |
395 | * @param prefix the prefix to set | 396 | * @param prefix the prefix to set |
396 | */ | 397 | */ |
... | @@ -407,7 +408,7 @@ public class YangModule extends YangNode | ... | @@ -407,7 +408,7 @@ public class YangModule extends YangNode |
407 | } | 408 | } |
408 | 409 | ||
409 | /** | 410 | /** |
410 | - * Get the textual reference. | 411 | + * Returns the textual reference. |
411 | * | 412 | * |
412 | * @return the reference | 413 | * @return the reference |
413 | */ | 414 | */ |
... | @@ -417,7 +418,7 @@ public class YangModule extends YangNode | ... | @@ -417,7 +418,7 @@ public class YangModule extends YangNode |
417 | } | 418 | } |
418 | 419 | ||
419 | /** | 420 | /** |
420 | - * Set the textual reference. | 421 | + * Sets the textual reference. |
421 | * | 422 | * |
422 | * @param reference the reference to set | 423 | * @param reference the reference to set |
423 | */ | 424 | */ |
... | @@ -427,7 +428,7 @@ public class YangModule extends YangNode | ... | @@ -427,7 +428,7 @@ public class YangModule extends YangNode |
427 | } | 428 | } |
428 | 429 | ||
429 | /** | 430 | /** |
430 | - * Get the revision. | 431 | + * Returns the revision. |
431 | * | 432 | * |
432 | * @return the revision | 433 | * @return the revision |
433 | */ | 434 | */ |
... | @@ -436,7 +437,7 @@ public class YangModule extends YangNode | ... | @@ -436,7 +437,7 @@ public class YangModule extends YangNode |
436 | } | 437 | } |
437 | 438 | ||
438 | /** | 439 | /** |
439 | - * Set the revision. | 440 | + * Sets the revision. |
440 | * | 441 | * |
441 | * @param revision the revision to set | 442 | * @param revision the revision to set |
442 | */ | 443 | */ |
... | @@ -445,7 +446,7 @@ public class YangModule extends YangNode | ... | @@ -445,7 +446,7 @@ public class YangModule extends YangNode |
445 | } | 446 | } |
446 | 447 | ||
447 | /** | 448 | /** |
448 | - * Get the version. | 449 | + * Returns the version. |
449 | * | 450 | * |
450 | * @return the version | 451 | * @return the version |
451 | */ | 452 | */ |
... | @@ -454,7 +455,7 @@ public class YangModule extends YangNode | ... | @@ -454,7 +455,7 @@ public class YangModule extends YangNode |
454 | } | 455 | } |
455 | 456 | ||
456 | /** | 457 | /** |
457 | - * Set the version. | 458 | + * Sets the version. |
458 | * | 459 | * |
459 | * @param version the version to set | 460 | * @param version the version to set |
460 | */ | 461 | */ |
... | @@ -473,7 +474,7 @@ public class YangModule extends YangNode | ... | @@ -473,7 +474,7 @@ public class YangModule extends YangNode |
473 | } | 474 | } |
474 | 475 | ||
475 | /** | 476 | /** |
476 | - * Validate the data on entering the corresponding parse tree node. | 477 | + * Validates the data on entering the corresponding parse tree node. |
477 | * | 478 | * |
478 | * @throws DataModelException a violation of data model rules | 479 | * @throws DataModelException a violation of data model rules |
479 | */ | 480 | */ |
... | @@ -486,7 +487,7 @@ public class YangModule extends YangNode | ... | @@ -486,7 +487,7 @@ public class YangModule extends YangNode |
486 | } | 487 | } |
487 | 488 | ||
488 | /** | 489 | /** |
489 | - * Validate the data on exiting the corresponding parse tree node. | 490 | + * Validates the data on exiting the corresponding parse tree node. |
490 | * | 491 | * |
491 | * @throws DataModelException a violation of data model rules | 492 | * @throws DataModelException a violation of data model rules |
492 | */ | 493 | */ | ... | ... |
... | @@ -44,7 +44,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -44,7 +44,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
44 | */ | 44 | */ |
45 | 45 | ||
46 | /** | 46 | /** |
47 | - * Maintain information defined in YANG must. | 47 | + * Represents information defined in YANG must. |
48 | */ | 48 | */ |
49 | public class YangMust implements YangDesc, YangReference, Parsable { | 49 | public class YangMust implements YangDesc, YangReference, Parsable { |
50 | 50 | ||
... | @@ -64,13 +64,13 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -64,13 +64,13 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
64 | private String reference; | 64 | private String reference; |
65 | 65 | ||
66 | /** | 66 | /** |
67 | - * Create a YANG must restriction. | 67 | + * Creates a YANG must restriction. |
68 | */ | 68 | */ |
69 | public YangMust() { | 69 | public YangMust() { |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | - * Get the constraint. | 73 | + * Returns the constraint. |
74 | * | 74 | * |
75 | * @return the constraint | 75 | * @return the constraint |
76 | */ | 76 | */ |
... | @@ -79,7 +79,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -79,7 +79,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | - * Set the constraint. | 82 | + * Sets the constraint. |
83 | * | 83 | * |
84 | * @param constratint the constraint to set | 84 | * @param constratint the constraint to set |
85 | */ | 85 | */ |
... | @@ -88,7 +88,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -88,7 +88,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
91 | - * Get the description. | 91 | + * Returns the description. |
92 | * | 92 | * |
93 | * @return the description | 93 | * @return the description |
94 | */ | 94 | */ |
... | @@ -98,7 +98,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -98,7 +98,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
98 | } | 98 | } |
99 | 99 | ||
100 | /** | 100 | /** |
101 | - * Set the description. | 101 | + * Sets the description. |
102 | * | 102 | * |
103 | * @param description set the description | 103 | * @param description set the description |
104 | */ | 104 | */ |
... | @@ -108,7 +108,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -108,7 +108,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
108 | } | 108 | } |
109 | 109 | ||
110 | /** | 110 | /** |
111 | - * Get the textual reference. | 111 | + * Returns the textual reference. |
112 | * | 112 | * |
113 | * @return the reference | 113 | * @return the reference |
114 | */ | 114 | */ |
... | @@ -118,7 +118,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -118,7 +118,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
118 | } | 118 | } |
119 | 119 | ||
120 | /** | 120 | /** |
121 | - * Set the textual reference. | 121 | + * Sets the textual reference. |
122 | * | 122 | * |
123 | * @param reference the reference to set | 123 | * @param reference the reference to set |
124 | */ | 124 | */ |
... | @@ -138,7 +138,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -138,7 +138,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
138 | } | 138 | } |
139 | 139 | ||
140 | /** | 140 | /** |
141 | - * Validate the data on entering the corresponding parse tree node. | 141 | + * Validates the data on entering the corresponding parse tree node. |
142 | * | 142 | * |
143 | * @throws DataModelException a violation of data model rules | 143 | * @throws DataModelException a violation of data model rules |
144 | */ | 144 | */ |
... | @@ -148,7 +148,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { | ... | @@ -148,7 +148,7 @@ public class YangMust implements YangDesc, YangReference, Parsable { |
148 | } | 148 | } |
149 | 149 | ||
150 | /** | 150 | /** |
151 | - * Validate the data on exiting the corresponding parse tree node. | 151 | + * Validates the data on exiting the corresponding parse tree node. |
152 | * | 152 | * |
153 | * @throws DataModelException a violation of data model rules | 153 | * @throws DataModelException a violation of data model rules |
154 | */ | 154 | */ | ... | ... |
... | @@ -30,20 +30,20 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -30,20 +30,20 @@ import org.onosproject.yangutils.utils.YangConstructType; |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /** | 32 | /** |
33 | - * Name space to be used for the XML data tree. | 33 | + * Represents name space to be used for the XML data tree. |
34 | */ | 34 | */ |
35 | public class YangNameSpace implements Parsable { | 35 | public class YangNameSpace implements Parsable { |
36 | 36 | ||
37 | private String uri; | 37 | private String uri; |
38 | 38 | ||
39 | /** | 39 | /** |
40 | - * Default constructor. | 40 | + * Creats a YANG name space object. |
41 | */ | 41 | */ |
42 | public YangNameSpace() { | 42 | public YangNameSpace() { |
43 | } | 43 | } |
44 | 44 | ||
45 | /** | 45 | /** |
46 | - * Get the name space URI. | 46 | + * Returns the name space URI. |
47 | * | 47 | * |
48 | * @return the URI | 48 | * @return the URI |
49 | */ | 49 | */ |
... | @@ -52,7 +52,7 @@ public class YangNameSpace implements Parsable { | ... | @@ -52,7 +52,7 @@ public class YangNameSpace implements Parsable { |
52 | } | 52 | } |
53 | 53 | ||
54 | /** | 54 | /** |
55 | - * Set the name space URI. | 55 | + * Sets the name space URI. |
56 | * | 56 | * |
57 | * @param uri the URI to set | 57 | * @param uri the URI to set |
58 | */ | 58 | */ |
... | @@ -71,24 +71,22 @@ public class YangNameSpace implements Parsable { | ... | @@ -71,24 +71,22 @@ public class YangNameSpace implements Parsable { |
71 | } | 71 | } |
72 | 72 | ||
73 | /** | 73 | /** |
74 | - * Validate the data on entering the corresponding parse tree node. | 74 | + * Validates the data on entering the corresponding parse tree node. |
75 | * | 75 | * |
76 | * @throws DataModelException a violation of data model rules | 76 | * @throws DataModelException a violation of data model rules |
77 | */ | 77 | */ |
78 | @Override | 78 | @Override |
79 | public void validateDataOnEntry() throws DataModelException { | 79 | public void validateDataOnEntry() throws DataModelException { |
80 | // TODO auto-generated method stub, to be implemented by parser | 80 | // TODO auto-generated method stub, to be implemented by parser |
81 | - | ||
82 | } | 81 | } |
83 | 82 | ||
84 | /** | 83 | /** |
85 | - * Validate the data on exiting the corresponding parse tree node. | 84 | + * Validates the data on exiting the corresponding parse tree node. |
86 | * | 85 | * |
87 | * @throws DataModelException a violation of data model rules | 86 | * @throws DataModelException a violation of data model rules |
88 | */ | 87 | */ |
89 | @Override | 88 | @Override |
90 | public void validateDataOnExit() throws DataModelException { | 89 | public void validateDataOnExit() throws DataModelException { |
91 | // TODO auto-generated method stub, to be implemented by parser | 90 | // TODO auto-generated method stub, to be implemented by parser |
92 | - | ||
93 | } | 91 | } |
94 | } | 92 | } | ... | ... |
... | @@ -18,7 +18,7 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -18,7 +18,7 @@ package org.onosproject.yangutils.datamodel; |
18 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 18 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
19 | 19 | ||
20 | /** | 20 | /** |
21 | - * Base class of a node in data model tree. | 21 | + * Represents base class of a node in data model tree. |
22 | */ | 22 | */ |
23 | public abstract class YangNode { | 23 | public abstract class YangNode { |
24 | 24 | ||
... | @@ -48,21 +48,21 @@ public abstract class YangNode { | ... | @@ -48,21 +48,21 @@ public abstract class YangNode { |
48 | private YangNode previousSibling; | 48 | private YangNode previousSibling; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | - * Get the nodes name. | 51 | + * Returns the nodes name. |
52 | * | 52 | * |
53 | * @return nodes name | 53 | * @return nodes name |
54 | */ | 54 | */ |
55 | public abstract String getName(); | 55 | public abstract String getName(); |
56 | 56 | ||
57 | /** | 57 | /** |
58 | - * Set the nodes name. | 58 | + * Sets the nodes name. |
59 | * | 59 | * |
60 | * @param name nodes name | 60 | * @param name nodes name |
61 | */ | 61 | */ |
62 | public abstract void setName(String name); | 62 | public abstract void setName(String name); |
63 | 63 | ||
64 | /** | 64 | /** |
65 | - * Default constructor is made private to ensure node type is always set. | 65 | + * Creates a YANG node object. |
66 | */ | 66 | */ |
67 | @SuppressWarnings("unused") | 67 | @SuppressWarnings("unused") |
68 | private YangNode() { | 68 | private YangNode() { |
... | @@ -70,7 +70,7 @@ public abstract class YangNode { | ... | @@ -70,7 +70,7 @@ public abstract class YangNode { |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | - * Create a specific type of node. | 73 | + * Creates a specific type of node. |
74 | * | 74 | * |
75 | * @param type of YANG node | 75 | * @param type of YANG node |
76 | */ | 76 | */ |
... | @@ -79,7 +79,7 @@ public abstract class YangNode { | ... | @@ -79,7 +79,7 @@ public abstract class YangNode { |
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | - * Get the node type. | 82 | + * Returns the node type. |
83 | * | 83 | * |
84 | * @return node type | 84 | * @return node type |
85 | */ | 85 | */ |
... | @@ -88,7 +88,7 @@ public abstract class YangNode { | ... | @@ -88,7 +88,7 @@ public abstract class YangNode { |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
91 | - * Set the node type. | 91 | + * Sets the node type. |
92 | * | 92 | * |
93 | * @param nodeType type of node | 93 | * @param nodeType type of node |
94 | */ | 94 | */ |
... | @@ -97,7 +97,7 @@ public abstract class YangNode { | ... | @@ -97,7 +97,7 @@ public abstract class YangNode { |
97 | } | 97 | } |
98 | 98 | ||
99 | /** | 99 | /** |
100 | - * Get the parent of node. | 100 | + * Returns the parent of node. |
101 | * | 101 | * |
102 | * @return parent of node | 102 | * @return parent of node |
103 | */ | 103 | */ |
... | @@ -106,7 +106,7 @@ public abstract class YangNode { | ... | @@ -106,7 +106,7 @@ public abstract class YangNode { |
106 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
109 | - * Set the parent of node. | 109 | + * Sets the parent of node. |
110 | * | 110 | * |
111 | * @param parent node | 111 | * @param parent node |
112 | */ | 112 | */ |
... | @@ -115,7 +115,7 @@ public abstract class YangNode { | ... | @@ -115,7 +115,7 @@ public abstract class YangNode { |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | - * Get the first child of node. | 118 | + * Returns the first child of node. |
119 | * | 119 | * |
120 | * @return first child of node | 120 | * @return first child of node |
121 | */ | 121 | */ |
... | @@ -124,7 +124,7 @@ public abstract class YangNode { | ... | @@ -124,7 +124,7 @@ public abstract class YangNode { |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Set the first instance of a child node. | 127 | + * Sets the first instance of a child node. |
128 | * | 128 | * |
129 | * @param child is only child to be set | 129 | * @param child is only child to be set |
130 | */ | 130 | */ |
... | @@ -133,7 +133,7 @@ public abstract class YangNode { | ... | @@ -133,7 +133,7 @@ public abstract class YangNode { |
133 | } | 133 | } |
134 | 134 | ||
135 | /** | 135 | /** |
136 | - * Get the next sibling of node. | 136 | + * Returns the next sibling of node. |
137 | * | 137 | * |
138 | * @return next sibling of node | 138 | * @return next sibling of node |
139 | */ | 139 | */ |
... | @@ -142,7 +142,7 @@ public abstract class YangNode { | ... | @@ -142,7 +142,7 @@ public abstract class YangNode { |
142 | } | 142 | } |
143 | 143 | ||
144 | /** | 144 | /** |
145 | - * Set the next sibling of node. | 145 | + * Sets the next sibling of node. |
146 | * | 146 | * |
147 | * @param sibling YANG node | 147 | * @param sibling YANG node |
148 | */ | 148 | */ |
... | @@ -151,7 +151,7 @@ public abstract class YangNode { | ... | @@ -151,7 +151,7 @@ public abstract class YangNode { |
151 | } | 151 | } |
152 | 152 | ||
153 | /** | 153 | /** |
154 | - * Get the previous sibling. | 154 | + * Returns the previous sibling. |
155 | * | 155 | * |
156 | * @return previous sibling node | 156 | * @return previous sibling node |
157 | */ | 157 | */ |
... | @@ -160,7 +160,7 @@ public abstract class YangNode { | ... | @@ -160,7 +160,7 @@ public abstract class YangNode { |
160 | } | 160 | } |
161 | 161 | ||
162 | /** | 162 | /** |
163 | - * Set the previous sibling. | 163 | + * Sets the previous sibling. |
164 | * | 164 | * |
165 | * @param previousSibling points to predecessor sibling | 165 | * @param previousSibling points to predecessor sibling |
166 | */ | 166 | */ |
... | @@ -169,7 +169,7 @@ public abstract class YangNode { | ... | @@ -169,7 +169,7 @@ public abstract class YangNode { |
169 | } | 169 | } |
170 | 170 | ||
171 | /** | 171 | /** |
172 | - * Add a child node, the children sibling list will be sorted based on node | 172 | + * Adds a child node, the children sibling list will be sorted based on node |
173 | * type. | 173 | * type. |
174 | * | 174 | * |
175 | * @param newChild refers to a child to be added | 175 | * @param newChild refers to a child to be added | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * YANG node identifier which is a combination of prefix and name. | 20 | + * Represents YANG node identifier which is a combination of prefix and name. |
21 | */ | 21 | */ |
22 | public class YangNodeIdentifier { | 22 | public class YangNodeIdentifier { |
23 | 23 | ||
... | @@ -43,7 +43,7 @@ public class YangNodeIdentifier { | ... | @@ -43,7 +43,7 @@ public class YangNodeIdentifier { |
43 | } | 43 | } |
44 | 44 | ||
45 | /** | 45 | /** |
46 | - * Set name of the node identifier. | 46 | + * Sets name of the node identifier. |
47 | * | 47 | * |
48 | * @param name name of the node identifier | 48 | * @param name name of the node identifier |
49 | */ | 49 | */ |
... | @@ -61,7 +61,7 @@ public class YangNodeIdentifier { | ... | @@ -61,7 +61,7 @@ public class YangNodeIdentifier { |
61 | } | 61 | } |
62 | 62 | ||
63 | /** | 63 | /** |
64 | - * Set prefix of the node identifier. | 64 | + * Sets prefix of the node identifier. |
65 | * | 65 | * |
66 | * @param prefix prefix of the node identifier | 66 | * @param prefix prefix of the node identifier |
67 | */ | 67 | */ | ... | ... |
... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
16 | package org.onosproject.yangutils.datamodel; | 16 | package org.onosproject.yangutils.datamodel; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | - * Node type in data model tree corresponding to YANG schema. | 19 | + * Represents node type in data model tree corresponding to YANG schema. |
20 | */ | 20 | */ |
21 | public enum YangNodeType { | 21 | public enum YangNodeType { |
22 | /** | 22 | /** | ... | ... |
... | @@ -18,6 +18,7 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -18,6 +18,7 @@ package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | import java.util.LinkedList; | 19 | import java.util.LinkedList; |
20 | import java.util.List; | 20 | import java.util.List; |
21 | + | ||
21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 22 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
22 | import org.onosproject.yangutils.parser.Parsable; | 23 | import org.onosproject.yangutils.parser.Parsable; |
23 | import org.onosproject.yangutils.utils.YangConstructType; | 24 | import org.onosproject.yangutils.utils.YangConstructType; |
... | @@ -71,10 +72,10 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -71,10 +72,10 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
71 | */ | 72 | */ |
72 | 73 | ||
73 | /** | 74 | /** |
74 | - * Data model node to maintain information defined in YANG notification. | 75 | + * Represents data model node to maintain information defined in YANG notification. |
75 | */ | 76 | */ |
76 | public class YangNotification extends YangNode implements YangLeavesHolder, YangCommonInfo, Parsable, | 77 | public class YangNotification extends YangNode implements YangLeavesHolder, YangCommonInfo, Parsable, |
77 | - CollisionDetector { | 78 | + CollisionDetector { |
78 | 79 | ||
79 | /** | 80 | /** |
80 | * Name of the notification. | 81 | * Name of the notification. | ... | ... |
... | @@ -18,6 +18,7 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -18,6 +18,7 @@ package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | import java.util.LinkedList; | 19 | import java.util.LinkedList; |
20 | import java.util.List; | 20 | import java.util.List; |
21 | + | ||
21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 22 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
22 | import org.onosproject.yangutils.parser.Parsable; | 23 | import org.onosproject.yangutils.parser.Parsable; |
23 | import org.onosproject.yangutils.utils.YangConstructType; | 24 | import org.onosproject.yangutils.utils.YangConstructType; |
... | @@ -64,7 +65,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -64,7 +65,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
64 | */ | 65 | */ |
65 | 66 | ||
66 | /** | 67 | /** |
67 | - * Data model node to maintain information defined in YANG output. | 68 | + * Represents data model node to maintain information defined in YANG output. |
68 | */ | 69 | */ |
69 | public class YangOutput extends YangNode implements YangLeavesHolder, Parsable, CollisionDetector { | 70 | public class YangOutput extends YangNode implements YangLeavesHolder, Parsable, CollisionDetector { |
70 | 71 | ... | ... |
... | @@ -47,7 +47,7 @@ import java.util.List; | ... | @@ -47,7 +47,7 @@ import java.util.List; |
47 | * +---------------+---------+-------------+ | 47 | * +---------------+---------+-------------+ |
48 | */ | 48 | */ |
49 | /** | 49 | /** |
50 | - * Pattern restriction information. The regular expression restriction on string | 50 | + * Represents pattern restriction information. The regular expression restriction on string |
51 | * data type. | 51 | * data type. |
52 | */ | 52 | */ |
53 | public class YangPatternRestriction { | 53 | public class YangPatternRestriction { |
... | @@ -63,14 +63,14 @@ public class YangPatternRestriction { | ... | @@ -63,14 +63,14 @@ public class YangPatternRestriction { |
63 | private List<String> basePattern; | 63 | private List<String> basePattern; |
64 | 64 | ||
65 | /** | 65 | /** |
66 | - * Default constructor. | 66 | + * Creates a YANG pattern restriction object. |
67 | */ | 67 | */ |
68 | public YangPatternRestriction() { | 68 | public YangPatternRestriction() { |
69 | setPatternList(new LinkedList<String>()); | 69 | setPatternList(new LinkedList<String>()); |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | - * Get the pattern restriction defined for the current type. | 73 | + * Returns the pattern restriction defined for the current type. |
74 | * | 74 | * |
75 | * @return pattern restriction defined for the current type. | 75 | * @return pattern restriction defined for the current type. |
76 | */ | 76 | */ |
... | @@ -79,7 +79,7 @@ public class YangPatternRestriction { | ... | @@ -79,7 +79,7 @@ public class YangPatternRestriction { |
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | - * Set the pattern restriction defined for the current type. | 82 | + * Sets the pattern restriction defined for the current type. |
83 | * | 83 | * |
84 | * @param pattern pattern restriction defined for the current type.. | 84 | * @param pattern pattern restriction defined for the current type.. |
85 | */ | 85 | */ |
... | @@ -88,7 +88,7 @@ public class YangPatternRestriction { | ... | @@ -88,7 +88,7 @@ public class YangPatternRestriction { |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
91 | - * Add a new pattern to the list of pattern restriction. | 91 | + * Adds a new pattern to the list of pattern restriction. |
92 | * | 92 | * |
93 | * @param newPattern pattern restriction. | 93 | * @param newPattern pattern restriction. |
94 | */ | 94 | */ |
... | @@ -97,7 +97,7 @@ public class YangPatternRestriction { | ... | @@ -97,7 +97,7 @@ public class YangPatternRestriction { |
97 | } | 97 | } |
98 | 98 | ||
99 | /** | 99 | /** |
100 | - * Get the pattern restriction defined in base type. | 100 | + * Returns the pattern restriction defined in base type. |
101 | * | 101 | * |
102 | * @return pattern restriction defined in base type. | 102 | * @return pattern restriction defined in base type. |
103 | */ | 103 | */ |
... | @@ -106,7 +106,7 @@ public class YangPatternRestriction { | ... | @@ -106,7 +106,7 @@ public class YangPatternRestriction { |
106 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
109 | - * Set the pattern restriction defined in base type. | 109 | + * Sets the pattern restriction defined in base type. |
110 | * | 110 | * |
111 | * @param basePattern pattern restriction defined in base type. | 111 | * @param basePattern pattern restriction defined in base type. |
112 | */ | 112 | */ | ... | ... |
... | @@ -14,7 +14,7 @@ limitations under the License.*/ | ... | @@ -14,7 +14,7 @@ limitations under the License.*/ |
14 | package org.onosproject.yangutils.datamodel; | 14 | package org.onosproject.yangutils.datamodel; |
15 | 15 | ||
16 | /** | 16 | /** |
17 | - * Single interval information of a range. | 17 | + * Represents single interval information of a range. |
18 | * | 18 | * |
19 | * @param <T> range type based on the data type. | 19 | * @param <T> range type based on the data type. |
20 | */ | 20 | */ |
... | @@ -31,13 +31,13 @@ public class YangRangeInterval<T extends Comparable<T>> { | ... | @@ -31,13 +31,13 @@ public class YangRangeInterval<T extends Comparable<T>> { |
31 | private T endValue; | 31 | private T endValue; |
32 | 32 | ||
33 | /** | 33 | /** |
34 | - * Default constructor. | 34 | + * Creates YANG range interval object. |
35 | */ | 35 | */ |
36 | public YangRangeInterval() { | 36 | public YangRangeInterval() { |
37 | } | 37 | } |
38 | 38 | ||
39 | /** | 39 | /** |
40 | - * Get the starting value of the range interval. | 40 | + * Returns the starting value of the range interval. |
41 | * | 41 | * |
42 | * @return the starting value of the range interval. | 42 | * @return the starting value of the range interval. |
43 | */ | 43 | */ |
... | @@ -46,7 +46,7 @@ public class YangRangeInterval<T extends Comparable<T>> { | ... | @@ -46,7 +46,7 @@ public class YangRangeInterval<T extends Comparable<T>> { |
46 | } | 46 | } |
47 | 47 | ||
48 | /** | 48 | /** |
49 | - * Set the starting value of the range interval. | 49 | + * Sets the starting value of the range interval. |
50 | * | 50 | * |
51 | * @param startValue the starting value of the range interval. | 51 | * @param startValue the starting value of the range interval. |
52 | */ | 52 | */ |
... | @@ -55,7 +55,7 @@ public class YangRangeInterval<T extends Comparable<T>> { | ... | @@ -55,7 +55,7 @@ public class YangRangeInterval<T extends Comparable<T>> { |
55 | } | 55 | } |
56 | 56 | ||
57 | /** | 57 | /** |
58 | - * Get the last value of the range interval. | 58 | + * Returns the last value of the range interval. |
59 | * | 59 | * |
60 | * @return last value of the range interval. | 60 | * @return last value of the range interval. |
61 | */ | 61 | */ |
... | @@ -64,7 +64,7 @@ public class YangRangeInterval<T extends Comparable<T>> { | ... | @@ -64,7 +64,7 @@ public class YangRangeInterval<T extends Comparable<T>> { |
64 | } | 64 | } |
65 | 65 | ||
66 | /** | 66 | /** |
67 | - * Set the last value of the range interval. | 67 | + * Sets the last value of the range interval. |
68 | * | 68 | * |
69 | * @param endValue last value of the range interval. | 69 | * @param endValue last value of the range interval. |
70 | */ | 70 | */ | ... | ... |
... | @@ -48,7 +48,7 @@ import static com.google.common.base.Preconditions.checkNotNull; | ... | @@ -48,7 +48,7 @@ import static com.google.common.base.Preconditions.checkNotNull; |
48 | * for the type being restricted, respectively. | 48 | * for the type being restricted, respectively. |
49 | */ | 49 | */ |
50 | /** | 50 | /** |
51 | - * Ascending range restriction information. | 51 | + * Represents ascending range restriction information. |
52 | * | 52 | * |
53 | * @param <T> range type (data type) | 53 | * @param <T> range type (data type) |
54 | */ | 54 | */ |
... | @@ -81,35 +81,34 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -81,35 +81,34 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
81 | private String description; | 81 | private String description; |
82 | 82 | ||
83 | /** | 83 | /** |
84 | - * Default constructor. | 84 | + * Creates YANG range restriction object. |
85 | */ | 85 | */ |
86 | public YangRangeRestriction() { | 86 | public YangRangeRestriction() { |
87 | } | 87 | } |
88 | 88 | ||
89 | /** | 89 | /** |
90 | - * Get the list of range interval restriction in ascending order. | 90 | + * Returns the list of range interval restriction in ascending order. |
91 | * | 91 | * |
92 | - * @return list of range interval restriction in ascending order. | 92 | + * @return list of range interval restriction in ascending order |
93 | */ | 93 | */ |
94 | public List<YangRangeInterval<T>> getAscendingRangeIntervals() { | 94 | public List<YangRangeInterval<T>> getAscendingRangeIntervals() { |
95 | return ascendingRangeIntervals; | 95 | return ascendingRangeIntervals; |
96 | } | 96 | } |
97 | 97 | ||
98 | /** | 98 | /** |
99 | - * Set the list of range interval restriction in ascending order. | 99 | + * Sets the list of range interval restriction in ascending order. |
100 | * | 100 | * |
101 | - * @param rangeList list of range interval restriction in ascending order. | 101 | + * @param rangeList list of range interval restriction in ascending order |
102 | */ | 102 | */ |
103 | private void setAscendingRangeIntervals(List<YangRangeInterval<T>> rangeList) { | 103 | private void setAscendingRangeIntervals(List<YangRangeInterval<T>> rangeList) { |
104 | ascendingRangeIntervals = rangeList; | 104 | ascendingRangeIntervals = rangeList; |
105 | } | 105 | } |
106 | 106 | ||
107 | /** | 107 | /** |
108 | - * Get the minimum valid value as per the restriction. | 108 | + * Returns the minimum valid value as per the restriction. |
109 | * | 109 | * |
110 | - * @throws DataModelException data model exception for minimum restriction. | 110 | + * @throws DataModelException data model exception for minimum restriction |
111 | - * | 111 | + * @return minimum restricted value |
112 | - * @return minimum restricted value. | ||
113 | */ | 112 | */ |
114 | public T getMinRestrictedvalue() throws DataModelException { | 113 | public T getMinRestrictedvalue() throws DataModelException { |
115 | if (getAscendingRangeIntervals() == null) { | 114 | if (getAscendingRangeIntervals() == null) { |
... | @@ -122,11 +121,10 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -122,11 +121,10 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
122 | } | 121 | } |
123 | 122 | ||
124 | /** | 123 | /** |
125 | - * Get the maximum valid value as per the restriction. | 124 | + * Returns the maximum valid value as per the restriction. |
126 | - * | ||
127 | - * @throws DataModelException data model exception for maximum restriction. | ||
128 | * | 125 | * |
129 | - * @return minimum maximum value. | 126 | + * @throws DataModelException data model exception for maximum restriction |
127 | + * @return minimum maximum value | ||
130 | */ | 128 | */ |
131 | public T getMaxRestrictedvalue() throws DataModelException { | 129 | public T getMaxRestrictedvalue() throws DataModelException { |
132 | if (getAscendingRangeIntervals() == null) { | 130 | if (getAscendingRangeIntervals() == null) { |
... | @@ -140,11 +138,11 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -140,11 +138,11 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
140 | } | 138 | } |
141 | 139 | ||
142 | /** | 140 | /** |
143 | - * Add new interval to extend its range in the last. i.e. newly added | 141 | + * Adds new interval to extend its range in the last. i.e. newly added |
144 | * interval needs to be bigger than the biggest interval in the list. | 142 | * interval needs to be bigger than the biggest interval in the list. |
145 | * | 143 | * |
146 | - * @param newInterval restricted length interval. | 144 | + * @param newInterval restricted length interval |
147 | - * @throws DataModelException data model exception for range restriction. | 145 | + * @throws DataModelException data model exception for range restriction |
148 | */ | 146 | */ |
149 | public void addRangeRestrictionInterval(YangRangeInterval<T> newInterval) throws DataModelException { | 147 | public void addRangeRestrictionInterval(YangRangeInterval<T> newInterval) throws DataModelException { |
150 | 148 | ||
... | @@ -173,9 +171,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -173,9 +171,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
173 | } | 171 | } |
174 | 172 | ||
175 | /** | 173 | /** |
176 | - * Get the textual reference of the length restriction. | 174 | + * Returns the textual reference of the length restriction. |
177 | * | 175 | * |
178 | - * @return textual reference of the length restriction. | 176 | + * @return textual reference of the length restriction |
179 | */ | 177 | */ |
180 | @Override | 178 | @Override |
181 | public String getReference() { | 179 | public String getReference() { |
... | @@ -183,9 +181,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -183,9 +181,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
183 | } | 181 | } |
184 | 182 | ||
185 | /** | 183 | /** |
186 | - * Set the textual reference of the length restriction. | 184 | + * Sets the textual reference of the length restriction. |
187 | * | 185 | * |
188 | - * @param ref textual reference of the length restriction. | 186 | + * @param ref textual reference of the length restriction |
189 | */ | 187 | */ |
190 | @Override | 188 | @Override |
191 | public void setReference(String ref) { | 189 | public void setReference(String ref) { |
... | @@ -193,9 +191,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -193,9 +191,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
193 | } | 191 | } |
194 | 192 | ||
195 | /** | 193 | /** |
196 | - * Get the description of the length restriction. | 194 | + * Returns the description of the length restriction. |
197 | * | 195 | * |
198 | - * @return description of the length restriction. | 196 | + * @return description of the length restriction |
199 | */ | 197 | */ |
200 | @Override | 198 | @Override |
201 | public String getDescription() { | 199 | public String getDescription() { |
... | @@ -203,9 +201,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -203,9 +201,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
203 | } | 201 | } |
204 | 202 | ||
205 | /** | 203 | /** |
206 | - * Set the description of the length restriction. | 204 | + * Sets the description of the length restriction. |
207 | * | 205 | * |
208 | - * @param desc description of the length restriction. | 206 | + * @param desc description of the length restriction |
209 | */ | 207 | */ |
210 | @Override | 208 | @Override |
211 | public void setDescription(String desc) { | 209 | public void setDescription(String desc) { |
... | @@ -214,9 +212,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -214,9 +212,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
214 | } | 212 | } |
215 | 213 | ||
216 | /** | 214 | /** |
217 | - * Get application's error message, to be used for data error. | 215 | + * Returns application's error message, to be used for data error. |
218 | * | 216 | * |
219 | - * @return Application's error message, to be used for data error. | 217 | + * @return Application's error message, to be used for data error |
220 | */ | 218 | */ |
221 | @Override | 219 | @Override |
222 | public String getGetErrorMessage() { | 220 | public String getGetErrorMessage() { |
... | @@ -224,9 +222,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -224,9 +222,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
224 | } | 222 | } |
225 | 223 | ||
226 | /** | 224 | /** |
227 | - * Set Application's error message, to be used for data error. | 225 | + * Sets Application's error message, to be used for data error. |
228 | * | 226 | * |
229 | - * @param errMsg Application's error message, to be used for data error. | 227 | + * @param errMsg Application's error message, to be used for data error |
230 | */ | 228 | */ |
231 | @Override | 229 | @Override |
232 | public void setErrorMessage(String errMsg) { | 230 | public void setErrorMessage(String errMsg) { |
... | @@ -235,9 +233,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -235,9 +233,9 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
235 | } | 233 | } |
236 | 234 | ||
237 | /** | 235 | /** |
238 | - * Get application's error tag, to be used for data error. | 236 | + * Returns application's error tag, to be used for data error. |
239 | * | 237 | * |
240 | - * @return application's error tag, to be used for data error. | 238 | + * @return application's error tag, to be used for data error |
241 | */ | 239 | */ |
242 | @Override | 240 | @Override |
243 | public String getGetErrorAppTag() { | 241 | public String getGetErrorAppTag() { |
... | @@ -245,7 +243,7 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, | ... | @@ -245,7 +243,7 @@ public class YangRangeRestriction<T extends Comparable<T>> implements YangDesc, |
245 | } | 243 | } |
246 | 244 | ||
247 | /** | 245 | /** |
248 | - * Set application's error tag, to be used for data error. | 246 | + * Sets application's error tag, to be used for data error. |
249 | * | 247 | * |
250 | * @param errTag application's error tag, to be used for data error. | 248 | * @param errTag application's error tag, to be used for data error. |
251 | */ | 249 | */ | ... | ... |
... | @@ -20,17 +20,18 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -20,17 +20,18 @@ package org.onosproject.yangutils.datamodel; |
20 | * parsing and translator processing of reference. | 20 | * parsing and translator processing of reference. |
21 | */ | 21 | */ |
22 | public interface YangReference { | 22 | public interface YangReference { |
23 | + | ||
23 | /** | 24 | /** |
24 | - * Get the textual reference. | 25 | + * Returns the textual reference. |
25 | * | 26 | * |
26 | - * @return the reference. | 27 | + * @return the reference |
27 | */ | 28 | */ |
28 | String getReference(); | 29 | String getReference(); |
29 | 30 | ||
30 | /** | 31 | /** |
31 | - * Set the textual reference. | 32 | + * Sets the textual reference. |
32 | * | 33 | * |
33 | - * @param reference the reference to set. | 34 | + * @param reference the reference to set |
34 | */ | 35 | */ |
35 | void setReference(String reference); | 36 | void setReference(String reference); |
36 | 37 | ... | ... |
... | @@ -17,10 +17,11 @@ | ... | @@ -17,10 +17,11 @@ |
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | import java.util.Stack; | 19 | import java.util.Stack; |
20 | + | ||
20 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
21 | 22 | ||
22 | /** | 23 | /** |
23 | - * Resolution object which will be resolved by linker. | 24 | + * Represents resolution object which will be resolved by linker. |
24 | */ | 25 | */ |
25 | public class YangResolutionInfo<T> { | 26 | public class YangResolutionInfo<T> { |
26 | 27 | ||
... | @@ -43,8 +44,8 @@ public class YangResolutionInfo<T> { | ... | @@ -43,8 +44,8 @@ public class YangResolutionInfo<T> { |
43 | private boolean isResolved; | 44 | private boolean isResolved; |
44 | 45 | ||
45 | /* | 46 | /* |
46 | - * Stack for type/uses is maintained for hierarchical references, this | 47 | + * Stack for type/uses is maintained for hierarchical references, this is |
47 | - * is used during resolution. | 48 | + * used during resolution. |
48 | */ | 49 | */ |
49 | private Stack<T> partialResolvedStack; | 50 | private Stack<T> partialResolvedStack; |
50 | 51 | ||
... | @@ -72,8 +73,8 @@ public class YangResolutionInfo<T> { | ... | @@ -72,8 +73,8 @@ public class YangResolutionInfo<T> { |
72 | * @param charPositionInLine error character position in line | 73 | * @param charPositionInLine error character position in line |
73 | */ | 74 | */ |
74 | public YangResolutionInfo(T dataNode, ResolutionType resolutionType, | 75 | public YangResolutionInfo(T dataNode, ResolutionType resolutionType, |
75 | - YangNode holderNode, String prefix, int lineNumber, | 76 | + YangNode holderNode, String prefix, int lineNumber, |
76 | - int charPositionInLine) { | 77 | + int charPositionInLine) { |
77 | this.setHolderOfEntityToResolve(holderNode); | 78 | this.setHolderOfEntityToResolve(holderNode); |
78 | this.setEntityToResolve(dataNode); | 79 | this.setEntityToResolve(dataNode); |
79 | this.setPrefix(prefix); | 80 | this.setPrefix(prefix); |
... | @@ -92,8 +93,8 @@ public class YangResolutionInfo<T> { | ... | @@ -92,8 +93,8 @@ public class YangResolutionInfo<T> { |
92 | * @param charPositionInLine error character position in line | 93 | * @param charPositionInLine error character position in line |
93 | */ | 94 | */ |
94 | public YangResolutionInfo(T dataNode, ResolutionType resolutionType, | 95 | public YangResolutionInfo(T dataNode, ResolutionType resolutionType, |
95 | - YangNode holderNode, int lineNumber, | 96 | + YangNode holderNode, int lineNumber, |
96 | - int charPositionInLine) { | 97 | + int charPositionInLine) { |
97 | this.setHolderOfEntityToResolve(holderNode); | 98 | this.setHolderOfEntityToResolve(holderNode); |
98 | this.setEntityToResolve(dataNode); | 99 | this.setEntityToResolve(dataNode); |
99 | this.setLineNumber(lineNumber); | 100 | this.setLineNumber(lineNumber); |
... | @@ -106,7 +107,7 @@ public class YangResolutionInfo<T> { | ... | @@ -106,7 +107,7 @@ public class YangResolutionInfo<T> { |
106 | * @param resolutionInfoNodePrefix module/sub-module prefix | 107 | * @param resolutionInfoNodePrefix module/sub-module prefix |
107 | * @throws DataModelException DataModelException a violation of data model rules | 108 | * @throws DataModelException DataModelException a violation of data model rules |
108 | */ | 109 | */ |
109 | - public void resolveLinkingForResolutionInfo(String resolutionInfoNodePrefix) throws DataModelException { | 110 | + public void resolveLinkingForResolutionInfo(String resolutionInfoNodePrefix) throws DataModelException { |
110 | 111 | ||
111 | this.resolutionInfoRootNodePrefix = resolutionInfoNodePrefix; | 112 | this.resolutionInfoRootNodePrefix = resolutionInfoNodePrefix; |
112 | 113 | ||
... | @@ -177,8 +178,8 @@ public class YangResolutionInfo<T> { | ... | @@ -177,8 +178,8 @@ public class YangResolutionInfo<T> { |
177 | } | 178 | } |
178 | if (isMoreReferenceDetected) { | 179 | if (isMoreReferenceDetected) { |
179 | /* | 180 | /* |
180 | - * If more reference are present, tree traversal must start | 181 | + * If more reference are present, tree traversal must start from |
181 | - * from first child again, to check the availability of | 182 | + * first child again, to check the availability of |
182 | * typedef/grouping. | 183 | * typedef/grouping. |
183 | */ | 184 | */ |
184 | node = parentNode.getChild(); | 185 | node = parentNode.getChild(); |
... | @@ -197,14 +198,14 @@ public class YangResolutionInfo<T> { | ... | @@ -197,14 +198,14 @@ public class YangResolutionInfo<T> { |
197 | * @return flag to indicate whether resolution is done | 198 | * @return flag to indicate whether resolution is done |
198 | * @throws DataModelException a violation of data model rules | 199 | * @throws DataModelException a violation of data model rules |
199 | */ | 200 | */ |
200 | - private boolean resolveLinkingForNode(YangNode node, YangNode parentNode) throws | 201 | + private boolean resolveLinkingForNode(YangNode node, YangNode parentNode) throws DataModelException { |
201 | - DataModelException { | 202 | + |
202 | /* | 203 | /* |
203 | - * Check if name of node name matches with the entity name | 204 | + * Check if name of node name matches with the entity name under |
204 | - * under resolution. | 205 | + * resolution. |
205 | */ | 206 | */ |
206 | if (isNodeNameSameAsResolutionInfoName(node)) { | 207 | if (isNodeNameSameAsResolutionInfoName(node)) { |
207 | - // Add reference of entity to the node under resolution. | 208 | + // Adds reference of entity to the node under resolution. |
208 | addReferredEntityLink(node); | 209 | addReferredEntityLink(node); |
209 | // Check if referred entity has further reference to uses/type. | 210 | // Check if referred entity has further reference to uses/type. |
210 | if (!(isMoreReferencePresent(node))) { | 211 | if (!(isMoreReferencePresent(node))) { |
... | @@ -212,7 +213,7 @@ public class YangResolutionInfo<T> { | ... | @@ -212,7 +213,7 @@ public class YangResolutionInfo<T> { |
212 | resolveStackAndAddToStack(node); | 213 | resolveStackAndAddToStack(node); |
213 | return true; | 214 | return true; |
214 | } else { | 215 | } else { |
215 | - // Add referred type/uses to the stack. | 216 | + // Adds referred type/uses to the stack. |
216 | addToPartialResolvedStack(node); | 217 | addToPartialResolvedStack(node); |
217 | /* | 218 | /* |
218 | * Check whether referred type is resolved, partially resolved | 219 | * Check whether referred type is resolved, partially resolved |
... | @@ -230,25 +231,25 @@ public class YangResolutionInfo<T> { | ... | @@ -230,25 +231,25 @@ public class YangResolutionInfo<T> { |
230 | updateResolutionTypeToPartial(); | 231 | updateResolutionTypeToPartial(); |
231 | return true; | 232 | return true; |
232 | } else { | 233 | } else { |
233 | - /* | 234 | + /* |
234 | - * Check if prefix is present to find that the derived | 235 | + * Check if prefix is present to find that the derived |
235 | - * reference is for intra file or inter file, if it's | 236 | + * reference is for intra file or inter file, if it's |
236 | - * inter-file return and stop further processing. | 237 | + * inter-file return and stop further processing. |
237 | - */ | 238 | + */ |
238 | if (isExternalPrefixPresent(node)) { | 239 | if (isExternalPrefixPresent(node)) { |
239 | /* | 240 | /* |
240 | - * Update the resolution type to partially resolved for all | 241 | + * Update the resolution type to partially resolved for |
241 | - * type/uses in stack | 242 | + * all type/uses in stack |
242 | */ | 243 | */ |
243 | updateResolutionTypeToPartial(); | 244 | updateResolutionTypeToPartial(); |
244 | return true; | 245 | return true; |
245 | } else { | 246 | } else { |
246 | - /* | 247 | + /* |
247 | - * If prefix is not present it indicates intra-file | 248 | + * If prefix is not present it indicates intra-file |
248 | - * dependency in this case set the node back to first | 249 | + * dependency in this case set the node back to first |
249 | - * child, as referred entity may appear in any order | 250 | + * child, as referred entity may appear in any order and |
250 | - * and continue with the resolution. | 251 | + * continue with the resolution. |
251 | - */ | 252 | + */ |
252 | isMoreReferenceDetected = true; | 253 | isMoreReferenceDetected = true; |
253 | return false; | 254 | return false; |
254 | } | 255 | } |
... | @@ -265,26 +266,26 @@ public class YangResolutionInfo<T> { | ... | @@ -265,26 +266,26 @@ public class YangResolutionInfo<T> { |
265 | */ | 266 | */ |
266 | private void updateResolutionTypeToPartial() throws DataModelException { | 267 | private void updateResolutionTypeToPartial() throws DataModelException { |
267 | // For all entries in stack calls for the resolution in type/uses. | 268 | // For all entries in stack calls for the resolution in type/uses. |
268 | - for (T entity:getPartialResolvedStack()) { | 269 | + for (T entity : getPartialResolvedStack()) { |
269 | if (!(entity instanceof Resolvable)) { | 270 | if (!(entity instanceof Resolvable)) { |
270 | throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses"); | 271 | throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses"); |
271 | } | 272 | } |
272 | if (((Resolvable) entity).getResolvableStatus() == ResolvableStatus.UNRESOLVED) { | 273 | if (((Resolvable) entity).getResolvableStatus() == ResolvableStatus.UNRESOLVED) { |
273 | - // Set the resolution status in inside the type/uses. | 274 | + // Sets the resolution status in inside the type/uses. |
274 | ((Resolvable) entity).setResolvableStatus(ResolvableStatus.PARTIALLY_RESOLVED); | 275 | ((Resolvable) entity).setResolvableStatus(ResolvableStatus.PARTIALLY_RESOLVED); |
275 | } | 276 | } |
276 | } | 277 | } |
277 | } | 278 | } |
278 | 279 | ||
279 | /** | 280 | /** |
280 | - * Add referred type/uses to the stack and resolve the stack. | 281 | + * Adds referred type/uses to the stack and resolve the stack. |
281 | * | 282 | * |
282 | * @param node typedef/grouping node | 283 | * @param node typedef/grouping node |
283 | * @throws DataModelException a violation of data model rules | 284 | * @throws DataModelException a violation of data model rules |
284 | */ | 285 | */ |
285 | private void resolveStackAndAddToStack(YangNode node) throws DataModelException { | 286 | private void resolveStackAndAddToStack(YangNode node) throws DataModelException { |
286 | if (getEntityToResolve() instanceof YangType) { | 287 | if (getEntityToResolve() instanceof YangType) { |
287 | - // Add to the stack only for YANG typedef. | 288 | + // Adds to the stack only for YANG typedef. |
288 | getPartialResolvedStack().push((T) ((YangTypeDef) node).getDataType()); | 289 | getPartialResolvedStack().push((T) ((YangTypeDef) node).getDataType()); |
289 | } | 290 | } |
290 | // Don't add to stack in case of YANG grouping. | 291 | // Don't add to stack in case of YANG grouping. |
... | @@ -303,13 +304,13 @@ public class YangResolutionInfo<T> { | ... | @@ -303,13 +304,13 @@ public class YangResolutionInfo<T> { |
303 | /* | 304 | /* |
304 | * Checks if type is partially resolved. | 305 | * Checks if type is partially resolved. |
305 | */ | 306 | */ |
306 | - if (((YangType) getPartialResolvedStack().peek()).getResolvableStatus() == | 307 | + if (((YangType) getPartialResolvedStack().peek()) |
307 | - ResolvableStatus.PARTIALLY_RESOLVED) { | 308 | + .getResolvableStatus() == ResolvableStatus.PARTIALLY_RESOLVED) { |
308 | return true; | 309 | return true; |
309 | } | 310 | } |
310 | } else if (getPartialResolvedStack().peek() instanceof YangUses) { | 311 | } else if (getPartialResolvedStack().peek() instanceof YangUses) { |
311 | - if (((YangUses) getPartialResolvedStack().peek()).getResolvableStatus() == | 312 | + if (((YangUses) getPartialResolvedStack().peek()) |
312 | - ResolvableStatus.PARTIALLY_RESOLVED) { | 313 | + .getResolvableStatus() == ResolvableStatus.PARTIALLY_RESOLVED) { |
313 | return true; | 314 | return true; |
314 | } | 315 | } |
315 | } | 316 | } |
... | @@ -326,13 +327,11 @@ public class YangResolutionInfo<T> { | ... | @@ -326,13 +327,11 @@ public class YangResolutionInfo<T> { |
326 | /* | 327 | /* |
327 | * Checks if type is partially resolved. | 328 | * Checks if type is partially resolved. |
328 | */ | 329 | */ |
329 | - if (((YangType) getPartialResolvedStack().peek()).getResolvableStatus() == | 330 | + if (((YangType) getPartialResolvedStack().peek()).getResolvableStatus() == ResolvableStatus.RESOLVED) { |
330 | - ResolvableStatus.RESOLVED) { | ||
331 | return true; | 331 | return true; |
332 | } | 332 | } |
333 | } else if (getPartialResolvedStack().peek() instanceof YangUses) { | 333 | } else if (getPartialResolvedStack().peek() instanceof YangUses) { |
334 | - if (((YangUses) getPartialResolvedStack().peek()).getResolvableStatus() == | 334 | + if (((YangUses) getPartialResolvedStack().peek()).getResolvableStatus() == ResolvableStatus.RESOLVED) { |
335 | - ResolvableStatus.RESOLVED) { | ||
336 | return true; | 335 | return true; |
337 | } | 336 | } |
338 | } | 337 | } |
... | @@ -361,7 +360,6 @@ public class YangResolutionInfo<T> { | ... | @@ -361,7 +360,6 @@ public class YangResolutionInfo<T> { |
361 | return false; | 360 | return false; |
362 | } | 361 | } |
363 | 362 | ||
364 | - | ||
365 | /** | 363 | /** |
366 | * Check if node name is same as name in resolution info, i.e. name of | 364 | * Check if node name is same as name in resolution info, i.e. name of |
367 | * typedef/grouping is same as name of type/uses. | 365 | * typedef/grouping is same as name of type/uses. |
... | @@ -387,7 +385,7 @@ public class YangResolutionInfo<T> { | ... | @@ -387,7 +385,7 @@ public class YangResolutionInfo<T> { |
387 | } | 385 | } |
388 | 386 | ||
389 | /** | 387 | /** |
390 | - * Add reference of grouping/typedef in uses/type. | 388 | + * Adds reference of grouping/typedef in uses/type. |
391 | * | 389 | * |
392 | * @param node grouping/typedef node | 390 | * @param node grouping/typedef node |
393 | * @throws DataModelException a violation of data model rules | 391 | * @throws DataModelException a violation of data model rules |
... | @@ -457,30 +455,30 @@ public class YangResolutionInfo<T> { | ... | @@ -457,30 +455,30 @@ public class YangResolutionInfo<T> { |
457 | */ | 455 | */ |
458 | private void resolveCompleteStack() throws DataModelException { | 456 | private void resolveCompleteStack() throws DataModelException { |
459 | // For all entries in stack calls for the resolution in type/uses. | 457 | // For all entries in stack calls for the resolution in type/uses. |
460 | - for (T entity:getPartialResolvedStack()) { | 458 | + for (T entity : getPartialResolvedStack()) { |
461 | if (!(entity instanceof Resolvable)) { | 459 | if (!(entity instanceof Resolvable)) { |
462 | throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses"); | 460 | throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses"); |
463 | } | 461 | } |
464 | ((Resolvable) entity).resolve(); | 462 | ((Resolvable) entity).resolve(); |
465 | - // Set the resolution status in inside the type/uses. | 463 | + // Sets the resolution status in inside the type/uses. |
466 | ((Resolvable) entity).setResolvableStatus(ResolvableStatus.RESOLVED); | 464 | ((Resolvable) entity).setResolvableStatus(ResolvableStatus.RESOLVED); |
467 | } | 465 | } |
468 | /* | 466 | /* |
469 | - * Set the resolution status in resolution info present in resolution | 467 | + * Sets the resolution status in resolution info present in resolution |
470 | * list. | 468 | * list. |
471 | */ | 469 | */ |
472 | setIsResolved(true); | 470 | setIsResolved(true); |
473 | } | 471 | } |
474 | 472 | ||
475 | /** | 473 | /** |
476 | - * Add to partial resolved stack. | 474 | + * Adds to partial resolved stack. |
477 | * | 475 | * |
478 | * @param node grouping/typedef node | 476 | * @param node grouping/typedef node |
479 | * @throws DataModelException a violation of data model rules | 477 | * @throws DataModelException a violation of data model rules |
480 | */ | 478 | */ |
481 | private void addToPartialResolvedStack(YangNode node) throws DataModelException { | 479 | private void addToPartialResolvedStack(YangNode node) throws DataModelException { |
482 | if (getPartialResolvedStack().peek() instanceof YangType) { | 480 | if (getPartialResolvedStack().peek() instanceof YangType) { |
483 | - // Add to the stack only for YANG typedef. | 481 | + // Adds to the stack only for YANG typedef. |
484 | getPartialResolvedStack().push((T) ((YangTypeDef) node).getDataType()); | 482 | getPartialResolvedStack().push((T) ((YangTypeDef) node).getDataType()); |
485 | } else if (getPartialResolvedStack().peek() instanceof YangUses) { | 483 | } else if (getPartialResolvedStack().peek() instanceof YangUses) { |
486 | getPartialResolvedStack().push((T) getUsesInGrouping(node)); | 484 | getPartialResolvedStack().push((T) getUsesInGrouping(node)); |
... | @@ -522,7 +520,7 @@ public class YangResolutionInfo<T> { | ... | @@ -522,7 +520,7 @@ public class YangResolutionInfo<T> { |
522 | } | 520 | } |
523 | 521 | ||
524 | /** | 522 | /** |
525 | - * Set prefix of imported module. | 523 | + * Sets prefix of imported module. |
526 | * | 524 | * |
527 | * @param prefix of imported module | 525 | * @param prefix of imported module |
528 | */ | 526 | */ |
... | @@ -540,7 +538,7 @@ public class YangResolutionInfo<T> { | ... | @@ -540,7 +538,7 @@ public class YangResolutionInfo<T> { |
540 | } | 538 | } |
541 | 539 | ||
542 | /** | 540 | /** |
543 | - * Set parsable entity to be resolved. | 541 | + * Sets parsable entity to be resolved. |
544 | * | 542 | * |
545 | * @param entityToResolve YANG entity to be resolved | 543 | * @param entityToResolve YANG entity to be resolved |
546 | */ | 544 | */ |
... | @@ -558,7 +556,7 @@ public class YangResolutionInfo<T> { | ... | @@ -558,7 +556,7 @@ public class YangResolutionInfo<T> { |
558 | } | 556 | } |
559 | 557 | ||
560 | /** | 558 | /** |
561 | - * Set parent YANG node holder for the entity to be resolved. | 559 | + * Sets parent YANG node holder for the entity to be resolved. |
562 | * | 560 | * |
563 | * @param holderOfEntityToResolve parent YANG node holder | 561 | * @param holderOfEntityToResolve parent YANG node holder |
564 | */ | 562 | */ |
... | @@ -576,7 +574,7 @@ public class YangResolutionInfo<T> { | ... | @@ -576,7 +574,7 @@ public class YangResolutionInfo<T> { |
576 | } | 574 | } |
577 | 575 | ||
578 | /** | 576 | /** |
579 | - * Set error position. | 577 | + * Sets error position. |
580 | * | 578 | * |
581 | * @param charPosition position of error | 579 | * @param charPosition position of error |
582 | */ | 580 | */ |
... | @@ -594,7 +592,7 @@ public class YangResolutionInfo<T> { | ... | @@ -594,7 +592,7 @@ public class YangResolutionInfo<T> { |
594 | } | 592 | } |
595 | 593 | ||
596 | /** | 594 | /** |
597 | - * Set error character position in line. | 595 | + * Sets error character position in line. |
598 | * | 596 | * |
599 | * @param lineNumber error character position in line | 597 | * @param lineNumber error character position in line |
600 | */ | 598 | */ |
... | @@ -612,7 +610,7 @@ public class YangResolutionInfo<T> { | ... | @@ -612,7 +610,7 @@ public class YangResolutionInfo<T> { |
612 | } | 610 | } |
613 | 611 | ||
614 | /** | 612 | /** |
615 | - * Set status of resolution. | 613 | + * Sets status of resolution. |
616 | * | 614 | * |
617 | * @param isResolved resolution status | 615 | * @param isResolved resolution status |
618 | */ | 616 | */ |
... | @@ -630,7 +628,7 @@ public class YangResolutionInfo<T> { | ... | @@ -630,7 +628,7 @@ public class YangResolutionInfo<T> { |
630 | } | 628 | } |
631 | 629 | ||
632 | /** | 630 | /** |
633 | - * Set stack of YANG type with partially resolved YANG construct hierarchy. | 631 | + * Sets stack of YANG type with partially resolved YANG construct hierarchy. |
634 | * | 632 | * |
635 | * @param partialResolvedStack partial resolved YANG construct stack | 633 | * @param partialResolvedStack partial resolved YANG construct stack |
636 | */ | 634 | */ | ... | ... |
... | @@ -40,7 +40,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -40,7 +40,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
40 | * +--------------+---------+-------------+------------------+ | 40 | * +--------------+---------+-------------+------------------+ |
41 | */ | 41 | */ |
42 | /** | 42 | /** |
43 | - * Maintains the information about the revision. | 43 | + * Represents the information about the revision. |
44 | */ | 44 | */ |
45 | public class YangRevision implements YangDesc, YangReference, Parsable { | 45 | public class YangRevision implements YangDesc, YangReference, Parsable { |
46 | 46 | ||
... | @@ -60,13 +60,13 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -60,13 +60,13 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
60 | private String reference; | 60 | private String reference; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | - * Default constructor. | 63 | + * Creates a YANG revision object. |
64 | */ | 64 | */ |
65 | public YangRevision() { | 65 | public YangRevision() { |
66 | } | 66 | } |
67 | 67 | ||
68 | /** | 68 | /** |
69 | - * Get the revision date. | 69 | + * Returns the revision date. |
70 | * | 70 | * |
71 | * @return the revision date | 71 | * @return the revision date |
72 | */ | 72 | */ |
... | @@ -75,7 +75,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -75,7 +75,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
78 | - * Set the revision date. | 78 | + * Sets the revision date. |
79 | * | 79 | * |
80 | * @param revDate the revision date to set | 80 | * @param revDate the revision date to set |
81 | */ | 81 | */ |
... | @@ -84,7 +84,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -84,7 +84,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
84 | } | 84 | } |
85 | 85 | ||
86 | /** | 86 | /** |
87 | - * Get the description. | 87 | + * Returns the description. |
88 | * | 88 | * |
89 | * @return the description | 89 | * @return the description |
90 | */ | 90 | */ |
... | @@ -94,7 +94,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -94,7 +94,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
94 | } | 94 | } |
95 | 95 | ||
96 | /** | 96 | /** |
97 | - * Set the description. | 97 | + * Sets the description. |
98 | * | 98 | * |
99 | * @param description set the description | 99 | * @param description set the description |
100 | */ | 100 | */ |
... | @@ -104,7 +104,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -104,7 +104,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
104 | } | 104 | } |
105 | 105 | ||
106 | /** | 106 | /** |
107 | - * Get the textual reference. | 107 | + * Returns the textual reference. |
108 | * | 108 | * |
109 | * @return the reference | 109 | * @return the reference |
110 | */ | 110 | */ |
... | @@ -114,7 +114,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -114,7 +114,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Set the textual reference. | 117 | + * Sets the textual reference. |
118 | * | 118 | * |
119 | * @param reference the reference to set | 119 | * @param reference the reference to set |
120 | */ | 120 | */ |
... | @@ -134,7 +134,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -134,7 +134,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
134 | } | 134 | } |
135 | 135 | ||
136 | /** | 136 | /** |
137 | - * Validate the data on entering the corresponding parse tree node. | 137 | + * Validates the data on entering the corresponding parse tree node. |
138 | * | 138 | * |
139 | * @throws DataModelException a violation of data model rules | 139 | * @throws DataModelException a violation of data model rules |
140 | */ | 140 | */ |
... | @@ -145,7 +145,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { | ... | @@ -145,7 +145,7 @@ public class YangRevision implements YangDesc, YangReference, Parsable { |
145 | } | 145 | } |
146 | 146 | ||
147 | /** | 147 | /** |
148 | - * Validate the data on exiting the corresponding parse tree node. | 148 | + * Validates the data on exiting the corresponding parse tree node. |
149 | * | 149 | * |
150 | * @throws DataModelException a violation of data model rules | 150 | * @throws DataModelException a violation of data model rules |
151 | */ | 151 | */ | ... | ... |
... | @@ -54,10 +54,10 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol | ... | @@ -54,10 +54,10 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.detectCol |
54 | */ | 54 | */ |
55 | 55 | ||
56 | /** | 56 | /** |
57 | - * Data model node to maintain information defined in YANG rpc. | 57 | + * Represents data model node to maintain information defined in YANG rpc. |
58 | */ | 58 | */ |
59 | public class YangRpc extends YangNode implements YangCommonInfo, Parsable, | 59 | public class YangRpc extends YangNode implements YangCommonInfo, Parsable, |
60 | - CollisionDetector { | 60 | + CollisionDetector { |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * Name of the rpc. | 63 | * Name of the rpc. | ... | ... |
... | @@ -18,15 +18,16 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -18,15 +18,16 @@ package org.onosproject.yangutils.datamodel; |
18 | * translator processing of status. | 18 | * translator processing of status. |
19 | */ | 19 | */ |
20 | public interface YangStatus { | 20 | public interface YangStatus { |
21 | + | ||
21 | /** | 22 | /** |
22 | - * Get the status. | 23 | + * Returns the status. |
23 | * | 24 | * |
24 | * @return the status | 25 | * @return the status |
25 | */ | 26 | */ |
26 | YangStatusType getStatus(); | 27 | YangStatusType getStatus(); |
27 | 28 | ||
28 | /** | 29 | /** |
29 | - * Set the status. | 30 | + * Sets the status. |
30 | * | 31 | * |
31 | * @param status the status to set | 32 | * @param status the status to set |
32 | */ | 33 | */ | ... | ... |
... | @@ -25,7 +25,7 @@ import java.math.BigInteger; | ... | @@ -25,7 +25,7 @@ import java.math.BigInteger; |
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | /** | 27 | /** |
28 | - * The restriction for string data type. | 28 | + * Represents the restriction for string data type. |
29 | */ | 29 | */ |
30 | public class YangStringRestriction { | 30 | public class YangStringRestriction { |
31 | 31 | ||
... | @@ -75,51 +75,51 @@ public class YangStringRestriction { | ... | @@ -75,51 +75,51 @@ public class YangStringRestriction { |
75 | private YangPatternRestriction patternRestriction; | 75 | private YangPatternRestriction patternRestriction; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | - * Default constructor. | 78 | + * Creates a YANG string restriction object. |
79 | */ | 79 | */ |
80 | public YangStringRestriction() { | 80 | public YangStringRestriction() { |
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |
84 | - * Get the length restriction on the string data. | 84 | + * Returns the length restriction on the string data. |
85 | * | 85 | * |
86 | - * @return length restriction on the string data. | 86 | + * @return length restriction on the string data |
87 | */ | 87 | */ |
88 | public YangRangeRestriction<BigInteger> getLengthRestriction() { | 88 | public YangRangeRestriction<BigInteger> getLengthRestriction() { |
89 | return lengthRestriction; | 89 | return lengthRestriction; |
90 | } | 90 | } |
91 | 91 | ||
92 | /** | 92 | /** |
93 | - * Set the length restriction on the string data. | 93 | + * Sets the length restriction on the string data. |
94 | * | 94 | * |
95 | - * @param lengthRestriction length restriction on the string data. | 95 | + * @param lengthRestriction length restriction on the string data |
96 | */ | 96 | */ |
97 | public void setLengthRestriction(YangRangeRestriction<BigInteger> lengthRestriction) { | 97 | public void setLengthRestriction(YangRangeRestriction<BigInteger> lengthRestriction) { |
98 | this.lengthRestriction = lengthRestriction; | 98 | this.lengthRestriction = lengthRestriction; |
99 | } | 99 | } |
100 | 100 | ||
101 | /** | 101 | /** |
102 | - * Get the pattern restriction for the type. | 102 | + * Returns the pattern restriction for the type. |
103 | * | 103 | * |
104 | - * @return pattern restriction for the type. | 104 | + * @return pattern restriction for the type |
105 | */ | 105 | */ |
106 | public YangPatternRestriction getPatternRestriction() { | 106 | public YangPatternRestriction getPatternRestriction() { |
107 | return patternRestriction; | 107 | return patternRestriction; |
108 | } | 108 | } |
109 | 109 | ||
110 | /** | 110 | /** |
111 | - * Set the pattern restriction for the type. | 111 | + * Sets the pattern restriction for the type. |
112 | * | 112 | * |
113 | - * @param patternRestriction pattern restriction for the type. | 113 | + * @param patternRestriction pattern restriction for the type |
114 | */ | 114 | */ |
115 | private void setPatternRestriction(YangPatternRestriction patternRestriction) { | 115 | private void setPatternRestriction(YangPatternRestriction patternRestriction) { |
116 | this.patternRestriction = patternRestriction; | 116 | this.patternRestriction = patternRestriction; |
117 | } | 117 | } |
118 | 118 | ||
119 | /** | 119 | /** |
120 | - * Add a new pattern restriction for the type. | 120 | + * Adds a new pattern restriction for the type. |
121 | * | 121 | * |
122 | - * @param newPattern new pattern restriction for the type. | 122 | + * @param newPattern new pattern restriction for the type |
123 | */ | 123 | */ |
124 | public void addPattern(String newPattern) { | 124 | public void addPattern(String newPattern) { |
125 | if (getPatternRestriction() == null) { | 125 | if (getPatternRestriction() == null) { | ... | ... |
... | @@ -17,6 +17,7 @@ package org.onosproject.yangutils.datamodel; | ... | @@ -17,6 +17,7 @@ package org.onosproject.yangutils.datamodel; |
17 | 17 | ||
18 | import java.util.LinkedList; | 18 | import java.util.LinkedList; |
19 | import java.util.List; | 19 | import java.util.List; |
20 | + | ||
20 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 21 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
21 | import org.onosproject.yangutils.parser.Parsable; | 22 | import org.onosproject.yangutils.parser.Parsable; |
22 | import org.onosproject.yangutils.utils.YangConstructType; | 23 | import org.onosproject.yangutils.utils.YangConstructType; |
... | @@ -72,7 +73,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.resolveLi | ... | @@ -72,7 +73,7 @@ import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.resolveLi |
72 | * +--------------+---------+-------------+------------------+ | 73 | * +--------------+---------+-------------+------------------+ |
73 | */ | 74 | */ |
74 | /** | 75 | /** |
75 | - * Data model node to maintain information defined in YANG sub-module. | 76 | + * Represents data model node to maintain information defined in YANG sub-module. |
76 | */ | 77 | */ |
77 | public class YangSubModule extends YangNode | 78 | public class YangSubModule extends YangNode |
78 | implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo { | 79 | implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo { |
... | @@ -183,7 +184,7 @@ public class YangSubModule extends YangNode | ... | @@ -183,7 +184,7 @@ public class YangSubModule extends YangNode |
183 | */ | 184 | */ |
184 | private List<YangResolutionInfo> unresolvedResolutionList; | 185 | private List<YangResolutionInfo> unresolvedResolutionList; |
185 | /** | 186 | /** |
186 | - * Create a sub module node. | 187 | + * Creates a sub module node. |
187 | */ | 188 | */ |
188 | public YangSubModule() { | 189 | public YangSubModule() { |
189 | super(YangNodeType.SUB_MODULE_NODE); | 190 | super(YangNodeType.SUB_MODULE_NODE); |
... | @@ -195,7 +196,7 @@ public class YangSubModule extends YangNode | ... | @@ -195,7 +196,7 @@ public class YangSubModule extends YangNode |
195 | } | 196 | } |
196 | 197 | ||
197 | /** | 198 | /** |
198 | - * Get the YANG name of the sub module. | 199 | + * Returns the YANG name of the sub module. |
199 | * | 200 | * |
200 | * @return YANG name of the sub module | 201 | * @return YANG name of the sub module |
201 | */ | 202 | */ |
... | @@ -205,7 +206,7 @@ public class YangSubModule extends YangNode | ... | @@ -205,7 +206,7 @@ public class YangSubModule extends YangNode |
205 | } | 206 | } |
206 | 207 | ||
207 | /** | 208 | /** |
208 | - * Set YANG name of the sub module. | 209 | + * Sets YANG name of the sub module. |
209 | * | 210 | * |
210 | * @param subModuleName YANG name of the sub module | 211 | * @param subModuleName YANG name of the sub module |
211 | */ | 212 | */ |
... | @@ -215,7 +216,7 @@ public class YangSubModule extends YangNode | ... | @@ -215,7 +216,7 @@ public class YangSubModule extends YangNode |
215 | } | 216 | } |
216 | 217 | ||
217 | /** | 218 | /** |
218 | - * Get the module info. | 219 | + * Returns the module info. |
219 | * | 220 | * |
220 | * @return the belongs to info | 221 | * @return the belongs to info |
221 | */ | 222 | */ |
... | @@ -224,7 +225,7 @@ public class YangSubModule extends YangNode | ... | @@ -224,7 +225,7 @@ public class YangSubModule extends YangNode |
224 | } | 225 | } |
225 | 226 | ||
226 | /** | 227 | /** |
227 | - * Set the module info. | 228 | + * Sets the module info. |
228 | * | 229 | * |
229 | * @param belongsTo module info to set | 230 | * @param belongsTo module info to set |
230 | */ | 231 | */ |
... | @@ -233,7 +234,7 @@ public class YangSubModule extends YangNode | ... | @@ -233,7 +234,7 @@ public class YangSubModule extends YangNode |
233 | } | 234 | } |
234 | 235 | ||
235 | /** | 236 | /** |
236 | - * Get the contact. | 237 | + * Returns the contact. |
237 | * | 238 | * |
238 | * @return the contact | 239 | * @return the contact |
239 | */ | 240 | */ |
... | @@ -242,7 +243,7 @@ public class YangSubModule extends YangNode | ... | @@ -242,7 +243,7 @@ public class YangSubModule extends YangNode |
242 | } | 243 | } |
243 | 244 | ||
244 | /** | 245 | /** |
245 | - * Set the contact. | 246 | + * Sets the contact. |
246 | * | 247 | * |
247 | * @param contact the contact to set | 248 | * @param contact the contact to set |
248 | */ | 249 | */ |
... | @@ -251,7 +252,7 @@ public class YangSubModule extends YangNode | ... | @@ -251,7 +252,7 @@ public class YangSubModule extends YangNode |
251 | } | 252 | } |
252 | 253 | ||
253 | /** | 254 | /** |
254 | - * Get the description. | 255 | + * Returns the description. |
255 | * | 256 | * |
256 | * @return the description | 257 | * @return the description |
257 | */ | 258 | */ |
... | @@ -261,7 +262,7 @@ public class YangSubModule extends YangNode | ... | @@ -261,7 +262,7 @@ public class YangSubModule extends YangNode |
261 | } | 262 | } |
262 | 263 | ||
263 | /** | 264 | /** |
264 | - * Set the description. | 265 | + * Sets the description. |
265 | * | 266 | * |
266 | * @param description set the description | 267 | * @param description set the description |
267 | */ | 268 | */ |
... | @@ -271,7 +272,7 @@ public class YangSubModule extends YangNode | ... | @@ -271,7 +272,7 @@ public class YangSubModule extends YangNode |
271 | } | 272 | } |
272 | 273 | ||
273 | /** | 274 | /** |
274 | - * Get the list of imported modules. | 275 | + * Returns the list of imported modules. |
275 | * | 276 | * |
276 | * @return the list of imported modules | 277 | * @return the list of imported modules |
277 | */ | 278 | */ |
... | @@ -280,7 +281,7 @@ public class YangSubModule extends YangNode | ... | @@ -280,7 +281,7 @@ public class YangSubModule extends YangNode |
280 | } | 281 | } |
281 | 282 | ||
282 | /** | 283 | /** |
283 | - * Add the imported module information to the import list. | 284 | + * Adds the imported module information to the import list. |
284 | * | 285 | * |
285 | * @param importedModule module being imported | 286 | * @param importedModule module being imported |
286 | */ | 287 | */ |
... | @@ -294,7 +295,7 @@ public class YangSubModule extends YangNode | ... | @@ -294,7 +295,7 @@ public class YangSubModule extends YangNode |
294 | } | 295 | } |
295 | 296 | ||
296 | /** | 297 | /** |
297 | - * Get the list of included sub modules. | 298 | + * Returns the list of included sub modules. |
298 | * | 299 | * |
299 | * @return the included list of sub modules | 300 | * @return the included list of sub modules |
300 | */ | 301 | */ |
... | @@ -303,7 +304,7 @@ public class YangSubModule extends YangNode | ... | @@ -303,7 +304,7 @@ public class YangSubModule extends YangNode |
303 | } | 304 | } |
304 | 305 | ||
305 | /** | 306 | /** |
306 | - * Add the included sub module information to the include list. | 307 | + * Returns the included sub module information to the include list. |
307 | * | 308 | * |
308 | * @param includeModule submodule being included | 309 | * @param includeModule submodule being included |
309 | */ | 310 | */ |
... | @@ -335,7 +336,7 @@ public class YangSubModule extends YangNode | ... | @@ -335,7 +336,7 @@ public class YangSubModule extends YangNode |
335 | } | 336 | } |
336 | 337 | ||
337 | /** | 338 | /** |
338 | - * Get the list of leaves. | 339 | + * Returns the list of leaves. |
339 | * | 340 | * |
340 | * @return the list of leaves | 341 | * @return the list of leaves |
341 | */ | 342 | */ |
... | @@ -345,7 +346,7 @@ public class YangSubModule extends YangNode | ... | @@ -345,7 +346,7 @@ public class YangSubModule extends YangNode |
345 | } | 346 | } |
346 | 347 | ||
347 | /** | 348 | /** |
348 | - * Add a leaf. | 349 | + * Adds a leaf. |
349 | * | 350 | * |
350 | * @param leaf the leaf to be added | 351 | * @param leaf the leaf to be added |
351 | */ | 352 | */ |
... | @@ -355,7 +356,7 @@ public class YangSubModule extends YangNode | ... | @@ -355,7 +356,7 @@ public class YangSubModule extends YangNode |
355 | } | 356 | } |
356 | 357 | ||
357 | /** | 358 | /** |
358 | - * Get the list of leaf-list. | 359 | + * Returns the list of leaf-list. |
359 | * | 360 | * |
360 | * @return the list of leaf-list | 361 | * @return the list of leaf-list |
361 | */ | 362 | */ |
... | @@ -365,7 +366,7 @@ public class YangSubModule extends YangNode | ... | @@ -365,7 +366,7 @@ public class YangSubModule extends YangNode |
365 | } | 366 | } |
366 | 367 | ||
367 | /** | 368 | /** |
368 | - * Add a leaf-list. | 369 | + * Adds a leaf-list. |
369 | * | 370 | * |
370 | * @param leafList the leaf-list to be added | 371 | * @param leafList the leaf-list to be added |
371 | */ | 372 | */ |
... | @@ -375,7 +376,7 @@ public class YangSubModule extends YangNode | ... | @@ -375,7 +376,7 @@ public class YangSubModule extends YangNode |
375 | } | 376 | } |
376 | 377 | ||
377 | /** | 378 | /** |
378 | - * Get the sub-modules organization. | 379 | + * Returns the sub-modules organization. |
379 | * | 380 | * |
380 | * @return the organization | 381 | * @return the organization |
381 | */ | 382 | */ |
... | @@ -384,7 +385,7 @@ public class YangSubModule extends YangNode | ... | @@ -384,7 +385,7 @@ public class YangSubModule extends YangNode |
384 | } | 385 | } |
385 | 386 | ||
386 | /** | 387 | /** |
387 | - * Set the sub-modules organization. | 388 | + * Sets the sub-modules organization. |
388 | * | 389 | * |
389 | * @param org the organization to set | 390 | * @param org the organization to set |
390 | */ | 391 | */ |
... | @@ -393,7 +394,7 @@ public class YangSubModule extends YangNode | ... | @@ -393,7 +394,7 @@ public class YangSubModule extends YangNode |
393 | } | 394 | } |
394 | 395 | ||
395 | /** | 396 | /** |
396 | - * Get the textual reference. | 397 | + * Returns the textual reference. |
397 | * | 398 | * |
398 | * @return the reference | 399 | * @return the reference |
399 | */ | 400 | */ |
... | @@ -403,7 +404,7 @@ public class YangSubModule extends YangNode | ... | @@ -403,7 +404,7 @@ public class YangSubModule extends YangNode |
403 | } | 404 | } |
404 | 405 | ||
405 | /** | 406 | /** |
406 | - * Set the textual reference. | 407 | + * Sets the textual reference. |
407 | * | 408 | * |
408 | * @param reference the reference to set | 409 | * @param reference the reference to set |
409 | */ | 410 | */ |
... | @@ -413,7 +414,7 @@ public class YangSubModule extends YangNode | ... | @@ -413,7 +414,7 @@ public class YangSubModule extends YangNode |
413 | } | 414 | } |
414 | 415 | ||
415 | /** | 416 | /** |
416 | - * Get the revision. | 417 | + * Returns the revision. |
417 | * | 418 | * |
418 | * @return the revision | 419 | * @return the revision |
419 | */ | 420 | */ |
... | @@ -422,7 +423,7 @@ public class YangSubModule extends YangNode | ... | @@ -422,7 +423,7 @@ public class YangSubModule extends YangNode |
422 | } | 423 | } |
423 | 424 | ||
424 | /** | 425 | /** |
425 | - * Set the revision. | 426 | + * Sets the revision. |
426 | * | 427 | * |
427 | * @param revision the revision to set | 428 | * @param revision the revision to set |
428 | */ | 429 | */ |
... | @@ -431,7 +432,7 @@ public class YangSubModule extends YangNode | ... | @@ -431,7 +432,7 @@ public class YangSubModule extends YangNode |
431 | } | 432 | } |
432 | 433 | ||
433 | /** | 434 | /** |
434 | - * Get the version. | 435 | + * Returns the version. |
435 | * | 436 | * |
436 | * @return the version | 437 | * @return the version |
437 | */ | 438 | */ |
... | @@ -440,7 +441,7 @@ public class YangSubModule extends YangNode | ... | @@ -440,7 +441,7 @@ public class YangSubModule extends YangNode |
440 | } | 441 | } |
441 | 442 | ||
442 | /** | 443 | /** |
443 | - * Set the version. | 444 | + * Sets the version. |
444 | * | 445 | * |
445 | * @param version the version to set | 446 | * @param version the version to set |
446 | */ | 447 | */ |
... | @@ -459,7 +460,7 @@ public class YangSubModule extends YangNode | ... | @@ -459,7 +460,7 @@ public class YangSubModule extends YangNode |
459 | } | 460 | } |
460 | 461 | ||
461 | /** | 462 | /** |
462 | - * Validate the data on entering the corresponding parse tree node. | 463 | + * Validates the data on entering the corresponding parse tree node. |
463 | * | 464 | * |
464 | * @throws DataModelException a violation of data model rules | 465 | * @throws DataModelException a violation of data model rules |
465 | */ | 466 | */ |
... | @@ -469,7 +470,7 @@ public class YangSubModule extends YangNode | ... | @@ -469,7 +470,7 @@ public class YangSubModule extends YangNode |
469 | } | 470 | } |
470 | 471 | ||
471 | /** | 472 | /** |
472 | - * Validate the data on exiting the corresponding parse tree node. | 473 | + * Validates the data on exiting the corresponding parse tree node. |
473 | * | 474 | * |
474 | * @throws DataModelException a violation of data model rules | 475 | * @throws DataModelException a violation of data model rules |
475 | */ | 476 | */ | ... | ... |
... | @@ -45,7 +45,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -45,7 +45,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
45 | */ | 45 | */ |
46 | 46 | ||
47 | /** | 47 | /** |
48 | - * Maintains the data type information. | 48 | + * Represents the data type information. |
49 | * | 49 | * |
50 | * @param <T> YANG data type info | 50 | * @param <T> YANG data type info |
51 | */ | 51 | */ |
... | @@ -94,7 +94,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -94,7 +94,7 @@ public class YangType<T> implements Parsable, Resolvable { |
94 | private ResolvableStatus resolvableStatus; | 94 | private ResolvableStatus resolvableStatus; |
95 | 95 | ||
96 | /** | 96 | /** |
97 | - * Default constructor. | 97 | + * Creates a YANG type object. |
98 | */ | 98 | */ |
99 | public YangType() { | 99 | public YangType() { |
100 | 100 | ||
... | @@ -112,7 +112,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -112,7 +112,7 @@ public class YangType<T> implements Parsable, Resolvable { |
112 | } | 112 | } |
113 | 113 | ||
114 | /** | 114 | /** |
115 | - * Set prefix associated with data type name. | 115 | + * Sets prefix associated with data type name. |
116 | * | 116 | * |
117 | * @param prefix prefix associated with data type name | 117 | * @param prefix prefix associated with data type name |
118 | */ | 118 | */ |
... | @@ -121,7 +121,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -121,7 +121,7 @@ public class YangType<T> implements Parsable, Resolvable { |
121 | } | 121 | } |
122 | 122 | ||
123 | /** | 123 | /** |
124 | - * Get the name of data type. | 124 | + * Returns the name of data type. |
125 | * | 125 | * |
126 | * @return the name of data type | 126 | * @return the name of data type |
127 | */ | 127 | */ |
... | @@ -130,7 +130,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -130,7 +130,7 @@ public class YangType<T> implements Parsable, Resolvable { |
130 | } | 130 | } |
131 | 131 | ||
132 | /** | 132 | /** |
133 | - * Set the name of the data type. | 133 | + * Sets the name of the data type. |
134 | * | 134 | * |
135 | * @param typeName the name to set | 135 | * @param typeName the name to set |
136 | */ | 136 | */ |
... | @@ -139,7 +139,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -139,7 +139,7 @@ public class YangType<T> implements Parsable, Resolvable { |
139 | } | 139 | } |
140 | 140 | ||
141 | /** | 141 | /** |
142 | - * Get the Java package where the type is defined. | 142 | + * Returns the Java package where the type is defined. |
143 | * | 143 | * |
144 | * @return Java package where the type is defined | 144 | * @return Java package where the type is defined |
145 | */ | 145 | */ |
... | @@ -148,7 +148,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -148,7 +148,7 @@ public class YangType<T> implements Parsable, Resolvable { |
148 | } | 148 | } |
149 | 149 | ||
150 | /** | 150 | /** |
151 | - * Set Java package where the type is defined. | 151 | + * Sets Java package where the type is defined. |
152 | * | 152 | * |
153 | * @param javaPackage Java package where the type is defined | 153 | * @param javaPackage Java package where the type is defined |
154 | */ | 154 | */ |
... | @@ -157,7 +157,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -157,7 +157,7 @@ public class YangType<T> implements Parsable, Resolvable { |
157 | } | 157 | } |
158 | 158 | ||
159 | /** | 159 | /** |
160 | - * Get the type of data. | 160 | + * Returns the type of data. |
161 | * | 161 | * |
162 | * @return the data type | 162 | * @return the data type |
163 | */ | 163 | */ |
... | @@ -166,7 +166,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -166,7 +166,7 @@ public class YangType<T> implements Parsable, Resolvable { |
166 | } | 166 | } |
167 | 167 | ||
168 | /** | 168 | /** |
169 | - * Set the type of data. | 169 | + * Sets the type of data. |
170 | * | 170 | * |
171 | * @param dataType data type | 171 | * @param dataType data type |
172 | */ | 172 | */ |
... | @@ -175,7 +175,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -175,7 +175,7 @@ public class YangType<T> implements Parsable, Resolvable { |
175 | } | 175 | } |
176 | 176 | ||
177 | /** | 177 | /** |
178 | - * Get the data type meta data. | 178 | + * Returns the data type meta data. |
179 | * | 179 | * |
180 | * @return the data type meta data | 180 | * @return the data type meta data |
181 | */ | 181 | */ |
... | @@ -184,7 +184,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -184,7 +184,7 @@ public class YangType<T> implements Parsable, Resolvable { |
184 | } | 184 | } |
185 | 185 | ||
186 | /** | 186 | /** |
187 | - * Set the data type meta data. | 187 | + * Sets the data type meta data. |
188 | * | 188 | * |
189 | * @param dataTypeInfo the meta data to set | 189 | * @param dataTypeInfo the meta data to set |
190 | */ | 190 | */ |
... | @@ -202,7 +202,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -202,7 +202,7 @@ public class YangType<T> implements Parsable, Resolvable { |
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |
205 | - * Set node identifier. | 205 | + * Sets node identifier. |
206 | * | 206 | * |
207 | * @param nodeIdentifier the node identifier | 207 | * @param nodeIdentifier the node identifier |
208 | */ | 208 | */ |
... | @@ -220,7 +220,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -220,7 +220,7 @@ public class YangType<T> implements Parsable, Resolvable { |
220 | } | 220 | } |
221 | 221 | ||
222 | /** | 222 | /** |
223 | - * Set effective built-in type. | 223 | + * Sets effective built-in type. |
224 | * | 224 | * |
225 | * @param effectiveBuiltInType effective built-in type | 225 | * @param effectiveBuiltInType effective built-in type |
226 | */ | 226 | */ |
... | @@ -238,7 +238,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -238,7 +238,7 @@ public class YangType<T> implements Parsable, Resolvable { |
238 | } | 238 | } |
239 | 239 | ||
240 | /** | 240 | /** |
241 | - * Set effective pattern restriction. | 241 | + * Sets effective pattern restriction. |
242 | * | 242 | * |
243 | * @param effectivePatternRestriction effective pattern restriction | 243 | * @param effectivePatternRestriction effective pattern restriction |
244 | */ | 244 | */ |
... | @@ -257,7 +257,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -257,7 +257,7 @@ public class YangType<T> implements Parsable, Resolvable { |
257 | } | 257 | } |
258 | 258 | ||
259 | /** | 259 | /** |
260 | - * Validate the data on entering the corresponding parse tree node. | 260 | + * Validates the data on entering the corresponding parse tree node. |
261 | * | 261 | * |
262 | * @throws DataModelException a violation of data model rules | 262 | * @throws DataModelException a violation of data model rules |
263 | */ | 263 | */ |
... | @@ -268,7 +268,7 @@ public class YangType<T> implements Parsable, Resolvable { | ... | @@ -268,7 +268,7 @@ public class YangType<T> implements Parsable, Resolvable { |
268 | } | 268 | } |
269 | 269 | ||
270 | /** | 270 | /** |
271 | - * Validate the data on exiting the corresponding parse tree node. | 271 | + * Validates the data on exiting the corresponding parse tree node. |
272 | * | 272 | * |
273 | * @throws DataModelException a violation of data model rules | 273 | * @throws DataModelException a violation of data model rules |
274 | */ | 274 | */ | ... | ... |
... | @@ -49,7 +49,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -49,7 +49,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
49 | * +--------------+---------+-------------+------------------+ | 49 | * +--------------+---------+-------------+------------------+ |
50 | */ | 50 | */ |
51 | /** | 51 | /** |
52 | - * Data model node to maintain information defined in YANG typedef. | 52 | + * Represents data model node to maintain information defined in YANG typedef. |
53 | */ | 53 | */ |
54 | public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | 54 | public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
55 | 55 | ||
... | @@ -90,7 +90,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -90,7 +90,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
90 | private String units; | 90 | private String units; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | - * Create a typedef node. | 93 | + * Creates a typedef node. |
94 | */ | 94 | */ |
95 | public YangTypeDef() { | 95 | public YangTypeDef() { |
96 | super(YangNodeType.TYPEDEF_NODE); | 96 | super(YangNodeType.TYPEDEF_NODE); |
... | @@ -106,7 +106,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -106,7 +106,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
106 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
109 | - * Set the default value. | 109 | + * Sets the default value. |
110 | * | 110 | * |
111 | * @param defaultValueInString the default value | 111 | * @param defaultValueInString the default value |
112 | */ | 112 | */ |
... | @@ -125,7 +125,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -125,7 +125,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
125 | } | 125 | } |
126 | 126 | ||
127 | /** | 127 | /** |
128 | - * Set the description. | 128 | + * Sets the description. |
129 | * | 129 | * |
130 | * @param description set the description | 130 | * @param description set the description |
131 | */ | 131 | */ |
... | @@ -145,7 +145,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -145,7 +145,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
145 | } | 145 | } |
146 | 146 | ||
147 | /** | 147 | /** |
148 | - * Set the textual reference. | 148 | + * Sets the textual reference. |
149 | * | 149 | * |
150 | * @param reference the reference to set | 150 | * @param reference the reference to set |
151 | */ | 151 | */ |
... | @@ -165,7 +165,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -165,7 +165,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
165 | } | 165 | } |
166 | 166 | ||
167 | /** | 167 | /** |
168 | - * Set the status. | 168 | + * Sets the status. |
169 | * | 169 | * |
170 | * @param status the status to set | 170 | * @param status the status to set |
171 | */ | 171 | */ |
... | @@ -184,7 +184,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -184,7 +184,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
184 | } | 184 | } |
185 | 185 | ||
186 | /** | 186 | /** |
187 | - * Set the data type. | 187 | + * Sets the data type. |
188 | * | 188 | * |
189 | * @param dataType the data type | 189 | * @param dataType the data type |
190 | */ | 190 | */ |
... | @@ -202,7 +202,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -202,7 +202,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |
205 | - * Set the unit. | 205 | + * Sets the unit. |
206 | * | 206 | * |
207 | * @param units the units to set | 207 | * @param units the units to set |
208 | */ | 208 | */ |
... | @@ -221,7 +221,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -221,7 +221,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
221 | } | 221 | } |
222 | 222 | ||
223 | /** | 223 | /** |
224 | - * Validate the data on entering the corresponding parse tree node. | 224 | + * Validates the data on entering the corresponding parse tree node. |
225 | * | 225 | * |
226 | * @throws DataModelException a violation of data model rules | 226 | * @throws DataModelException a violation of data model rules |
227 | */ | 227 | */ |
... | @@ -231,7 +231,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -231,7 +231,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
231 | } | 231 | } |
232 | 232 | ||
233 | /** | 233 | /** |
234 | - * Validate the data on exiting the corresponding parse tree node. | 234 | + * Validates the data on exiting the corresponding parse tree node. |
235 | * | 235 | * |
236 | * @throws DataModelException a violation of data model rules | 236 | * @throws DataModelException a violation of data model rules |
237 | */ | 237 | */ |
... | @@ -251,7 +251,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { | ... | @@ -251,7 +251,7 @@ public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable { |
251 | } | 251 | } |
252 | 252 | ||
253 | /** | 253 | /** |
254 | - * Set YANG name of the typedef. | 254 | + * Sets YANG name of the typedef. |
255 | * | 255 | * |
256 | * @param name YANG name of the typedef | 256 | * @param name YANG name of the typedef |
257 | */ | 257 | */ | ... | ... |
... | @@ -16,13 +16,13 @@ | ... | @@ -16,13 +16,13 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.datamodel; | 17 | package org.onosproject.yangutils.datamodel; |
18 | 18 | ||
19 | +import java.util.LinkedList; | ||
20 | +import java.util.List; | ||
21 | + | ||
19 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 22 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
20 | import org.onosproject.yangutils.parser.Parsable; | 23 | import org.onosproject.yangutils.parser.Parsable; |
21 | import org.onosproject.yangutils.utils.YangConstructType; | 24 | import org.onosproject.yangutils.utils.YangConstructType; |
22 | 25 | ||
23 | -import java.util.LinkedList; | ||
24 | -import java.util.List; | ||
25 | - | ||
26 | /* | 26 | /* |
27 | * Reference RFC 6020. | 27 | * Reference RFC 6020. |
28 | * | 28 | * |
... | @@ -46,7 +46,7 @@ import java.util.List; | ... | @@ -46,7 +46,7 @@ import java.util.List; |
46 | */ | 46 | */ |
47 | 47 | ||
48 | /** | 48 | /** |
49 | - * Data model node to maintain information defined in YANG union. | 49 | + * Represents data model node to maintain information defined in YANG union. |
50 | */ | 50 | */ |
51 | public class YangUnion implements Parsable { | 51 | public class YangUnion implements Parsable { |
52 | 52 | ||
... | @@ -57,7 +57,7 @@ public class YangUnion implements Parsable { | ... | @@ -57,7 +57,7 @@ public class YangUnion implements Parsable { |
57 | private String unionName; | 57 | private String unionName; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Create a YANG union node. | 60 | + * Creates a YANG union node. |
61 | */ | 61 | */ |
62 | public YangUnion() { | 62 | public YangUnion() { |
63 | typeList = new LinkedList<>(); | 63 | typeList = new LinkedList<>(); |
... | @@ -82,7 +82,7 @@ public class YangUnion implements Parsable { | ... | @@ -82,7 +82,7 @@ public class YangUnion implements Parsable { |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | - * Set the list of YANG type. | 85 | + * Sets the list of YANG type. |
86 | * | 86 | * |
87 | * @param typeList list of YANG type. | 87 | * @param typeList list of YANG type. |
88 | */ | 88 | */ |
... | @@ -91,7 +91,7 @@ public class YangUnion implements Parsable { | ... | @@ -91,7 +91,7 @@ public class YangUnion implements Parsable { |
91 | } | 91 | } |
92 | 92 | ||
93 | /** | 93 | /** |
94 | - * Add YANG type to type list. | 94 | + * Adds YANG type to type list. |
95 | * | 95 | * |
96 | * @param yangType YANG type to be added to list | 96 | * @param yangType YANG type to be added to list |
97 | * @throws DataModelException union member type must not be one of the | 97 | * @throws DataModelException union member type must not be one of the |
... | @@ -106,7 +106,7 @@ public class YangUnion implements Parsable { | ... | @@ -106,7 +106,7 @@ public class YangUnion implements Parsable { |
106 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
109 | - * Set the union name. | 109 | + * Sets the union name. |
110 | * | 110 | * |
111 | * @param unionName name of the union. | 111 | * @param unionName name of the union. |
112 | */ | 112 | */ | ... | ... |
... | @@ -49,8 +49,7 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -49,8 +49,7 @@ import org.onosproject.yangutils.utils.YangConstructType; |
49 | * +--------------+---------+-------------+------------------+ | 49 | * +--------------+---------+-------------+------------------+ |
50 | */ | 50 | */ |
51 | /** | 51 | /** |
52 | - * Data model node to maintain information defined in YANG uses. | 52 | + * Represents data model node to maintain information defined in YANG uses. |
53 | - * | ||
54 | */ | 53 | */ |
55 | public class YangUses extends YangNode implements YangCommonInfo, Parsable, Resolvable { | 54 | public class YangUses extends YangNode implements YangCommonInfo, Parsable, Resolvable { |
56 | 55 | ||
... | @@ -88,7 +87,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -88,7 +87,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
88 | private ResolvableStatus resolvableStatus; | 87 | private ResolvableStatus resolvableStatus; |
89 | 88 | ||
90 | /** | 89 | /** |
91 | - * Create an YANG uses node. | 90 | + * Creates an YANG uses node. |
92 | */ | 91 | */ |
93 | public YangUses() { | 92 | public YangUses() { |
94 | super(YangNodeType.USES_NODE); | 93 | super(YangNodeType.USES_NODE); |
... | @@ -106,7 +105,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -106,7 +105,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
106 | } | 105 | } |
107 | 106 | ||
108 | /** | 107 | /** |
109 | - * Set the referred group. | 108 | + * Sets the referred group. |
110 | * | 109 | * |
111 | * @param refGroup the referred group | 110 | * @param refGroup the referred group |
112 | */ | 111 | */ |
... | @@ -125,7 +124,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -125,7 +124,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
125 | } | 124 | } |
126 | 125 | ||
127 | /** | 126 | /** |
128 | - * Set the description. | 127 | + * Sets the description. |
129 | * | 128 | * |
130 | * @param description set the description | 129 | * @param description set the description |
131 | */ | 130 | */ |
... | @@ -145,7 +144,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -145,7 +144,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
145 | } | 144 | } |
146 | 145 | ||
147 | /** | 146 | /** |
148 | - * Set the textual reference. | 147 | + * Sets the textual reference. |
149 | * | 148 | * |
150 | * @param reference the reference to set | 149 | * @param reference the reference to set |
151 | */ | 150 | */ |
... | @@ -165,7 +164,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -165,7 +164,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
165 | } | 164 | } |
166 | 165 | ||
167 | /** | 166 | /** |
168 | - * Set the status. | 167 | + * Sets the status. |
169 | * | 168 | * |
170 | * @param status the status to set | 169 | * @param status the status to set |
171 | */ | 170 | */ |
... | @@ -185,7 +184,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -185,7 +184,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
185 | } | 184 | } |
186 | 185 | ||
187 | /** | 186 | /** |
188 | - * Validate the data on entering the corresponding parse tree node. | 187 | + * Validates the data on entering the corresponding parse tree node. |
189 | * | 188 | * |
190 | * @throws DataModelException a violation of data model rules | 189 | * @throws DataModelException a violation of data model rules |
191 | */ | 190 | */ |
... | @@ -195,7 +194,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -195,7 +194,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
195 | } | 194 | } |
196 | 195 | ||
197 | /** | 196 | /** |
198 | - * Validate the data on exiting the corresponding parse tree node. | 197 | + * Validates the data on exiting the corresponding parse tree node. |
199 | * | 198 | * |
200 | * @throws DataModelException a violation of data model rules | 199 | * @throws DataModelException a violation of data model rules |
201 | */ | 200 | */ |
... | @@ -224,7 +223,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso | ... | @@ -224,7 +223,7 @@ public class YangUses extends YangNode implements YangCommonInfo, Parsable, Reso |
224 | } | 223 | } |
225 | 224 | ||
226 | /** | 225 | /** |
227 | - * Set node identifier. | 226 | + * Sets node identifier. |
228 | * | 227 | * |
229 | * @param nodeIdentifier the node identifier | 228 | * @param nodeIdentifier the node identifier |
230 | */ | 229 | */ | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java
... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
16 | package org.onosproject.yangutils.datamodel.exceptions; | 16 | package org.onosproject.yangutils.datamodel.exceptions; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | - * Base class for exceptions in data model operations. | 19 | + * Represents base class for exceptions in data model operations. |
20 | */ | 20 | */ |
21 | public class DataModelException extends Exception { | 21 | public class DataModelException extends Exception { |
22 | 22 | ||
... | @@ -25,7 +25,7 @@ public class DataModelException extends Exception { | ... | @@ -25,7 +25,7 @@ public class DataModelException extends Exception { |
25 | private int charPositionInLine; | 25 | private int charPositionInLine; |
26 | 26 | ||
27 | /** | 27 | /** |
28 | - * Constructor to create a data model exception with message. | 28 | + * Creates a data model exception with message. |
29 | * | 29 | * |
30 | * @param message the detail of exception in string | 30 | * @param message the detail of exception in string |
31 | */ | 31 | */ |
... | @@ -34,7 +34,7 @@ public class DataModelException extends Exception { | ... | @@ -34,7 +34,7 @@ public class DataModelException extends Exception { |
34 | } | 34 | } |
35 | 35 | ||
36 | /** | 36 | /** |
37 | - * Constructor to create exception from message and cause. | 37 | + * Creates exception from message and cause. |
38 | * | 38 | * |
39 | * @param message the detail of exception in string | 39 | * @param message the detail of exception in string |
40 | * @param cause underlying cause of the error | 40 | * @param cause underlying cause of the error |
... | @@ -44,7 +44,7 @@ public class DataModelException extends Exception { | ... | @@ -44,7 +44,7 @@ public class DataModelException extends Exception { |
44 | } | 44 | } |
45 | 45 | ||
46 | /** | 46 | /** |
47 | - * Constructor to create exception from cause. | 47 | + * Creates exception from cause. |
48 | * | 48 | * |
49 | * @param cause underlying cause of the error | 49 | * @param cause underlying cause of the error |
50 | */ | 50 | */ | ... | ... |
... | @@ -17,6 +17,7 @@ | ... | @@ -17,6 +17,7 @@ |
17 | package org.onosproject.yangutils.datamodel.utils; | 17 | package org.onosproject.yangutils.datamodel.utils; |
18 | 18 | ||
19 | import java.util.List; | 19 | import java.util.List; |
20 | + | ||
20 | import org.onosproject.yangutils.datamodel.CollisionDetector; | 21 | import org.onosproject.yangutils.datamodel.CollisionDetector; |
21 | import org.onosproject.yangutils.datamodel.HasResolutionInfo; | 22 | import org.onosproject.yangutils.datamodel.HasResolutionInfo; |
22 | import org.onosproject.yangutils.datamodel.YangLeaf; | 23 | import org.onosproject.yangutils.datamodel.YangLeaf; |
... | @@ -28,7 +29,7 @@ import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | ... | @@ -28,7 +29,7 @@ import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
28 | import org.onosproject.yangutils.utils.YangConstructType; | 29 | import org.onosproject.yangutils.utils.YangConstructType; |
29 | 30 | ||
30 | /** | 31 | /** |
31 | - * Utilities for data model tree. | 32 | + * Represents utilities for data model tree. |
32 | */ | 33 | */ |
33 | public final class DataModelUtils { | 34 | public final class DataModelUtils { |
34 | 35 | ||
... | @@ -49,6 +50,7 @@ public final class DataModelUtils { | ... | @@ -49,6 +50,7 @@ public final class DataModelUtils { |
49 | */ | 50 | */ |
50 | public static void detectCollidingChildUtil(String identifierName, YangConstructType dataType, YangNode node) | 51 | public static void detectCollidingChildUtil(String identifierName, YangConstructType dataType, YangNode node) |
51 | throws DataModelException { | 52 | throws DataModelException { |
53 | + | ||
52 | if (dataType == YangConstructType.LEAF_DATA) { | 54 | if (dataType == YangConstructType.LEAF_DATA) { |
53 | YangLeavesHolder leavesHolder = (YangLeavesHolder) node; | 55 | YangLeavesHolder leavesHolder = (YangLeavesHolder) node; |
54 | if (leavesHolder.getListOfLeaf() != null) { | 56 | if (leavesHolder.getListOfLeaf() != null) { |
... | @@ -78,8 +80,9 @@ public final class DataModelUtils { | ... | @@ -78,8 +80,9 @@ public final class DataModelUtils { |
78 | * checked | 80 | * checked |
79 | * @throws DataModelException a violation of data model rules | 81 | * @throws DataModelException a violation of data model rules |
80 | */ | 82 | */ |
81 | - private static void detectCollidingLeaf(YangLeavesHolder leavesHolder, String identifierName) throws | 83 | + private static void detectCollidingLeaf(YangLeavesHolder leavesHolder, String identifierName) |
82 | - DataModelException { | 84 | + throws DataModelException { |
85 | + | ||
83 | for (YangLeaf leaf : leavesHolder.getListOfLeaf()) { | 86 | for (YangLeaf leaf : leavesHolder.getListOfLeaf()) { |
84 | if (leaf.getLeafName().equals(identifierName)) { | 87 | if (leaf.getLeafName().equals(identifierName)) { |
85 | throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf \"" | 88 | throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf \"" |
... | @@ -96,8 +99,9 @@ public final class DataModelUtils { | ... | @@ -96,8 +99,9 @@ public final class DataModelUtils { |
96 | * checked | 99 | * checked |
97 | * @throws DataModelException a violation of data model rules | 100 | * @throws DataModelException a violation of data model rules |
98 | */ | 101 | */ |
99 | - private static void detectCollidingLeafList(YangLeavesHolder leavesHolder, String identifierName) throws | 102 | + private static void detectCollidingLeafList(YangLeavesHolder leavesHolder, String identifierName) |
100 | - DataModelException { | 103 | + throws DataModelException { |
104 | + | ||
101 | for (YangLeafList leafList : leavesHolder.getListOfLeafList()) { | 105 | for (YangLeafList leafList : leavesHolder.getListOfLeafList()) { |
102 | if (leafList.getLeafName().equals(identifierName)) { | 106 | if (leafList.getLeafName().equals(identifierName)) { |
103 | throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf " + | 107 | throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf " + |
... | @@ -114,6 +118,7 @@ public final class DataModelUtils { | ... | @@ -114,6 +118,7 @@ public final class DataModelUtils { |
114 | * @throws DataModelException a violation of data model rules | 118 | * @throws DataModelException a violation of data model rules |
115 | */ | 119 | */ |
116 | public static void addResolutionInfo(YangResolutionInfo resolutionInfo) throws DataModelException { | 120 | public static void addResolutionInfo(YangResolutionInfo resolutionInfo) throws DataModelException { |
121 | + | ||
117 | /* get the module node to add maintain the list of nested reference */ | 122 | /* get the module node to add maintain the list of nested reference */ |
118 | YangNode curNode = resolutionInfo.getHolderOfEntityToResolve(); | 123 | YangNode curNode = resolutionInfo.getHolderOfEntityToResolve(); |
119 | while (!(curNode instanceof HasResolutionInfo)) { | 124 | while (!(curNode instanceof HasResolutionInfo)) { |
... | @@ -134,8 +139,9 @@ public final class DataModelUtils { | ... | @@ -134,8 +139,9 @@ public final class DataModelUtils { |
134 | * @throws DataModelException a violation of data model rules | 139 | * @throws DataModelException a violation of data model rules |
135 | */ | 140 | */ |
136 | public static void resolveLinkingForResolutionList(List<YangResolutionInfo> resolutionList, | 141 | public static void resolveLinkingForResolutionList(List<YangResolutionInfo> resolutionList, |
137 | - HasResolutionInfo resolutionInfoNode) | 142 | + HasResolutionInfo resolutionInfoNode) |
138 | throws DataModelException { | 143 | throws DataModelException { |
144 | + | ||
139 | for (YangResolutionInfo resolutionInfo : resolutionList) { | 145 | for (YangResolutionInfo resolutionInfo : resolutionList) { |
140 | if (resolutionInfo.getPrefix() == null || | 146 | if (resolutionInfo.getPrefix() == null || |
141 | resolutionInfo.getPrefix().equals(resolutionInfoNode.getPrefix())) { | 147 | resolutionInfo.getPrefix().equals(resolutionInfoNode.getPrefix())) { | ... | ... |
... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
16 | package org.onosproject.yangutils.datamodel.utils; | 16 | package org.onosproject.yangutils.datamodel.utils; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | - * The target language in which the YANG information is modeled. | 19 | + * Represents the target language in which the YANG information is modeled. |
20 | */ | 20 | */ |
21 | public enum GeneratedLanguage { | 21 | public enum GeneratedLanguage { |
22 | /** | 22 | /** | ... | ... |
... | @@ -46,12 +46,12 @@ import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaOutput; | ... | @@ -46,12 +46,12 @@ import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaOutput; |
46 | import org.onosproject.yangutils.translator.exception.TranslatorException; | 46 | import org.onosproject.yangutils.translator.exception.TranslatorException; |
47 | 47 | ||
48 | /** | 48 | /** |
49 | - * Factory to create data model objects based on the target file type. | 49 | + *Represents factory to create data model objects based on the target file type. |
50 | */ | 50 | */ |
51 | public final class YangDataModelFactory { | 51 | public final class YangDataModelFactory { |
52 | 52 | ||
53 | /** | 53 | /** |
54 | - * Utility class, hence private to prevent creating objects. | 54 | + * Creates a YANG data model factory object. |
55 | */ | 55 | */ |
56 | private YangDataModelFactory() { | 56 | private YangDataModelFactory() { |
57 | } | 57 | } |
... | @@ -75,7 +75,7 @@ public final class YangDataModelFactory { | ... | @@ -75,7 +75,7 @@ public final class YangDataModelFactory { |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
78 | - * Based on the target language generate the inherited data model node. | 78 | + * Returns based on the target language generate the inherited data model node. |
79 | * | 79 | * |
80 | * @param targetLanguage target language in which YANG mapping needs to be | 80 | * @param targetLanguage target language in which YANG mapping needs to be |
81 | * generated | 81 | * generated |
... | @@ -93,7 +93,7 @@ public final class YangDataModelFactory { | ... | @@ -93,7 +93,7 @@ public final class YangDataModelFactory { |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | - * Based on the target language generate the inherited data model node. | 96 | + * Returns based on the target language generate the inherited data model node. |
97 | * | 97 | * |
98 | * @param targetLanguage target language in which YANG mapping needs to be | 98 | * @param targetLanguage target language in which YANG mapping needs to be |
99 | * generated | 99 | * generated |
... | @@ -111,7 +111,7 @@ public final class YangDataModelFactory { | ... | @@ -111,7 +111,7 @@ public final class YangDataModelFactory { |
111 | } | 111 | } |
112 | 112 | ||
113 | /** | 113 | /** |
114 | - * Based on the target language generate the inherited data model node. | 114 | + * Returns based on the target language generate the inherited data model node. |
115 | * | 115 | * |
116 | * @param targetLanguage target language in which YANG mapping needs to be | 116 | * @param targetLanguage target language in which YANG mapping needs to be |
117 | * generated | 117 | * generated |
... | @@ -129,7 +129,7 @@ public final class YangDataModelFactory { | ... | @@ -129,7 +129,7 @@ public final class YangDataModelFactory { |
129 | } | 129 | } |
130 | 130 | ||
131 | /** | 131 | /** |
132 | - * Based on the target language generate the inherited data model node. | 132 | + * Returns based on the target language generate the inherited data model node. |
133 | * | 133 | * |
134 | * @param targetLanguage target language in which YANG mapping needs to be | 134 | * @param targetLanguage target language in which YANG mapping needs to be |
135 | * generated | 135 | * generated |
... | @@ -147,7 +147,7 @@ public final class YangDataModelFactory { | ... | @@ -147,7 +147,7 @@ public final class YangDataModelFactory { |
147 | } | 147 | } |
148 | 148 | ||
149 | /** | 149 | /** |
150 | - * Based on the target language generate the inherited data model node. | 150 | + * Returns based on the target language generate the inherited data model node. |
151 | * | 151 | * |
152 | * @param targetLanguage target language in which YANG mapping needs to be | 152 | * @param targetLanguage target language in which YANG mapping needs to be |
153 | * generated | 153 | * generated |
... | @@ -165,7 +165,7 @@ public final class YangDataModelFactory { | ... | @@ -165,7 +165,7 @@ public final class YangDataModelFactory { |
165 | } | 165 | } |
166 | 166 | ||
167 | /** | 167 | /** |
168 | - * Based on the target language generate the inherited data model node. | 168 | + * Returns based on the target language generate the inherited data model node. |
169 | * | 169 | * |
170 | * @param targetLanguage target language in which YANG mapping needs to be | 170 | * @param targetLanguage target language in which YANG mapping needs to be |
171 | * generated | 171 | * generated |
... | @@ -183,7 +183,7 @@ public final class YangDataModelFactory { | ... | @@ -183,7 +183,7 @@ public final class YangDataModelFactory { |
183 | } | 183 | } |
184 | 184 | ||
185 | /** | 185 | /** |
186 | - * Based on the target language generate the inherited data model node. | 186 | + * Returns based on the target language generate the inherited data model node. |
187 | * | 187 | * |
188 | * @param targetLanguage target language in which YANG mapping needs to be | 188 | * @param targetLanguage target language in which YANG mapping needs to be |
189 | * generated | 189 | * generated |
... | @@ -201,7 +201,7 @@ public final class YangDataModelFactory { | ... | @@ -201,7 +201,7 @@ public final class YangDataModelFactory { |
201 | } | 201 | } |
202 | 202 | ||
203 | /** | 203 | /** |
204 | - * Based on the target language generate the inherited data model node. | 204 | + * Returns based on the target language generate the inherited data model node. |
205 | * | 205 | * |
206 | * @param targetLanguage target language in which YANG mapping needs to be | 206 | * @param targetLanguage target language in which YANG mapping needs to be |
207 | * generated | 207 | * generated |
... | @@ -219,7 +219,7 @@ public final class YangDataModelFactory { | ... | @@ -219,7 +219,7 @@ public final class YangDataModelFactory { |
219 | } | 219 | } |
220 | 220 | ||
221 | /** | 221 | /** |
222 | - * Based on the target language generate the inherited data model node. | 222 | + * Returns based on the target language generate the inherited data model node. |
223 | * | 223 | * |
224 | * @param targetLanguage target language in which YANG mapping needs to be | 224 | * @param targetLanguage target language in which YANG mapping needs to be |
225 | * generated | 225 | * generated |
... | @@ -237,7 +237,7 @@ public final class YangDataModelFactory { | ... | @@ -237,7 +237,7 @@ public final class YangDataModelFactory { |
237 | } | 237 | } |
238 | 238 | ||
239 | /** | 239 | /** |
240 | - * Based on the target language generate the inherited data model node. | 240 | + * Returns based on the target language generate the inherited data model node. |
241 | * | 241 | * |
242 | * @param targetLanguage target language in which YANG mapping needs to be | 242 | * @param targetLanguage target language in which YANG mapping needs to be |
243 | * generated | 243 | * generated |
... | @@ -255,7 +255,7 @@ public final class YangDataModelFactory { | ... | @@ -255,7 +255,7 @@ public final class YangDataModelFactory { |
255 | } | 255 | } |
256 | 256 | ||
257 | /** | 257 | /** |
258 | - * Based on the target language generate the inherited data model node. | 258 | + * Returns based on the target language generate the inherited data model node. |
259 | * | 259 | * |
260 | * @param targetLanguage target language in which YANG mapping needs to be | 260 | * @param targetLanguage target language in which YANG mapping needs to be |
261 | * generated | 261 | * generated |
... | @@ -273,7 +273,7 @@ public final class YangDataModelFactory { | ... | @@ -273,7 +273,7 @@ public final class YangDataModelFactory { |
273 | } | 273 | } |
274 | 274 | ||
275 | /** | 275 | /** |
276 | - * Based on the target language generate the inherited data model node. | 276 | + * Returns based on the target language generate the inherited data model node. |
277 | * | 277 | * |
278 | * @param targetLanguage target language in which YANG mapping needs to be | 278 | * @param targetLanguage target language in which YANG mapping needs to be |
279 | * generated | 279 | * generated |
... | @@ -291,7 +291,7 @@ public final class YangDataModelFactory { | ... | @@ -291,7 +291,7 @@ public final class YangDataModelFactory { |
291 | } | 291 | } |
292 | 292 | ||
293 | /** | 293 | /** |
294 | - * Based on the target language generate the inherited data model node. | 294 | + * Returns based on the target language generate the inherited data model node. |
295 | * | 295 | * |
296 | * @param targetLanguage target language in which YANG mapping needs to be | 296 | * @param targetLanguage target language in which YANG mapping needs to be |
297 | * generated | 297 | * generated | ... | ... |
... | @@ -25,14 +25,14 @@ import org.onosproject.yangutils.utils.YangConstructType; | ... | @@ -25,14 +25,14 @@ import org.onosproject.yangutils.utils.YangConstructType; |
25 | public interface Parsable { | 25 | public interface Parsable { |
26 | 26 | ||
27 | /** | 27 | /** |
28 | - * Get the type of YANG construct data. | 28 | + * Returns the type of YANG construct data. |
29 | * | 29 | * |
30 | * @return the type of YANG construct data. | 30 | * @return the type of YANG construct data. |
31 | */ | 31 | */ |
32 | YangConstructType getYangConstructType(); | 32 | YangConstructType getYangConstructType(); |
33 | 33 | ||
34 | /** | 34 | /** |
35 | - * Check if the node is valid as per YANG grammar's syntax and semantics. | 35 | + * Checks if the node is valid as per YANG grammar's syntax and semantics. |
36 | * This validation will be performed on entering the node in traversal | 36 | * This validation will be performed on entering the node in traversal |
37 | * | 37 | * |
38 | * @throws DataModelException if there is any violation of the YANG rules | 38 | * @throws DataModelException if there is any violation of the YANG rules |
... | @@ -41,7 +41,7 @@ public interface Parsable { | ... | @@ -41,7 +41,7 @@ public interface Parsable { |
41 | void validateDataOnEntry() throws DataModelException; | 41 | void validateDataOnEntry() throws DataModelException; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | - * Check if the node is valid as per YANG grammar's syntax and semantics. | 44 | + * Checks if the node is valid as per YANG grammar's syntax and semantics. |
45 | * This validation will be performed on exiting the node in traversal | 45 | * This validation will be performed on exiting the node in traversal |
46 | * | 46 | * |
47 | * @throws DataModelException if there is any violation of the YANG rules | 47 | * @throws DataModelException if there is any violation of the YANG rules | ... | ... |
... | @@ -16,18 +16,18 @@ | ... | @@ -16,18 +16,18 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.parser; | 17 | package org.onosproject.yangutils.parser; |
18 | 18 | ||
19 | +import java.io.IOException; | ||
20 | + | ||
19 | import org.onosproject.yangutils.datamodel.YangNode; | 21 | import org.onosproject.yangutils.datamodel.YangNode; |
20 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 22 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
21 | 23 | ||
22 | -import java.io.IOException; | ||
23 | - | ||
24 | /** | 24 | /** |
25 | * Abstraction of entity which provides parser service of YANG files for yangutils-maven-plugin. | 25 | * Abstraction of entity which provides parser service of YANG files for yangutils-maven-plugin. |
26 | */ | 26 | */ |
27 | public interface YangUtilsParser { | 27 | public interface YangUtilsParser { |
28 | 28 | ||
29 | /** | 29 | /** |
30 | - * It is an entry function to initiate the YANG file parsing. | 30 | + * Returns the data model node. It is an entry function to initiate the YANG file parsing. |
31 | * | 31 | * |
32 | * @param file input YANG file | 32 | * @param file input YANG file |
33 | * @return YangNode root node of the data model tree | 33 | * @return YangNode root node of the data model tree | ... | ... |
... | @@ -22,9 +22,10 @@ package org.onosproject.yangutils.parser.antlrgencode; | ... | @@ -22,9 +22,10 @@ package org.onosproject.yangutils.parser.antlrgencode; |
22 | import org.antlr.v4.runtime.tree.ParseTreeListener; | 22 | import org.antlr.v4.runtime.tree.ParseTreeListener; |
23 | 23 | ||
24 | /** | 24 | /** |
25 | - * ANTLR interfaces to be implemented by listener to traverse the parse tree. | 25 | + * Represents ANTLR interfaces to be implemented by listener to traverse the parse tree. |
26 | */ | 26 | */ |
27 | public interface GeneratedYangListener extends ParseTreeListener { | 27 | public interface GeneratedYangListener extends ParseTreeListener { |
28 | + | ||
28 | /** | 29 | /** |
29 | * Enter a parse tree produced by GeneratedYangParser for grammar rule | 30 | * Enter a parse tree produced by GeneratedYangParser for grammar rule |
30 | * yangfile. | 31 | * yangfile. | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.parser.exceptions; | 17 | package org.onosproject.yangutils.parser.exceptions; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Base class for exceptions in parser operations. | 20 | + * Represents base class for exceptions in parser operations. |
21 | */ | 21 | */ |
22 | public class ParserException extends RuntimeException { | 22 | public class ParserException extends RuntimeException { |
23 | 23 | ||
... | @@ -27,7 +27,7 @@ public class ParserException extends RuntimeException { | ... | @@ -27,7 +27,7 @@ public class ParserException extends RuntimeException { |
27 | private String fileName; | 27 | private String fileName; |
28 | 28 | ||
29 | /** | 29 | /** |
30 | - * Create a new parser exception. | 30 | + * Creates a new parser exception. |
31 | */ | 31 | */ |
32 | public ParserException() { | 32 | public ParserException() { |
33 | super(); | 33 | super(); | ... | ... |
... | @@ -75,7 +75,7 @@ import org.onosproject.yangutils.parser.impl.listeners.ValueListener; | ... | @@ -75,7 +75,7 @@ import org.onosproject.yangutils.parser.impl.listeners.ValueListener; |
75 | import org.onosproject.yangutils.parser.impl.listeners.VersionListener; | 75 | import org.onosproject.yangutils.parser.impl.listeners.VersionListener; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | - * ANTLR generates a parse-tree listener interface that responds to events | 78 | + * Represents ANTLR generates parse-tree. ANTLR generates a parse-tree listener interface that responds to events |
79 | * triggered by the built-in tree walker. The methods in listener are just | 79 | * triggered by the built-in tree walker. The methods in listener are just |
80 | * callbacks. This class implements listener interface and generates the | 80 | * callbacks. This class implements listener interface and generates the |
81 | * corresponding data model tree. | 81 | * corresponding data model tree. | ... | ... |
... | @@ -31,7 +31,7 @@ import org.onosproject.yangutils.parser.exceptions.ParserException; | ... | @@ -31,7 +31,7 @@ import org.onosproject.yangutils.parser.exceptions.ParserException; |
31 | import org.onosproject.yangutils.parser.impl.parserutils.ParseTreeErrorListener; | 31 | import org.onosproject.yangutils.parser.impl.parserutils.ParseTreeErrorListener; |
32 | 32 | ||
33 | /** | 33 | /** |
34 | - * Manages file parsing, parse tree creation and data model tree creation | 34 | + * Represents file parsing, parse tree creation and data model tree creation |
35 | * corresponding to an input YANG file. | 35 | * corresponding to an input YANG file. |
36 | */ | 36 | */ |
37 | public class YangUtilsParserManager implements YangUtilsParser { | 37 | public class YangUtilsParserManager implements YangUtilsParser { | ... | ... |
... | @@ -22,6 +22,7 @@ import org.onosproject.yangutils.datamodel.YangSubModule; | ... | @@ -22,6 +22,7 @@ import org.onosproject.yangutils.datamodel.YangSubModule; |
22 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | 22 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | + | ||
25 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
... | @@ -41,7 +42,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.YANGBASE_DATA; | ... | @@ -41,7 +42,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.YANGBASE_DATA; |
41 | */ | 42 | */ |
42 | 43 | ||
43 | /** | 44 | /** |
44 | - * Implements call back function corresponding to the "base rule" defined in | 45 | + * Representation of call back function corresponding to the "base rule" defined in |
45 | * ANTLR grammar file. | 46 | * ANTLR grammar file. |
46 | */ | 47 | */ |
47 | public final class BaseFileListener { | 48 | public final class BaseFileListener { | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BelongsToListener.java
... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.BELONGS_TO_DATA; | ... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.BELONGS_TO_DATA; |
57 | */ | 57 | */ |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Implements listener based call back function corresponding to the | 60 | + * Represents listener based call back function corresponding to the |
61 | * "belongs to" rule defined in ANTLR grammar file for corresponding ABNF rule | 61 | * "belongs to" rule defined in ANTLR grammar file for corresponding ABNF rule |
62 | * in RFC 6020. | 62 | * in RFC 6020. |
63 | */ | 63 | */ |
... | @@ -116,16 +116,16 @@ public final class BelongsToListener { | ... | @@ -116,16 +116,16 @@ public final class BelongsToListener { |
116 | 116 | ||
117 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 117 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
118 | switch (tmpNode.getYangConstructType()) { | 118 | switch (tmpNode.getYangConstructType()) { |
119 | - case SUB_MODULE_DATA: { | 119 | + case SUB_MODULE_DATA: { |
120 | - YangSubModule subModule = (YangSubModule) tmpNode; | 120 | + YangSubModule subModule = (YangSubModule) tmpNode; |
121 | - subModule.setBelongsTo((YangBelongsTo) tmpBelongstoNode); | 121 | + subModule.setBelongsTo((YangBelongsTo) tmpBelongstoNode); |
122 | - subModule.setPrefix(subModule.getBelongsTo().getPrefix()); | 122 | + subModule.setPrefix(subModule.getBelongsTo().getPrefix()); |
123 | - break; | 123 | + break; |
124 | - } | 124 | + } |
125 | - default: | 125 | + default: |
126 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, BELONGS_TO_DATA, | 126 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, BELONGS_TO_DATA, |
127 | - ctx.identifier().getText(), | 127 | + ctx.identifier().getText(), |
128 | - EXIT)); | 128 | + EXIT)); |
129 | } | 129 | } |
130 | } else { | 130 | } else { |
131 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, BELONGS_TO_DATA, | 131 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, BELONGS_TO_DATA, | ... | ... |
... | @@ -82,7 +82,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorTyp | ... | @@ -82,7 +82,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorTyp |
82 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 82 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
83 | 83 | ||
84 | /** | 84 | /** |
85 | - * Implements listener based call back function corresponding to the "bit" | 85 | + * Represents listener based call back function corresponding to the "bit" |
86 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 86 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
87 | */ | 87 | */ |
88 | public final class BitListener { | 88 | public final class BitListener { | ... | ... |
... | @@ -61,7 +61,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.BITS_DATA; | ... | @@ -61,7 +61,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.BITS_DATA; |
61 | import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; | 61 | import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; |
62 | 62 | ||
63 | /** | 63 | /** |
64 | - * Implements listener based call back function corresponding to the "bits" rule | 64 | + * Represents listener based call back function corresponding to the "bits" rule |
65 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 65 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
66 | */ | 66 | */ |
67 | public final class BitsListener { | 67 | public final class BitsListener { | ... | ... |
... | @@ -67,7 +67,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.WHEN_DATA; | ... | @@ -67,7 +67,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.WHEN_DATA; |
67 | */ | 67 | */ |
68 | 68 | ||
69 | /** | 69 | /** |
70 | - * Implements listener based call back function corresponding to the "case" rule | 70 | + * Represents listener based call back function corresponding to the "case" rule |
71 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 71 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
72 | */ | 72 | */ |
73 | public final class CaseListener { | 73 | public final class CaseListener { | ... | ... |
... | @@ -86,7 +86,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.WHEN_DATA; | ... | @@ -86,7 +86,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.WHEN_DATA; |
86 | */ | 86 | */ |
87 | 87 | ||
88 | /** | 88 | /** |
89 | - * Implements listener based call back function corresponding to the "choice" | 89 | + * Represents listener based call back function corresponding to the "choice" |
90 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 90 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
91 | */ | 91 | */ |
92 | public final class ChoiceListener { | 92 | public final class ChoiceListener { | ... | ... |
... | @@ -49,7 +49,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.CONFIG_DATA; | ... | @@ -49,7 +49,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.CONFIG_DATA; |
49 | */ | 49 | */ |
50 | 50 | ||
51 | /** | 51 | /** |
52 | - * Implements listener based call back function corresponding to the "config" | 52 | + * Represents listener based call back function corresponding to the "config" |
53 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 53 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
54 | */ | 54 | */ |
55 | public final class ConfigListener { | 55 | public final class ConfigListener { | ... | ... |
... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.utils.YangConstructType.CONTACT_DATA; | ||
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
31 | +import static org.onosproject.yangutils.utils.YangConstructType.CONTACT_DATA; | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Reference: RFC6020 and YANG ANTLR Grammar | 34 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -71,7 +71,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -71,7 +71,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
71 | */ | 71 | */ |
72 | 72 | ||
73 | /** | 73 | /** |
74 | - * Implements listener based call back function corresponding to the "contact" | 74 | + * Represents listener based call back function corresponding to the "contact" |
75 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 75 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
76 | */ | 76 | */ |
77 | public final class ContactListener { | 77 | public final class ContactListener { |
... | @@ -97,19 +97,19 @@ public final class ContactListener { | ... | @@ -97,19 +97,19 @@ public final class ContactListener { |
97 | // Obtain the node of the stack. | 97 | // Obtain the node of the stack. |
98 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 98 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
99 | switch (tmpNode.getYangConstructType()) { | 99 | switch (tmpNode.getYangConstructType()) { |
100 | - case MODULE_DATA: { | 100 | + case MODULE_DATA: { |
101 | - YangModule module = (YangModule) tmpNode; | 101 | + YangModule module = (YangModule) tmpNode; |
102 | - module.setContact(ctx.string().getText()); | 102 | + module.setContact(ctx.string().getText()); |
103 | - break; | 103 | + break; |
104 | - } | 104 | + } |
105 | - case SUB_MODULE_DATA: { | 105 | + case SUB_MODULE_DATA: { |
106 | - YangSubModule subModule = (YangSubModule) tmpNode; | 106 | + YangSubModule subModule = (YangSubModule) tmpNode; |
107 | - subModule.setContact(ctx.string().getText()); | 107 | + subModule.setContact(ctx.string().getText()); |
108 | - break; | 108 | + break; |
109 | - } | 109 | + } |
110 | - default: | 110 | + default: |
111 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA, | 111 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA, |
112 | - ctx.string().getText(), ENTRY)); | 112 | + ctx.string().getText(), ENTRY)); |
113 | } | 113 | } |
114 | } | 114 | } |
115 | } | 115 | } | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContainerListener.java
... | @@ -16,15 +16,15 @@ | ... | @@ -16,15 +16,15 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.parser.impl.listeners; | 17 | package org.onosproject.yangutils.parser.impl.listeners; |
18 | 18 | ||
19 | +import org.onosproject.yangutils.datamodel.YangAugment; | ||
19 | import org.onosproject.yangutils.datamodel.YangCase; | 20 | import org.onosproject.yangutils.datamodel.YangCase; |
20 | import org.onosproject.yangutils.datamodel.YangContainer; | 21 | import org.onosproject.yangutils.datamodel.YangContainer; |
22 | +import org.onosproject.yangutils.datamodel.YangInput; | ||
21 | import org.onosproject.yangutils.datamodel.YangList; | 23 | import org.onosproject.yangutils.datamodel.YangList; |
22 | import org.onosproject.yangutils.datamodel.YangModule; | 24 | import org.onosproject.yangutils.datamodel.YangModule; |
23 | import org.onosproject.yangutils.datamodel.YangNode; | 25 | import org.onosproject.yangutils.datamodel.YangNode; |
24 | import org.onosproject.yangutils.datamodel.YangNotification; | 26 | import org.onosproject.yangutils.datamodel.YangNotification; |
25 | -import org.onosproject.yangutils.datamodel.YangInput; | ||
26 | import org.onosproject.yangutils.datamodel.YangOutput; | 27 | import org.onosproject.yangutils.datamodel.YangOutput; |
27 | -import org.onosproject.yangutils.datamodel.YangAugment; | ||
28 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 28 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
29 | import org.onosproject.yangutils.parser.Parsable; | 29 | import org.onosproject.yangutils.parser.Parsable; |
30 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | 30 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
... | @@ -83,7 +83,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; | ... | @@ -83,7 +83,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; |
83 | */ | 83 | */ |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Implements listener based call back function corresponding to the "container" | 86 | + * Represents listener based call back function corresponding to the "container" |
87 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 87 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
88 | */ | 88 | */ |
89 | public final class ContainerListener { | 89 | public final class ContainerListener { | ... | ... |
... | @@ -45,7 +45,6 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -45,7 +45,6 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
45 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 45 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
46 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 46 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
47 | 47 | ||
48 | - | ||
49 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 48 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
50 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 49 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
51 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 50 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
... | @@ -54,7 +53,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -54,7 +53,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
54 | import static org.onosproject.yangutils.utils.YangConstructType.DEFAULT_DATA; | 53 | import static org.onosproject.yangutils.utils.YangConstructType.DEFAULT_DATA; |
55 | 54 | ||
56 | /** | 55 | /** |
57 | - * Listener implementation for default YANG statement. | 56 | + * Represents listener for default YANG statement. |
58 | */ | 57 | */ |
59 | public final class DefaultListener { | 58 | public final class DefaultListener { |
60 | 59 | ... | ... |
... | @@ -22,12 +22,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -22,12 +22,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
22 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 22 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
24 | 24 | ||
25 | -import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA; | ||
26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 25 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
30 | +import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA; | ||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Reference: RFC6020 and YANG ANTLR Grammar | 33 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -40,7 +40,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -40,7 +40,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
40 | */ | 40 | */ |
41 | 41 | ||
42 | /** | 42 | /** |
43 | - * Implements listener based call back function corresponding to the "description" | 43 | + * Represents listener based call back function corresponding to the "description" |
44 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 44 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
45 | */ | 45 | */ |
46 | public final class DescriptionListener { | 46 | public final class DescriptionListener { | ... | ... |
... | @@ -64,10 +64,10 @@ import org.onosproject.yangutils.datamodel.YangEnum; | ... | @@ -64,10 +64,10 @@ import org.onosproject.yangutils.datamodel.YangEnum; |
64 | import org.onosproject.yangutils.datamodel.YangEnumeration; | 64 | import org.onosproject.yangutils.datamodel.YangEnumeration; |
65 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 65 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
66 | import org.onosproject.yangutils.parser.Parsable; | 66 | import org.onosproject.yangutils.parser.Parsable; |
67 | -import static org.onosproject.yangutils.utils.YangConstructType.ENUM_DATA; | ||
68 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | 67 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
69 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 68 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
70 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 69 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
70 | + | ||
71 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 71 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
72 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 72 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
73 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; | 73 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; |
... | @@ -77,9 +77,10 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorTyp | ... | @@ -77,9 +77,10 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorTyp |
77 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; | 77 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; |
78 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 78 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
79 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 79 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
80 | +import static org.onosproject.yangutils.utils.YangConstructType.ENUM_DATA; | ||
80 | 81 | ||
81 | /** | 82 | /** |
82 | - * Implements listener based call back function corresponding to the "enum" rule | 83 | + * Represents listener based call back function corresponding to the "enum" rule |
83 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 84 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
84 | */ | 85 | */ |
85 | public final class EnumListener { | 86 | public final class EnumListener { | ... | ... |
... | @@ -62,7 +62,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.ENUMERATION_DATA | ... | @@ -62,7 +62,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.ENUMERATION_DATA |
62 | import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; | 62 | import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; |
63 | 63 | ||
64 | /** | 64 | /** |
65 | - * Implements listener based call back function corresponding to the | 65 | + * Represents listener based call back function corresponding to the |
66 | * "enumeration" rule defined in ANTLR grammar file for corresponding ABNF rule | 66 | * "enumeration" rule defined in ANTLR grammar file for corresponding ABNF rule |
67 | * in RFC 6020. | 67 | * in RFC 6020. |
68 | */ | 68 | */ | ... | ... |
... | @@ -53,7 +53,6 @@ import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA; | ... | @@ -53,7 +53,6 @@ import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA; |
53 | import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; | 53 | import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; |
54 | import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA; | 54 | import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA; |
55 | 55 | ||
56 | - | ||
57 | /* | 56 | /* |
58 | * Reference: RFC6020 and YANG ANTLR Grammar | 57 | * Reference: RFC6020 and YANG ANTLR Grammar |
59 | * | 58 | * |
... | @@ -77,7 +76,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA; | ... | @@ -77,7 +76,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA; |
77 | */ | 76 | */ |
78 | 77 | ||
79 | /** | 78 | /** |
80 | - * Implements listener based call back function corresponding to the "grouping" | 79 | + * Represents listener based call back function corresponding to the "grouping" |
81 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 80 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
82 | */ | 81 | */ |
83 | public final class GroupingListener { | 82 | public final class GroupingListener { | ... | ... |
... | @@ -24,13 +24,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -24,13 +24,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
24 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 24 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
25 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 25 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
26 | 26 | ||
27 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; | 31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; |
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
33 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
35 | import static org.onosproject.yangutils.utils.YangConstructType.IMPORT_DATA; | 35 | import static org.onosproject.yangutils.utils.YangConstructType.IMPORT_DATA; |
36 | 36 | ||
... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.IMPORT_DATA; | ... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.IMPORT_DATA; |
57 | */ | 57 | */ |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Implements listener based call back function corresponding to the "import" | 60 | + * Represents listener based call back function corresponding to the "import" |
61 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 61 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
62 | */ | 62 | */ |
63 | public final class ImportListener { | 63 | public final class ImportListener { |
... | @@ -111,20 +111,20 @@ public final class ImportListener { | ... | @@ -111,20 +111,20 @@ public final class ImportListener { |
111 | 111 | ||
112 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 112 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
113 | switch (tmpNode.getYangConstructType()) { | 113 | switch (tmpNode.getYangConstructType()) { |
114 | - case MODULE_DATA: { | 114 | + case MODULE_DATA: { |
115 | - YangModule module = (YangModule) tmpNode; | 115 | + YangModule module = (YangModule) tmpNode; |
116 | - module.addToImportList((YangImport) tmpImportNode); | 116 | + module.addToImportList((YangImport) tmpImportNode); |
117 | - break; | 117 | + break; |
118 | - } | 118 | + } |
119 | - case SUB_MODULE_DATA: { | 119 | + case SUB_MODULE_DATA: { |
120 | - YangSubModule subModule = (YangSubModule) tmpNode; | 120 | + YangSubModule subModule = (YangSubModule) tmpNode; |
121 | - subModule.addToImportList((YangImport) tmpImportNode); | 121 | + subModule.addToImportList((YangImport) tmpImportNode); |
122 | - break; | 122 | + break; |
123 | - } | 123 | + } |
124 | - default: | 124 | + default: |
125 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IMPORT_DATA, | 125 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IMPORT_DATA, |
126 | - ctx.identifier().getText(), | 126 | + ctx.identifier().getText(), |
127 | - EXIT)); | 127 | + EXIT)); |
128 | } | 128 | } |
129 | } else { | 129 | } else { |
130 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, IMPORT_DATA, | 130 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, IMPORT_DATA, | ... | ... |
... | @@ -56,7 +56,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.INCLUDE_DATA; | ... | @@ -56,7 +56,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.INCLUDE_DATA; |
56 | */ | 56 | */ |
57 | 57 | ||
58 | /** | 58 | /** |
59 | - * Implements listener based call back function corresponding to the "include" | 59 | + * Represents listener based call back function corresponding to the "include" |
60 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 60 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
61 | */ | 61 | */ |
62 | public final class IncludeListener { | 62 | public final class IncludeListener { |
... | @@ -110,20 +110,20 @@ public final class IncludeListener { | ... | @@ -110,20 +110,20 @@ public final class IncludeListener { |
110 | 110 | ||
111 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 111 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
112 | switch (tmpNode.getYangConstructType()) { | 112 | switch (tmpNode.getYangConstructType()) { |
113 | - case MODULE_DATA: { | 113 | + case MODULE_DATA: { |
114 | - YangModule module = (YangModule) tmpNode; | 114 | + YangModule module = (YangModule) tmpNode; |
115 | - module.addToIncludeList((YangInclude) tmpIncludeNode); | 115 | + module.addToIncludeList((YangInclude) tmpIncludeNode); |
116 | - break; | 116 | + break; |
117 | - } | 117 | + } |
118 | - case SUB_MODULE_DATA: { | 118 | + case SUB_MODULE_DATA: { |
119 | - YangSubModule subModule = (YangSubModule) tmpNode; | 119 | + YangSubModule subModule = (YangSubModule) tmpNode; |
120 | - subModule.addToIncludeList((YangInclude) tmpIncludeNode); | 120 | + subModule.addToIncludeList((YangInclude) tmpIncludeNode); |
121 | - break; | 121 | + break; |
122 | - } | 122 | + } |
123 | - default: | 123 | + default: |
124 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, INCLUDE_DATA, | 124 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, INCLUDE_DATA, |
125 | - ctx.identifier().getText(), | 125 | + ctx.identifier().getText(), |
126 | - EXIT)); | 126 | + EXIT)); |
127 | } | 127 | } |
128 | } else { | 128 | } else { |
129 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, INCLUDE_DATA, | 129 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, INCLUDE_DATA, | ... | ... |
... | @@ -60,7 +60,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.INPUT_DATA; | ... | @@ -60,7 +60,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.INPUT_DATA; |
60 | */ | 60 | */ |
61 | 61 | ||
62 | /** | 62 | /** |
63 | - * Implements listener based call back function corresponding to the "input" | 63 | + * Represents listener based call back function corresponding to the "input" |
64 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 64 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
65 | */ | 65 | */ |
66 | public final class InputListener { | 66 | public final class InputListener { | ... | ... |
... | @@ -23,15 +23,15 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,15 +23,15 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.utils.YangConstructType.KEY_DATA; | ||
27 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
29 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | ||
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; |
28 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | ||
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
32 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA; | ||
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
31 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA; | ||
32 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
34 | +import static org.onosproject.yangutils.utils.YangConstructType.KEY_DATA; | ||
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Reference: RFC6020 and YANG ANTLR Grammar | 37 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -45,7 +45,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -45,7 +45,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
45 | */ | 45 | */ |
46 | 46 | ||
47 | /** | 47 | /** |
48 | - * Implements listener based call back function corresponding to the "key" | 48 | + * Represesnts listener based call back function corresponding to the "key" |
49 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 49 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
50 | */ | 50 | */ |
51 | public final class KeyListener { | 51 | public final class KeyListener { | ... | ... |
... | @@ -23,7 +23,6 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,7 +23,6 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
... | @@ -31,6 +30,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMes | ... | @@ -31,6 +30,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMes |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; | 31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; |
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
33 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityEqualsOne; | 35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityEqualsOne; |
36 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne; | 36 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne; |
... | @@ -72,7 +72,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; | ... | @@ -72,7 +72,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; |
72 | */ | 72 | */ |
73 | 73 | ||
74 | /** | 74 | /** |
75 | - * Implements listener based call back function corresponding to the "leaf-list" | 75 | + * Represents listener based call back function corresponding to the "leaf-list" |
76 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 76 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
77 | */ | 77 | */ |
78 | public final class LeafListListener { | 78 | public final class LeafListListener { | ... | ... |
... | @@ -27,7 +27,6 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -27,7 +27,6 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
27 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 27 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
28 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 28 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
29 | 29 | ||
30 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; |
32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
... | @@ -35,6 +34,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMes | ... | @@ -35,6 +34,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMes |
35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
36 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; | 35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; |
37 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 36 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
37 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
38 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 38 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
39 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityEqualsOne; | 39 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityEqualsOne; |
40 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne; | 40 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne; |
... | @@ -74,7 +74,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; | ... | @@ -74,7 +74,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; |
74 | */ | 74 | */ |
75 | 75 | ||
76 | /** | 76 | /** |
77 | - * Implements listener based call back function corresponding to the "leaf" rule | 77 | + * Represents listener based call back function corresponding to the "leaf" rule |
78 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 78 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
79 | */ | 79 | */ |
80 | public final class LeafListener { | 80 | public final class LeafListener { | ... | ... |
... | @@ -16,15 +16,15 @@ | ... | @@ -16,15 +16,15 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.parser.impl.listeners; | 17 | package org.onosproject.yangutils.parser.impl.listeners; |
18 | 18 | ||
19 | +import org.onosproject.yangutils.datamodel.YangAugment; | ||
19 | import org.onosproject.yangutils.datamodel.YangCase; | 20 | import org.onosproject.yangutils.datamodel.YangCase; |
20 | import org.onosproject.yangutils.datamodel.YangContainer; | 21 | import org.onosproject.yangutils.datamodel.YangContainer; |
22 | +import org.onosproject.yangutils.datamodel.YangInput; | ||
21 | import org.onosproject.yangutils.datamodel.YangList; | 23 | import org.onosproject.yangutils.datamodel.YangList; |
22 | import org.onosproject.yangutils.datamodel.YangModule; | 24 | import org.onosproject.yangutils.datamodel.YangModule; |
23 | import org.onosproject.yangutils.datamodel.YangNode; | 25 | import org.onosproject.yangutils.datamodel.YangNode; |
24 | import org.onosproject.yangutils.datamodel.YangNotification; | 26 | import org.onosproject.yangutils.datamodel.YangNotification; |
25 | -import org.onosproject.yangutils.datamodel.YangInput; | ||
26 | import org.onosproject.yangutils.datamodel.YangOutput; | 27 | import org.onosproject.yangutils.datamodel.YangOutput; |
27 | -import org.onosproject.yangutils.datamodel.YangAugment; | ||
28 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 28 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
29 | import org.onosproject.yangutils.parser.Parsable; | 29 | import org.onosproject.yangutils.parser.Parsable; |
30 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | 30 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
... | @@ -89,7 +89,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; | ... | @@ -89,7 +89,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; |
89 | */ | 89 | */ |
90 | 90 | ||
91 | /** | 91 | /** |
92 | - * Implements listener based call back function corresponding to the "list" rule | 92 | + * Represents listener based call back function corresponding to the "list" rule |
93 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 93 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
94 | */ | 94 | */ |
95 | public final class ListListener { | 95 | public final class ListListener { | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MandatoryListener.java
... | @@ -22,13 +22,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -22,13 +22,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
22 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 22 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
24 | 24 | ||
25 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidBooleanValue; | ||
26 | -import static org.onosproject.yangutils.utils.YangConstructType.MANDATORY_DATA; | ||
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 25 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
29 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidBooleanValue; | ||
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
31 | +import static org.onosproject.yangutils.utils.YangConstructType.MANDATORY_DATA; | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Reference: RFC6020 and YANG ANTLR Grammar | 34 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -48,7 +48,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -48,7 +48,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
48 | */ | 48 | */ |
49 | 49 | ||
50 | /** | 50 | /** |
51 | - * Implements listener based call back function corresponding to the "mandatory" | 51 | + * Represents listener based call back function corresponding to the "mandatory" |
52 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 52 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
53 | */ | 53 | */ |
54 | public final class MandatoryListener { | 54 | public final class MandatoryListener { | ... | ... |
... | @@ -47,7 +47,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.MAX_ELEMENT_DATA | ... | @@ -47,7 +47,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.MAX_ELEMENT_DATA |
47 | */ | 47 | */ |
48 | 48 | ||
49 | /** | 49 | /** |
50 | - * Implements listener based call back function corresponding to the | 50 | + * Represents listener based call back function corresponding to the |
51 | * "max-elements" rule defined in ANTLR grammar file for corresponding ABNF rule | 51 | * "max-elements" rule defined in ANTLR grammar file for corresponding ABNF rule |
52 | * in RFC 6020. | 52 | * in RFC 6020. |
53 | */ | 53 | */ | ... | ... |
... | @@ -23,13 +23,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,13 +23,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidNonNegativeIntegerValue; | ||
27 | -import static org.onosproject.yangutils.utils.YangConstructType.MIN_ELEMENT_DATA; | ||
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
30 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidNonNegativeIntegerValue; | ||
32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
32 | +import static org.onosproject.yangutils.utils.YangConstructType.MIN_ELEMENT_DATA; | ||
33 | 33 | ||
34 | /* | 34 | /* |
35 | * Reference: RFC6020 and YANG ANTLR Grammar | 35 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -47,7 +47,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -47,7 +47,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
47 | */ | 47 | */ |
48 | 48 | ||
49 | /** | 49 | /** |
50 | - * Implements listener based call back function corresponding to the "min-elements" | 50 | + * Represents listener based call back function corresponding to the "min-elements" |
51 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 51 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
52 | */ | 52 | */ |
53 | public final class MinElementsListener { | 53 | public final class MinElementsListener { | ... | ... |
... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.MODULE_DATA; | ... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.MODULE_DATA; |
57 | */ | 57 | */ |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Implements listener based call back function corresponding to the "module" | 60 | + * Represents listener based call back function corresponding to the "module" |
61 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 61 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
62 | */ | 62 | */ |
63 | public final class ModuleListener { | 63 | public final class ModuleListener { | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NamespaceListener.java
... | @@ -55,7 +55,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.NAMESPACE_DATA; | ... | @@ -55,7 +55,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.NAMESPACE_DATA; |
55 | */ | 55 | */ |
56 | 56 | ||
57 | /** | 57 | /** |
58 | - * Implements listener based call back function corresponding to the "namespace" | 58 | + * Represents listener based call back function corresponding to the "namespace" |
59 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 59 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
60 | */ | 60 | */ |
61 | public final class NamespaceListener { | 61 | public final class NamespaceListener { | ... | ... |
... | @@ -16,10 +16,10 @@ | ... | @@ -16,10 +16,10 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.parser.impl.listeners; | 17 | package org.onosproject.yangutils.parser.impl.listeners; |
18 | 18 | ||
19 | -import org.onosproject.yangutils.datamodel.YangNotification; | ||
20 | import org.onosproject.yangutils.datamodel.YangModule; | 19 | import org.onosproject.yangutils.datamodel.YangModule; |
21 | -import org.onosproject.yangutils.datamodel.YangSubModule; | ||
22 | import org.onosproject.yangutils.datamodel.YangNode; | 20 | import org.onosproject.yangutils.datamodel.YangNode; |
21 | +import org.onosproject.yangutils.datamodel.YangNotification; | ||
22 | +import org.onosproject.yangutils.datamodel.YangSubModule; | ||
23 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 23 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
24 | import org.onosproject.yangutils.parser.Parsable; | 24 | import org.onosproject.yangutils.parser.Parsable; |
25 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | 25 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
... | @@ -33,17 +33,20 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLoc | ... | @@ -33,17 +33,20 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLoc |
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; | 34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; |
35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
36 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.*; | 36 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
37 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; | ||
38 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | ||
39 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA; | ||
37 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | 40 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; |
38 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 41 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
39 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne; | 42 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne; |
40 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateMutuallyExclusiveChilds; | 43 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateMutuallyExclusiveChilds; |
41 | -import static org.onosproject.yangutils.utils.YangConstructType.NOTIFICATION_DATA; | ||
42 | -import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; | ||
43 | import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA; | 44 | import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA; |
45 | +import static org.onosproject.yangutils.utils.YangConstructType.GROUPING_DATA; | ||
46 | +import static org.onosproject.yangutils.utils.YangConstructType.NOTIFICATION_DATA; | ||
44 | import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA; | 47 | import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA; |
48 | +import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; | ||
45 | import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA; | 49 | import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA; |
46 | -import static org.onosproject.yangutils.utils.YangConstructType.GROUPING_DATA; | ||
47 | 50 | ||
48 | /* | 51 | /* |
49 | * Reference: RFC6020 and YANG ANTLR Grammar | 52 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -70,7 +73,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.GROUPING_DATA; | ... | @@ -70,7 +73,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.GROUPING_DATA; |
70 | */ | 73 | */ |
71 | 74 | ||
72 | /** | 75 | /** |
73 | - * Implements listener based call back function corresponding to the "notification" | 76 | + * Represents listener based call back function corresponding to the "notification" |
74 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 77 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
75 | */ | 78 | */ |
76 | public final class NotificationListener { | 79 | public final class NotificationListener { | ... | ... |
... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.utils.YangConstructType.ORGANIZATION_DATA; | ||
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
31 | +import static org.onosproject.yangutils.utils.YangConstructType.ORGANIZATION_DATA; | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Reference: RFC6020 and YANG ANTLR Grammar | 34 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -72,7 +72,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -72,7 +72,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
72 | */ | 72 | */ |
73 | 73 | ||
74 | /** | 74 | /** |
75 | - * Implements listener based call back function corresponding to the | 75 | + * Represents listener based call back function corresponding to the |
76 | * "organization" rule defined in ANTLR grammar file for corresponding ABNF rule | 76 | * "organization" rule defined in ANTLR grammar file for corresponding ABNF rule |
77 | * in RFC 6020. | 77 | * in RFC 6020. |
78 | */ | 78 | */ |
... | @@ -101,19 +101,19 @@ public final class OrganizationListener { | ... | @@ -101,19 +101,19 @@ public final class OrganizationListener { |
101 | // Obtain the node of the stack. | 101 | // Obtain the node of the stack. |
102 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 102 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
103 | switch (tmpNode.getYangConstructType()) { | 103 | switch (tmpNode.getYangConstructType()) { |
104 | - case MODULE_DATA: { | 104 | + case MODULE_DATA: { |
105 | - YangModule module = (YangModule) tmpNode; | 105 | + YangModule module = (YangModule) tmpNode; |
106 | - module.setOrganization(ctx.string().getText()); | 106 | + module.setOrganization(ctx.string().getText()); |
107 | - break; | 107 | + break; |
108 | - } | 108 | + } |
109 | - case SUB_MODULE_DATA: { | 109 | + case SUB_MODULE_DATA: { |
110 | - YangSubModule subModule = (YangSubModule) tmpNode; | 110 | + YangSubModule subModule = (YangSubModule) tmpNode; |
111 | - subModule.setOrganization(ctx.string().getText()); | 111 | + subModule.setOrganization(ctx.string().getText()); |
112 | - break; | 112 | + break; |
113 | - } | 113 | + } |
114 | - default: | 114 | + default: |
115 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, ORGANIZATION_DATA, | 115 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, ORGANIZATION_DATA, |
116 | - ctx.string().getText(), ENTRY)); | 116 | + ctx.string().getText(), ENTRY)); |
117 | } | 117 | } |
118 | } | 118 | } |
119 | } | 119 | } | ... | ... |
... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.OUTPUT_DATA; | ... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.OUTPUT_DATA; |
57 | */ | 57 | */ |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Implements listener based call back function corresponding to the "output" | 60 | + * Represents listener based call back function corresponding to the "output" |
61 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 61 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
62 | */ | 62 | */ |
63 | public final class OutputListener { | 63 | public final class OutputListener { | ... | ... |
... | @@ -50,7 +50,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -50,7 +50,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
50 | import static org.onosproject.yangutils.utils.YangConstructType.POSITION_DATA; | 50 | import static org.onosproject.yangutils.utils.YangConstructType.POSITION_DATA; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | - * Implements listener based call back function corresponding to the "position" | 53 | + * Represents listener based call back function corresponding to the "position" |
54 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 54 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
55 | */ | 55 | */ |
56 | public final class PositionListener { | 56 | public final class PositionListener { | ... | ... |
... | @@ -24,13 +24,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -24,13 +24,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
24 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 24 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
25 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 25 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
26 | 26 | ||
27 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
28 | -import static org.onosproject.yangutils.utils.YangConstructType.PREFIX_DATA; | ||
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
31 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier; | ||
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
33 | +import static org.onosproject.yangutils.utils.YangConstructType.PREFIX_DATA; | ||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Reference: RFC6020 and YANG ANTLR Grammar | 36 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -56,7 +56,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -56,7 +56,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
56 | */ | 56 | */ |
57 | 57 | ||
58 | /** | 58 | /** |
59 | - * Implements listener based call back function corresponding to the "prefix" | 59 | + * Represents listener based call back function corresponding to the "prefix" |
60 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 60 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
61 | */ | 61 | */ |
62 | public final class PrefixListener { | 62 | public final class PrefixListener { |
... | @@ -84,24 +84,24 @@ public final class PrefixListener { | ... | @@ -84,24 +84,24 @@ public final class PrefixListener { |
84 | // Obtain the node of the stack. | 84 | // Obtain the node of the stack. |
85 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 85 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
86 | switch (tmpNode.getYangConstructType()) { | 86 | switch (tmpNode.getYangConstructType()) { |
87 | - case MODULE_DATA: { | 87 | + case MODULE_DATA: { |
88 | - YangModule module = (YangModule) tmpNode; | 88 | + YangModule module = (YangModule) tmpNode; |
89 | - module.setPrefix(identifier); | 89 | + module.setPrefix(identifier); |
90 | - break; | 90 | + break; |
91 | - } | 91 | + } |
92 | - case IMPORT_DATA: { | 92 | + case IMPORT_DATA: { |
93 | - YangImport importNode = (YangImport) tmpNode; | 93 | + YangImport importNode = (YangImport) tmpNode; |
94 | - importNode.setPrefixId(identifier); | 94 | + importNode.setPrefixId(identifier); |
95 | - break; | 95 | + break; |
96 | - } | 96 | + } |
97 | - case BELONGS_TO_DATA: { | 97 | + case BELONGS_TO_DATA: { |
98 | - YangBelongsTo belongstoNode = (YangBelongsTo) tmpNode; | 98 | + YangBelongsTo belongstoNode = (YangBelongsTo) tmpNode; |
99 | - belongstoNode.setPrefix(identifier); | 99 | + belongstoNode.setPrefix(identifier); |
100 | - break; | 100 | + break; |
101 | - } | 101 | + } |
102 | - default: | 102 | + default: |
103 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, PREFIX_DATA, | 103 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, PREFIX_DATA, |
104 | - ctx.identifier().getText(), ENTRY)); | 104 | + ctx.identifier().getText(), ENTRY)); |
105 | } | 105 | } |
106 | } | 106 | } |
107 | } | 107 | } | ... | ... |
... | @@ -22,13 +22,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -22,13 +22,13 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
22 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 22 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
24 | 24 | ||
25 | -import static org.onosproject.yangutils.utils.YangConstructType.PRESENCE_DATA; | ||
26 | -import static org.onosproject.yangutils.utils.YangConstructType.CONTAINER_DATA; | ||
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 25 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
30 | +import static org.onosproject.yangutils.utils.YangConstructType.CONTAINER_DATA; | ||
31 | +import static org.onosproject.yangutils.utils.YangConstructType.PRESENCE_DATA; | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Reference: RFC6020 and YANG ANTLR Grammar | 34 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -41,7 +41,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -41,7 +41,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
41 | */ | 41 | */ |
42 | 42 | ||
43 | /** | 43 | /** |
44 | - * Implements listener based call back function corresponding to the "presence" | 44 | + * Represents listener based call back function corresponding to the "presence" |
45 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 45 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
46 | */ | 46 | */ |
47 | public final class PresenceListener { | 47 | public final class PresenceListener { | ... | ... |
... | @@ -59,7 +59,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.rem | ... | @@ -59,7 +59,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.rem |
59 | */ | 59 | */ |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Implements listener based call back function corresponding to the "range" | 62 | + * Represents listener based call back function corresponding to the "range" |
63 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 63 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
64 | */ | 64 | */ |
65 | public final class RangeRestrictionListener { | 65 | public final class RangeRestrictionListener { | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ReferenceListener.java
... | @@ -22,12 +22,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -22,12 +22,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
22 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 22 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 23 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
24 | 24 | ||
25 | -import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA; | ||
26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 25 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
30 | +import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA; | ||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Reference: RFC6020 and YANG ANTLR Grammar | 33 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -40,7 +40,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -40,7 +40,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
40 | */ | 40 | */ |
41 | 41 | ||
42 | /** | 42 | /** |
43 | - * Implements listener based call back function corresponding to the "reference" | 43 | + * Represents listener based call back function corresponding to the "reference" |
44 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 44 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
45 | */ | 45 | */ |
46 | public final class ReferenceListener { | 46 | public final class ReferenceListener { | ... | ... |
... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
27 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid; | ||
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
30 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid; | ||
31 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
33 | import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATE_DATA; | 33 | import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATE_DATA; |
34 | 34 | ||
... | @@ -61,7 +61,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATE_DA | ... | @@ -61,7 +61,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATE_DA |
61 | */ | 61 | */ |
62 | 62 | ||
63 | /** | 63 | /** |
64 | - * Implements listener based call back function corresponding to the | 64 | + * Represents listener based call back function corresponding to the |
65 | * "revision date" rule defined in ANTLR grammar file for corresponding ABNF | 65 | * "revision date" rule defined in ANTLR grammar file for corresponding ABNF |
66 | * rule in RFC 6020. | 66 | * rule in RFC 6020. |
67 | */ | 67 | */ | ... | ... |
... | @@ -24,16 +24,16 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -24,16 +24,16 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
24 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 24 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
25 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 25 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
26 | 26 | ||
27 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
28 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid; | ||
29 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | ||
30 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | ||
31 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; | ||
32 | -import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATA; | ||
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
34 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
30 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | ||
31 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; | ||
32 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | ||
33 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid; | ||
34 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
36 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 35 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
36 | +import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATA; | ||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Reference: RFC6020 and YANG ANTLR Grammar | 39 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -64,7 +64,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -64,7 +64,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
64 | */ | 64 | */ |
65 | 65 | ||
66 | /** | 66 | /** |
67 | - * Implements listener based call back function corresponding to the "revision" | 67 | + * Represents listener based call back function corresponding to the "revision" |
68 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 68 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
69 | */ | 69 | */ |
70 | public final class RevisionListener { | 70 | public final class RevisionListener { |
... | @@ -132,20 +132,20 @@ public final class RevisionListener { | ... | @@ -132,20 +132,20 @@ public final class RevisionListener { |
132 | 132 | ||
133 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 133 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
134 | switch (tmpNode.getYangConstructType()) { | 134 | switch (tmpNode.getYangConstructType()) { |
135 | - case MODULE_DATA: { | 135 | + case MODULE_DATA: { |
136 | - YangModule module = (YangModule) tmpNode; | 136 | + YangModule module = (YangModule) tmpNode; |
137 | - module.setRevision((YangRevision) tmpRevisionNode); | 137 | + module.setRevision((YangRevision) tmpRevisionNode); |
138 | - break; | 138 | + break; |
139 | - } | 139 | + } |
140 | - case SUB_MODULE_DATA: { | 140 | + case SUB_MODULE_DATA: { |
141 | - YangSubModule subModule = (YangSubModule) tmpNode; | 141 | + YangSubModule subModule = (YangSubModule) tmpNode; |
142 | - subModule.setRevision((YangRevision) tmpRevisionNode); | 142 | + subModule.setRevision((YangRevision) tmpRevisionNode); |
143 | - break; | 143 | + break; |
144 | - } | 144 | + } |
145 | - default: | 145 | + default: |
146 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATA, | 146 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATA, |
147 | - ctx.dateArgumentString().getText(), | 147 | + ctx.dateArgumentString().getText(), |
148 | - EXIT)); | 148 | + EXIT)); |
149 | } | 149 | } |
150 | } else { | 150 | } else { |
151 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, REVISION_DATA, | 151 | throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, REVISION_DATA, | ... | ... |
... | @@ -72,7 +72,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA | ... | @@ -72,7 +72,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA |
72 | */ | 72 | */ |
73 | 73 | ||
74 | /** | 74 | /** |
75 | - * Implements listener based call back function corresponding to the "rpc" | 75 | + * Represents listener based call back function corresponding to the "rpc" |
76 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 76 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
77 | */ | 77 | */ |
78 | public final class RpcListener { | 78 | public final class RpcListener { | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ShortCaseListener.java
... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.SHORT_CASE_DATA; | ... | @@ -57,7 +57,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.SHORT_CASE_DATA; |
57 | */ | 57 | */ |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Implements listener based call back function corresponding to the "short | 60 | + * Represents listener based call back function corresponding to the "short |
61 | * case" rule defined in ANTLR grammar file for corresponding ABNF rule in RFC | 61 | * case" rule defined in ANTLR grammar file for corresponding ABNF rule in RFC |
62 | * 6020. | 62 | * 6020. |
63 | */ | 63 | */ | ... | ... |
... | @@ -23,14 +23,14 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,14 +23,14 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
27 | -import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; | ||
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
30 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | ||
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_CONTENT; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_CONTENT; |
29 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | ||
32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
31 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat; | ||
33 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 32 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
33 | +import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; | ||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Reference: RFC6020 and YANG ANTLR Grammar | 36 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -48,7 +48,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -48,7 +48,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
48 | */ | 48 | */ |
49 | 49 | ||
50 | /** | 50 | /** |
51 | - * Implements listener based call back function corresponding to the "status" | 51 | + * Represents listener based call back function corresponding to the "status" |
52 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 52 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
53 | */ | 53 | */ |
54 | public final class StatusListener { | 54 | public final class StatusListener { | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java
... | @@ -58,7 +58,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.SUB_MODULE_DATA; | ... | @@ -58,7 +58,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.SUB_MODULE_DATA; |
58 | */ | 58 | */ |
59 | 59 | ||
60 | /** | 60 | /** |
61 | - * Implements listener based call back function corresponding to the "submodule" | 61 | + * Represents listener based call back function corresponding to the "submodule" |
62 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 62 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
63 | */ | 63 | */ |
64 | public final class SubModuleListener { | 64 | public final class SubModuleListener { | ... | ... |
... | @@ -87,7 +87,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; | ... | @@ -87,7 +87,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; |
87 | */ | 87 | */ |
88 | 88 | ||
89 | /** | 89 | /** |
90 | - * Implements listener based call back function corresponding to the "typedef" | 90 | + * Represents listener based call back function corresponding to the "typedef" |
91 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 91 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
92 | */ | 92 | */ |
93 | public final class TypeDefListener { | 93 | public final class TypeDefListener { | ... | ... |
... | @@ -62,7 +62,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; | ... | @@ -62,7 +62,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; |
62 | */ | 62 | */ |
63 | 63 | ||
64 | /** | 64 | /** |
65 | - * Implements listener based call back function corresponding to the "type" rule | 65 | + * Represents listener based call back function corresponding to the "type" rule |
66 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 66 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
67 | */ | 67 | */ |
68 | public final class TypeListener { | 68 | public final class TypeListener { | ... | ... |
... | @@ -60,10 +60,11 @@ import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; | ... | @@ -60,10 +60,11 @@ import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; |
60 | import static org.onosproject.yangutils.utils.YangConstructType.UNION_DATA; | 60 | import static org.onosproject.yangutils.utils.YangConstructType.UNION_DATA; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | - * Implements listener based call back function corresponding to the "union" rule | 63 | + * Represents listener based call back function corresponding to the "union" rule |
64 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 64 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
65 | */ | 65 | */ |
66 | public final class UnionListener { | 66 | public final class UnionListener { |
67 | + | ||
67 | /** | 68 | /** |
68 | * Creates a new union listener. | 69 | * Creates a new union listener. |
69 | */ | 70 | */ | ... | ... |
... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | ... | @@ -23,12 +23,12 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
23 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 23 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 24 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
25 | 25 | ||
26 | -import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; | ||
27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 28 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 29 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
31 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 30 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
31 | +import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Reference: RFC6020 and YANG ANTLR Grammar | 34 | * Reference: RFC6020 and YANG ANTLR Grammar |
... | @@ -41,7 +41,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -41,7 +41,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
41 | */ | 41 | */ |
42 | 42 | ||
43 | /** | 43 | /** |
44 | - * Implements listener based call back function corresponding to the "units" | 44 | + * Represents listener based call back function corresponding to the "units" |
45 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 45 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
46 | */ | 46 | */ |
47 | public final class UnitsListener { | 47 | public final class UnitsListener { | ... | ... |
... | @@ -90,7 +90,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.WHEN_DATA; | ... | @@ -90,7 +90,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.WHEN_DATA; |
90 | */ | 90 | */ |
91 | 91 | ||
92 | /** | 92 | /** |
93 | - * Implements listener based call back function corresponding to the "uses" | 93 | + * Represents listener based call back function corresponding to the "uses" |
94 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 94 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
95 | */ | 95 | */ |
96 | public final class UsesListener { | 96 | public final class UsesListener { | ... | ... |
... | @@ -29,18 +29,19 @@ package org.onosproject.yangutils.parser.impl.listeners; | ... | @@ -29,18 +29,19 @@ package org.onosproject.yangutils.parser.impl.listeners; |
29 | import org.onosproject.yangutils.datamodel.YangEnum; | 29 | import org.onosproject.yangutils.datamodel.YangEnum; |
30 | import org.onosproject.yangutils.datamodel.YangEnumeration; | 30 | import org.onosproject.yangutils.datamodel.YangEnumeration; |
31 | import org.onosproject.yangutils.parser.Parsable; | 31 | import org.onosproject.yangutils.parser.Parsable; |
32 | -import static org.onosproject.yangutils.utils.YangConstructType.VALUE_DATA; | ||
33 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | 32 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
34 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 33 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
35 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 34 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
35 | + | ||
36 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; | 36 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
37 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 37 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
38 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 38 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
39 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; | 39 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
40 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; | 40 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
41 | +import static org.onosproject.yangutils.utils.YangConstructType.VALUE_DATA; | ||
41 | 42 | ||
42 | /** | 43 | /** |
43 | - * Implements listener based call back function corresponding to the "value" | 44 | + * Represents listener based call back function corresponding to the "value" |
44 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 45 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
45 | */ | 46 | */ |
46 | public final class ValueListener { | 47 | public final class ValueListener { | ... | ... |
... | @@ -65,7 +65,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati | ... | @@ -65,7 +65,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati |
65 | */ | 65 | */ |
66 | 66 | ||
67 | /** | 67 | /** |
68 | - * Implements listener based call back function corresponding to the "version" | 68 | + * Represents listener based call back function corresponding to the "version" |
69 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. | 69 | * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
70 | */ | 70 | */ |
71 | public final class VersionListener { | 71 | public final class VersionListener { |
... | @@ -94,19 +94,19 @@ public final class VersionListener { | ... | @@ -94,19 +94,19 @@ public final class VersionListener { |
94 | // Obtain the node of the stack. | 94 | // Obtain the node of the stack. |
95 | Parsable tmpNode = listener.getParsedDataStack().peek(); | 95 | Parsable tmpNode = listener.getParsedDataStack().peek(); |
96 | switch (tmpNode.getYangConstructType()) { | 96 | switch (tmpNode.getYangConstructType()) { |
97 | - case MODULE_DATA: { | 97 | + case MODULE_DATA: { |
98 | - YangModule module = (YangModule) tmpNode; | 98 | + YangModule module = (YangModule) tmpNode; |
99 | - module.setVersion(version); | 99 | + module.setVersion(version); |
100 | - break; | 100 | + break; |
101 | - } | 101 | + } |
102 | - case SUB_MODULE_DATA: { | 102 | + case SUB_MODULE_DATA: { |
103 | - YangSubModule subModule = (YangSubModule) tmpNode; | 103 | + YangSubModule subModule = (YangSubModule) tmpNode; |
104 | - subModule.setVersion(version); | 104 | + subModule.setVersion(version); |
105 | - break; | 105 | + break; |
106 | - } | 106 | + } |
107 | - default: | 107 | + default: |
108 | - throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, VERSION_DATA, | 108 | + throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, VERSION_DATA, |
109 | - ctx.version().getText(), ENTRY)); | 109 | + ctx.version().getText(), ENTRY)); |
110 | } | 110 | } |
111 | } | 111 | } |
112 | } | 112 | } | ... | ... |
... | @@ -20,13 +20,14 @@ import org.onosproject.yangutils.datamodel.CollisionDetector; | ... | @@ -20,13 +20,14 @@ import org.onosproject.yangutils.datamodel.CollisionDetector; |
20 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; | 20 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
21 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 21 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
22 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 22 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
23 | +import org.onosproject.yangutils.utils.YangConstructType; | ||
24 | + | ||
23 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; | 25 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
24 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | 26 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
25 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; | 27 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
26 | -import org.onosproject.yangutils.utils.YangConstructType; | ||
27 | 28 | ||
28 | /** | 29 | /** |
29 | - * Check the YANG construct collision in a YANG file. | 30 | + * Represents the detector of YANG construct collision in a YANG file. |
30 | */ | 31 | */ |
31 | public final class ListenerCollisionDetector { | 32 | public final class ListenerCollisionDetector { |
32 | 33 | ||
... | @@ -52,7 +53,7 @@ public final class ListenerCollisionDetector { | ... | @@ -52,7 +53,7 @@ public final class ListenerCollisionDetector { |
52 | */ | 53 | */ |
53 | public static void detectCollidingChildUtil(TreeWalkListener listener, int line, int charPosition, | 54 | public static void detectCollidingChildUtil(TreeWalkListener listener, int line, int charPosition, |
54 | String identifierName, YangConstructType constructType) | 55 | String identifierName, YangConstructType constructType) |
55 | - throws ParserException { | 56 | + throws ParserException { |
56 | 57 | ||
57 | if (listener.getParsedDataStack().peek() instanceof CollisionDetector) { | 58 | if (listener.getParsedDataStack().peek() instanceof CollisionDetector) { |
58 | try { | 59 | try { | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.parser.impl.parserutils; | 17 | package org.onosproject.yangutils.parser.impl.parserutils; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Maintains listener error location. | 20 | + * Represents listener error location. |
21 | */ | 21 | */ |
22 | public enum ListenerErrorLocation { | 22 | public enum ListenerErrorLocation { |
23 | /** | 23 | /** | ... | ... |
... | @@ -18,17 +18,17 @@ package org.onosproject.yangutils.parser.impl.parserutils; | ... | @@ -18,17 +18,17 @@ package org.onosproject.yangutils.parser.impl.parserutils; |
18 | 18 | ||
19 | import org.onosproject.yangutils.utils.YangConstructType; | 19 | import org.onosproject.yangutils.utils.YangConstructType; |
20 | 20 | ||
21 | -import static org.onosproject.yangutils.utils.YangConstructType.getYangConstructType; | ||
22 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.getErrorLocationMessage; | 21 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.getErrorLocationMessage; |
23 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.getErrorType; | 22 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.getErrorType; |
23 | +import static org.onosproject.yangutils.utils.YangConstructType.getYangConstructType; | ||
24 | 24 | ||
25 | /** | 25 | /** |
26 | - * It's a utility to help construct detailed error message. | 26 | + * Represents a utility to help construct detailed error message. |
27 | */ | 27 | */ |
28 | public final class ListenerErrorMessageConstruction { | 28 | public final class ListenerErrorMessageConstruction { |
29 | 29 | ||
30 | /** | 30 | /** |
31 | - * Private constructor. | 31 | + * Creates a object of listen error message. |
32 | */ | 32 | */ |
33 | private ListenerErrorMessageConstruction() { | 33 | private ListenerErrorMessageConstruction() { |
34 | } | 34 | } | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.parser.impl.parserutils; | 17 | package org.onosproject.yangutils.parser.impl.parserutils; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Maintains listener error type. | 20 | + * Represents listener error type. |
21 | */ | 21 | */ |
22 | public enum ListenerErrorType { | 22 | public enum ListenerErrorType { |
23 | /** | 23 | /** | ... | ... |
... | @@ -26,13 +26,14 @@ import java.util.regex.Pattern; | ... | @@ -26,13 +26,14 @@ import java.util.regex.Pattern; |
26 | import org.antlr.v4.runtime.ParserRuleContext; | 26 | import org.antlr.v4.runtime.ParserRuleContext; |
27 | import org.onosproject.yangutils.datamodel.YangNodeIdentifier; | 27 | import org.onosproject.yangutils.datamodel.YangNodeIdentifier; |
28 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; | 28 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
29 | -import org.onosproject.yangutils.utils.YangConstructType; | ||
30 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 29 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
30 | +import org.onosproject.yangutils.utils.YangConstructType; | ||
31 | 31 | ||
32 | /** | 32 | /** |
33 | - * It's a utility for listener. | 33 | + * Represents an utility for listener. |
34 | */ | 34 | */ |
35 | public final class ListenerUtil { | 35 | public final class ListenerUtil { |
36 | + | ||
36 | private static final Pattern IDENTIFIER_PATTERN = Pattern.compile("[a-zA-Z_][a-zA-Z0-9_.-]*"); | 37 | private static final Pattern IDENTIFIER_PATTERN = Pattern.compile("[a-zA-Z_][a-zA-Z0-9_.-]*"); |
37 | private static final String NON_NEGATIVE_INTEGER_PATTERN = "[0-9]+"; | 38 | private static final String NON_NEGATIVE_INTEGER_PATTERN = "[0-9]+"; |
38 | private static final String PLUS = "+"; | 39 | private static final String PLUS = "+"; |
... | @@ -154,7 +155,7 @@ public final class ListenerUtil { | ... | @@ -154,7 +155,7 @@ public final class ListenerUtil { |
154 | * @return valid non negative integer value | 155 | * @return valid non negative integer value |
155 | */ | 156 | */ |
156 | public static int getValidNonNegativeIntegerValue(String integerValue, YangConstructType yangConstruct, | 157 | public static int getValidNonNegativeIntegerValue(String integerValue, YangConstructType yangConstruct, |
157 | - ParserRuleContext ctx) { | 158 | + ParserRuleContext ctx) { |
158 | 159 | ||
159 | String value = removeQuotesAndHandleConcat(integerValue); | 160 | String value = removeQuotesAndHandleConcat(integerValue); |
160 | if (!value.matches(NON_NEGATIVE_INTEGER_PATTERN)) { | 161 | if (!value.matches(NON_NEGATIVE_INTEGER_PATTERN)) { |
... | @@ -178,7 +179,7 @@ public final class ListenerUtil { | ... | @@ -178,7 +179,7 @@ public final class ListenerUtil { |
178 | * @return boolean value either true or false | 179 | * @return boolean value either true or false |
179 | */ | 180 | */ |
180 | public static boolean getValidBooleanValue(String booleanValue, YangConstructType yangConstruct, | 181 | public static boolean getValidBooleanValue(String booleanValue, YangConstructType yangConstruct, |
181 | - ParserRuleContext ctx) { | 182 | + ParserRuleContext ctx) { |
182 | 183 | ||
183 | String value = removeQuotesAndHandleConcat(booleanValue); | 184 | String value = removeQuotesAndHandleConcat(booleanValue); |
184 | if (value.equals(TRUE_KEYWORD)) { | 185 | if (value.equals(TRUE_KEYWORD)) { | ... | ... |
... | @@ -16,6 +16,9 @@ | ... | @@ -16,6 +16,9 @@ |
16 | 16 | ||
17 | package org.onosproject.yangutils.parser.impl.parserutils; | 17 | package org.onosproject.yangutils.parser.impl.parserutils; |
18 | 18 | ||
19 | +import java.util.Iterator; | ||
20 | +import java.util.List; | ||
21 | + | ||
19 | import org.antlr.v4.runtime.ParserRuleContext; | 22 | import org.antlr.v4.runtime.ParserRuleContext; |
20 | import org.onosproject.yangutils.datamodel.YangContainer; | 23 | import org.onosproject.yangutils.datamodel.YangContainer; |
21 | import org.onosproject.yangutils.datamodel.YangList; | 24 | import org.onosproject.yangutils.datamodel.YangList; |
... | @@ -23,15 +26,13 @@ import org.onosproject.yangutils.datamodel.YangNode; | ... | @@ -23,15 +26,13 @@ import org.onosproject.yangutils.datamodel.YangNode; |
23 | import org.onosproject.yangutils.parser.Parsable; | 26 | import org.onosproject.yangutils.parser.Parsable; |
24 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 27 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
25 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; | 28 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
26 | -import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; | ||
27 | import org.onosproject.yangutils.utils.YangConstructType; | 29 | import org.onosproject.yangutils.utils.YangConstructType; |
28 | -import static org.onosproject.yangutils.utils.YangConstructType.getYangConstructType; | ||
29 | 30 | ||
30 | -import java.util.Iterator; | 31 | +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; |
31 | -import java.util.List; | 32 | +import static org.onosproject.yangutils.utils.YangConstructType.getYangConstructType; |
32 | 33 | ||
33 | /** | 34 | /** |
34 | - * It's a utility to carry out listener validation. | 35 | + * Represents a utility to carry out listener validation. |
35 | */ | 36 | */ |
36 | public final class ListenerValidation { | 37 | public final class ListenerValidation { |
37 | 38 | ||
... | @@ -54,6 +55,7 @@ public final class ListenerValidation { | ... | @@ -54,6 +55,7 @@ public final class ListenerValidation { |
54 | public static void checkStackIsNotEmpty(TreeWalkListener listener, ListenerErrorType errorType, | 55 | public static void checkStackIsNotEmpty(TreeWalkListener listener, ListenerErrorType errorType, |
55 | YangConstructType yangConstructType, String parsableDataTypeName, | 56 | YangConstructType yangConstructType, String parsableDataTypeName, |
56 | ListenerErrorLocation errorLocation) { | 57 | ListenerErrorLocation errorLocation) { |
58 | + | ||
57 | if (listener.getParsedDataStack().empty()) { | 59 | if (listener.getParsedDataStack().empty()) { |
58 | /* | 60 | /* |
59 | * If stack is empty it indicates error condition, value of | 61 | * If stack is empty it indicates error condition, value of |
... | @@ -100,6 +102,7 @@ public final class ListenerValidation { | ... | @@ -100,6 +102,7 @@ public final class ListenerValidation { |
100 | * @return true/false parent's config value | 102 | * @return true/false parent's config value |
101 | */ | 103 | */ |
102 | public static boolean getParentNodeConfig(TreeWalkListener listener) { | 104 | public static boolean getParentNodeConfig(TreeWalkListener listener) { |
105 | + | ||
103 | YangNode parentNode; | 106 | YangNode parentNode; |
104 | Parsable curData = listener.getParsedDataStack().peek(); | 107 | Parsable curData = listener.getParsedDataStack().peek(); |
105 | if (curData instanceof YangNode) { | 108 | if (curData instanceof YangNode) { |
... | @@ -125,7 +128,7 @@ public final class ListenerValidation { | ... | @@ -125,7 +128,7 @@ public final class ListenerValidation { |
125 | * @throws ParserException exception if cardinality check fails | 128 | * @throws ParserException exception if cardinality check fails |
126 | */ | 129 | */ |
127 | public static void validateCardinalityMaxOne(List<?> childContext, YangConstructType yangChildConstruct, | 130 | public static void validateCardinalityMaxOne(List<?> childContext, YangConstructType yangChildConstruct, |
128 | - YangConstructType yangParentConstruct, String parentName) | 131 | + YangConstructType yangParentConstruct, String parentName) |
129 | throws ParserException { | 132 | throws ParserException { |
130 | 133 | ||
131 | if (!childContext.isEmpty() && childContext.size() != 1) { | 134 | if (!childContext.isEmpty() && childContext.size() != 1) { |
... | @@ -152,8 +155,8 @@ public final class ListenerValidation { | ... | @@ -152,8 +155,8 @@ public final class ListenerValidation { |
152 | * @throws ParserException exception if cardinality check fails | 155 | * @throws ParserException exception if cardinality check fails |
153 | */ | 156 | */ |
154 | public static void validateCardinalityEqualsOne(List<?> childContext, YangConstructType yangChildConstruct, | 157 | public static void validateCardinalityEqualsOne(List<?> childContext, YangConstructType yangChildConstruct, |
155 | - YangConstructType yangParentConstruct, String parentName, | 158 | + YangConstructType yangParentConstruct, String parentName, |
156 | - ParserRuleContext parentContext) | 159 | + ParserRuleContext parentContext) |
157 | throws ParserException { | 160 | throws ParserException { |
158 | 161 | ||
159 | if (childContext.isEmpty()) { | 162 | if (childContext.isEmpty()) { |
... | @@ -187,8 +190,8 @@ public final class ListenerValidation { | ... | @@ -187,8 +190,8 @@ public final class ListenerValidation { |
187 | * @throws ParserException exception if cardinality check fails | 190 | * @throws ParserException exception if cardinality check fails |
188 | */ | 191 | */ |
189 | public static void validateCardinalityNonZero(List<?> childContext, YangConstructType yangChildConstruct, | 192 | public static void validateCardinalityNonZero(List<?> childContext, YangConstructType yangChildConstruct, |
190 | - YangConstructType yangParentConstruct, String parentName, | 193 | + YangConstructType yangParentConstruct, String parentName, |
191 | - ParserRuleContext parentContext) | 194 | + ParserRuleContext parentContext) |
192 | throws ParserException { | 195 | throws ParserException { |
193 | 196 | ||
194 | if (childContext.isEmpty()) { | 197 | if (childContext.isEmpty()) { |
... | @@ -216,8 +219,8 @@ public final class ListenerValidation { | ... | @@ -216,8 +219,8 @@ public final class ListenerValidation { |
216 | * @throws ParserException exception if cardinality check fails | 219 | * @throws ParserException exception if cardinality check fails |
217 | */ | 220 | */ |
218 | public static void validateMutuallyExclusiveChilds(List<?> child1Context, YangConstructType yangChild1Construct, | 221 | public static void validateMutuallyExclusiveChilds(List<?> child1Context, YangConstructType yangChild1Construct, |
219 | - List<?> child2Context, YangConstructType yangChild2Construct, | 222 | + List<?> child2Context, YangConstructType yangChild2Construct, |
220 | - YangConstructType yangParentConstruct, String parentName) | 223 | + YangConstructType yangParentConstruct, String parentName) |
221 | throws ParserException { | 224 | throws ParserException { |
222 | 225 | ||
223 | if (!child1Context.isEmpty() && !child2Context.isEmpty()) { | 226 | if (!child1Context.isEmpty() && !child2Context.isEmpty()) { | ... | ... |
... | @@ -22,6 +22,7 @@ import org.antlr.v4.runtime.Recognizer; | ... | @@ -22,6 +22,7 @@ import org.antlr.v4.runtime.Recognizer; |
22 | import org.onosproject.yangutils.parser.exceptions.ParserException; | 22 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
23 | 23 | ||
24 | /** | 24 | /** |
25 | + * Represent the parse tree error listener. | ||
25 | * By default, ANTLR sends all errors to standard error, this is changed by | 26 | * By default, ANTLR sends all errors to standard error, this is changed by |
26 | * providing this new implementation of interface ANTLRErrorListener. The | 27 | * providing this new implementation of interface ANTLRErrorListener. The |
27 | * interface has a syntaxError() method that applies to both lexer and parser. | 28 | * interface has a syntaxError() method that applies to both lexer and parser. | ... | ... |
... | @@ -49,7 +49,7 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.copyYangFilesT | ... | @@ -49,7 +49,7 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.copyYangFilesT |
49 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getDirectory; | 49 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getDirectory; |
50 | 50 | ||
51 | /** | 51 | /** |
52 | - * ONOS YANG utility maven plugin. | 52 | + * Represents ONOS YANG utility maven plugin. |
53 | * Goal of plugin is yang2java Execution phase in generate-sources requiresDependencyResolution at compile time. | 53 | * Goal of plugin is yang2java Execution phase in generate-sources requiresDependencyResolution at compile time. |
54 | */ | 54 | */ |
55 | @Mojo(name = "yang2java", defaultPhase = GENERATE_SOURCES, requiresDependencyResolution = COMPILE, | 55 | @Mojo(name = "yang2java", defaultPhase = GENERATE_SOURCES, requiresDependencyResolution = COMPILE, | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.translator.exception; | 17 | package org.onosproject.yangutils.translator.exception; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Provides custom translator exception for translator's operations. | 20 | + * Represents custom translator exception for translator's operations. |
21 | */ | 21 | */ |
22 | public class TranslatorException extends RuntimeException { | 22 | public class TranslatorException extends RuntimeException { |
23 | 23 | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
... | @@ -17,12 +17,12 @@ | ... | @@ -17,12 +17,12 @@ |
17 | package org.onosproject.yangutils.translator.tojava; | 17 | package org.onosproject.yangutils.translator.tojava; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Type of files generated. | 20 | + * Represents type of java files generated. |
21 | */ | 21 | */ |
22 | public final class GeneratedJavaFileType { | 22 | public final class GeneratedJavaFileType { |
23 | 23 | ||
24 | /** | 24 | /** |
25 | - * prevent creating attributes. | 25 | + * Creates an instance of generate java file type. |
26 | */ | 26 | */ |
27 | private GeneratedJavaFileType() { | 27 | private GeneratedJavaFileType() { |
28 | } | 28 | } | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedTempFileType.java
... | @@ -17,12 +17,12 @@ | ... | @@ -17,12 +17,12 @@ |
17 | package org.onosproject.yangutils.translator.tojava; | 17 | package org.onosproject.yangutils.translator.tojava; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Type of files generated. | 20 | + * Represents type of temporary files generated. |
21 | */ | 21 | */ |
22 | public final class GeneratedTempFileType { | 22 | public final class GeneratedTempFileType { |
23 | 23 | ||
24 | /** | 24 | /** |
25 | - * prevent creating attributes. | 25 | + * Creates an instance of generated temp file type. |
26 | */ | 26 | */ |
27 | private GeneratedTempFileType() { | 27 | private GeneratedTempFileType() { |
28 | } | 28 | } | ... | ... |
... | @@ -16,19 +16,20 @@ | ... | @@ -16,19 +16,20 @@ |
16 | package org.onosproject.yangutils.translator.tojava; | 16 | package org.onosproject.yangutils.translator.tojava; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | - * Data model nodes which are required to generate java classes, need to support | 19 | + * Represents data model nodes which are required to generate java classes, need to support |
20 | * java file info. | 20 | * java file info. |
21 | */ | 21 | */ |
22 | public interface HasJavaFileInfo { | 22 | public interface HasJavaFileInfo { |
23 | + | ||
23 | /** | 24 | /** |
24 | - * Get the generated java file information. | 25 | + * Returns the generated java file information. |
25 | * | 26 | * |
26 | * @return generated java file information | 27 | * @return generated java file information |
27 | */ | 28 | */ |
28 | public JavaFileInfo getJavaFileInfo(); | 29 | public JavaFileInfo getJavaFileInfo(); |
29 | 30 | ||
30 | /** | 31 | /** |
31 | - * Set the java file info object. | 32 | + * Sets the java file info object. |
32 | * | 33 | * |
33 | * @param javaInfo java file info object | 34 | * @param javaInfo java file info object |
34 | */ | 35 | */ | ... | ... |
... | @@ -16,18 +16,19 @@ | ... | @@ -16,18 +16,19 @@ |
16 | package org.onosproject.yangutils.translator.tojava; | 16 | package org.onosproject.yangutils.translator.tojava; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | - * Maintains the information of the java import data. | 19 | + * Represents the information of the java import data. |
20 | */ | 20 | */ |
21 | public interface HasJavaImportData { | 21 | public interface HasJavaImportData { |
22 | + | ||
22 | /** | 23 | /** |
23 | - * Get the data of java imports to be included in generated file. | 24 | + * Returns the data of java imports to be included in generated file. |
24 | * | 25 | * |
25 | * @return data of java imports to be included in generated file | 26 | * @return data of java imports to be included in generated file |
26 | */ | 27 | */ |
27 | public JavaImportData getJavaImportData(); | 28 | public JavaImportData getJavaImportData(); |
28 | 29 | ||
29 | /** | 30 | /** |
30 | - * Set the data of java imports to be included in generated file. | 31 | + * Sets the data of java imports to be included in generated file. |
31 | * | 32 | * |
32 | * @param javaImportData data of java imports to be included in generated | 33 | * @param javaImportData data of java imports to be included in generated |
33 | * file | 34 | * file | ... | ... |
... | @@ -16,18 +16,19 @@ | ... | @@ -16,18 +16,19 @@ |
16 | package org.onosproject.yangutils.translator.tojava; | 16 | package org.onosproject.yangutils.translator.tojava; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | - * Has temporary file handle. | 19 | + * Represents Has temporary file handle. |
20 | */ | 20 | */ |
21 | public interface HasTempJavaCodeFragmentFiles { | 21 | public interface HasTempJavaCodeFragmentFiles { |
22 | + | ||
22 | /** | 23 | /** |
23 | - * Get the temporary file handle. | 24 | + * Returns the temporary file handle. |
24 | * | 25 | * |
25 | * @return temporary file handle | 26 | * @return temporary file handle |
26 | */ | 27 | */ |
27 | TempJavaCodeFragmentFiles getTempJavaCodeFragmentFiles(); | 28 | TempJavaCodeFragmentFiles getTempJavaCodeFragmentFiles(); |
28 | 29 | ||
29 | /** | 30 | /** |
30 | - * Set temporary file handle. | 31 | + * Sets temporary file handle. |
31 | * | 32 | * |
32 | * @param fileHandle temporary file handle | 33 | * @param fileHandle temporary file handle |
33 | */ | 34 | */ | ... | ... |
... | @@ -27,7 +27,7 @@ import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo. | ... | @@ -27,7 +27,7 @@ import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo. |
27 | import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getCamelCase; | 27 | import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getCamelCase; |
28 | 28 | ||
29 | /** | 29 | /** |
30 | - * Maintains the attribute info corresponding to class/interface generated. | 30 | + * Represents the attribute info corresponding to class/interface generated. |
31 | */ | 31 | */ |
32 | public final class JavaAttributeInfo { | 32 | public final class JavaAttributeInfo { |
33 | 33 | ||
... | @@ -58,7 +58,7 @@ public final class JavaAttributeInfo { | ... | @@ -58,7 +58,7 @@ public final class JavaAttributeInfo { |
58 | private JavaQualifiedTypeInfo importInfo; | 58 | private JavaQualifiedTypeInfo importInfo; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | - * Default constructor. | 61 | + * Creates a java attribute info object. |
62 | */ | 62 | */ |
63 | private JavaAttributeInfo() { | 63 | private JavaAttributeInfo() { |
64 | } | 64 | } |
... | @@ -79,7 +79,7 @@ public final class JavaAttributeInfo { | ... | @@ -79,7 +79,7 @@ public final class JavaAttributeInfo { |
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | - * Get the data type info of attribute. | 82 | + * Returns the data type info of attribute. |
83 | * | 83 | * |
84 | * @return the data type info of attribute | 84 | * @return the data type info of attribute |
85 | */ | 85 | */ |
... | @@ -92,7 +92,7 @@ public final class JavaAttributeInfo { | ... | @@ -92,7 +92,7 @@ public final class JavaAttributeInfo { |
92 | } | 92 | } |
93 | 93 | ||
94 | /** | 94 | /** |
95 | - * Set the data type info of attribute. | 95 | + * Sets the data type info of attribute. |
96 | * | 96 | * |
97 | * @param type the data type info of attribute | 97 | * @param type the data type info of attribute |
98 | */ | 98 | */ |
... | @@ -101,7 +101,7 @@ public final class JavaAttributeInfo { | ... | @@ -101,7 +101,7 @@ public final class JavaAttributeInfo { |
101 | } | 101 | } |
102 | 102 | ||
103 | /** | 103 | /** |
104 | - * Get name of the attribute. | 104 | + * Returns name of the attribute. |
105 | * | 105 | * |
106 | * @return name of the attribute | 106 | * @return name of the attribute |
107 | */ | 107 | */ |
... | @@ -114,7 +114,7 @@ public final class JavaAttributeInfo { | ... | @@ -114,7 +114,7 @@ public final class JavaAttributeInfo { |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Set name of the attribute. | 117 | + * Sets name of the attribute. |
118 | * | 118 | * |
119 | * @param attrName name of the attribute | 119 | * @param attrName name of the attribute |
120 | */ | 120 | */ |
... | @@ -123,7 +123,7 @@ public final class JavaAttributeInfo { | ... | @@ -123,7 +123,7 @@ public final class JavaAttributeInfo { |
123 | } | 123 | } |
124 | 124 | ||
125 | /** | 125 | /** |
126 | - * Get if the added attribute is a list of info. | 126 | + * Returns if the added attribute is a list of info. |
127 | * | 127 | * |
128 | * @return the if the added attribute is a list of info | 128 | * @return the if the added attribute is a list of info |
129 | */ | 129 | */ |
... | @@ -132,7 +132,7 @@ public final class JavaAttributeInfo { | ... | @@ -132,7 +132,7 @@ public final class JavaAttributeInfo { |
132 | } | 132 | } |
133 | 133 | ||
134 | /** | 134 | /** |
135 | - * Set if the added attribute is a list of info. | 135 | + * Sets if the added attribute is a list of info. |
136 | * | 136 | * |
137 | * @param isList if the added attribute is a list of info | 137 | * @param isList if the added attribute is a list of info |
138 | */ | 138 | */ |
... | @@ -141,7 +141,7 @@ public final class JavaAttributeInfo { | ... | @@ -141,7 +141,7 @@ public final class JavaAttributeInfo { |
141 | } | 141 | } |
142 | 142 | ||
143 | /** | 143 | /** |
144 | - * Get if the added attribute has to be accessed in a fully qualified | 144 | + * Returns if the added attribute has to be accessed in a fully qualified |
145 | * manner. | 145 | * manner. |
146 | * | 146 | * |
147 | * @return the if the added attribute has to be accessed in a fully | 147 | * @return the if the added attribute has to be accessed in a fully |
... | @@ -152,7 +152,7 @@ public final class JavaAttributeInfo { | ... | @@ -152,7 +152,7 @@ public final class JavaAttributeInfo { |
152 | } | 152 | } |
153 | 153 | ||
154 | /** | 154 | /** |
155 | - * Set if the added attribute has to be accessed in a fully qualified | 155 | + * Sets if the added attribute has to be accessed in a fully qualified |
156 | * manner. | 156 | * manner. |
157 | * | 157 | * |
158 | * @param isQualified if the added attribute has to be accessed in a fully | 158 | * @param isQualified if the added attribute has to be accessed in a fully |
... | @@ -163,7 +163,7 @@ public final class JavaAttributeInfo { | ... | @@ -163,7 +163,7 @@ public final class JavaAttributeInfo { |
163 | } | 163 | } |
164 | 164 | ||
165 | /** | 165 | /** |
166 | - * Get the import info for the attribute type. It will be null, of the type | 166 | + * Returns the import info for the attribute type. It will be null, of the type |
167 | * is basic built-in java type. | 167 | * is basic built-in java type. |
168 | * | 168 | * |
169 | * @return import info | 169 | * @return import info |
... | @@ -173,7 +173,7 @@ public final class JavaAttributeInfo { | ... | @@ -173,7 +173,7 @@ public final class JavaAttributeInfo { |
173 | } | 173 | } |
174 | 174 | ||
175 | /** | 175 | /** |
176 | - * Set the import info for the attribute type. | 176 | + * Sets the import info for the attribute type. |
177 | * | 177 | * |
178 | * @param importInfo import info for the attribute type | 178 | * @param importInfo import info for the attribute type |
179 | */ | 179 | */ |
... | @@ -182,7 +182,7 @@ public final class JavaAttributeInfo { | ... | @@ -182,7 +182,7 @@ public final class JavaAttributeInfo { |
182 | } | 182 | } |
183 | 183 | ||
184 | /** | 184 | /** |
185 | - * Create an attribute info object corresponding to the passed leaf | 185 | + * Creates an attribute info object corresponding to the passed leaf |
186 | * information and return it. | 186 | * information and return it. |
187 | * | 187 | * |
188 | * @param curNode current data model node for which the java file is being | 188 | * @param curNode current data model node for which the java file is being |
... | @@ -208,7 +208,7 @@ public final class JavaAttributeInfo { | ... | @@ -208,7 +208,7 @@ public final class JavaAttributeInfo { |
208 | } | 208 | } |
209 | 209 | ||
210 | /** | 210 | /** |
211 | - * Create an attribute info object corresponding to a data model node and | 211 | + * Creates an attribute info object corresponding to a data model node and |
212 | * return it. | 212 | * return it. |
213 | * | 213 | * |
214 | * @param curNode current data model node for which the java code generation | 214 | * @param curNode current data model node for which the java code generation |
... | @@ -234,7 +234,7 @@ public final class JavaAttributeInfo { | ... | @@ -234,7 +234,7 @@ public final class JavaAttributeInfo { |
234 | } | 234 | } |
235 | 235 | ||
236 | /** | 236 | /** |
237 | - * Create an attribute info object corresponding to the passed type def attribute | 237 | + * Creates an attribute info object corresponding to the passed type def attribute |
238 | * information and return it. | 238 | * information and return it. |
239 | * | 239 | * |
240 | * @param curNode current data model node for which the java file is being | 240 | * @param curNode current data model node for which the java file is being | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/JavaCodeGeneratorUtil.java
... | @@ -28,7 +28,7 @@ import static org.onosproject.yangutils.translator.tojava.TraversalType.ROOT; | ... | @@ -28,7 +28,7 @@ import static org.onosproject.yangutils.translator.tojava.TraversalType.ROOT; |
28 | import static org.onosproject.yangutils.translator.tojava.TraversalType.SIBILING; | 28 | import static org.onosproject.yangutils.translator.tojava.TraversalType.SIBILING; |
29 | 29 | ||
30 | /** | 30 | /** |
31 | - * Implementation of Java code generator based on application schema. | 31 | + * Representation of Java code generator based on application schema. |
32 | */ | 32 | */ |
33 | public final class JavaCodeGeneratorUtil { | 33 | public final class JavaCodeGeneratorUtil { |
34 | 34 | ||
... | @@ -38,7 +38,7 @@ public final class JavaCodeGeneratorUtil { | ... | @@ -38,7 +38,7 @@ public final class JavaCodeGeneratorUtil { |
38 | private static YangNode curNode; | 38 | private static YangNode curNode; |
39 | 39 | ||
40 | /** | 40 | /** |
41 | - * Default constructor. | 41 | + * Creates a java code generator util object. |
42 | */ | 42 | */ |
43 | private JavaCodeGeneratorUtil() { | 43 | private JavaCodeGeneratorUtil() { |
44 | } | 44 | } |
... | @@ -57,13 +57,12 @@ public final class JavaCodeGeneratorUtil { | ... | @@ -57,13 +57,12 @@ public final class JavaCodeGeneratorUtil { |
57 | * | 57 | * |
58 | * @param node current YANG node | 58 | * @param node current YANG node |
59 | */ | 59 | */ |
60 | - | ||
61 | public static void setCurNode(YangNode node) { | 60 | public static void setCurNode(YangNode node) { |
62 | curNode = node; | 61 | curNode = node; |
63 | } | 62 | } |
64 | 63 | ||
65 | /** | 64 | /** |
66 | - * Generate Java code files corresponding to the YANG schema. | 65 | + * Generates Java code files corresponding to the YANG schema. |
67 | * | 66 | * |
68 | * @param rootNode root node of the data model tree | 67 | * @param rootNode root node of the data model tree |
69 | * @param codeGenDir code generation directory | 68 | * @param codeGenDir code generation directory |
... | @@ -173,6 +172,7 @@ public final class JavaCodeGeneratorUtil { | ... | @@ -173,6 +172,7 @@ public final class JavaCodeGeneratorUtil { |
173 | 172 | ||
174 | YangNode parent = node.getParent(); | 173 | YangNode parent = node.getParent(); |
175 | parent.setChild(null); | 174 | parent.setChild(null); |
175 | + | ||
176 | if (node.getNextSibling() != null) { | 176 | if (node.getNextSibling() != null) { |
177 | parent.setChild(node.getNextSibling()); | 177 | parent.setChild(node.getNextSibling()); |
178 | } else if (node.getPreviousSibling() != null) { | 178 | } else if (node.getPreviousSibling() != null) { | ... | ... |
... | @@ -19,7 +19,7 @@ package org.onosproject.yangutils.translator.tojava; | ... | @@ -19,7 +19,7 @@ package org.onosproject.yangutils.translator.tojava; |
19 | import org.onosproject.yangutils.translator.exception.TranslatorException; | 19 | import org.onosproject.yangutils.translator.exception.TranslatorException; |
20 | 20 | ||
21 | /** | 21 | /** |
22 | - * Cached java file handle, which supports the addition of member attributes and | 22 | + * Represents cached java file handle, which supports the addition of member attributes and |
23 | * methods. | 23 | * methods. |
24 | */ | 24 | */ |
25 | public class JavaFileInfo { | 25 | public class JavaFileInfo { |
... | @@ -51,7 +51,7 @@ public class JavaFileInfo { | ... | @@ -51,7 +51,7 @@ public class JavaFileInfo { |
51 | private String codeGenDirFilePath; | 51 | private String codeGenDirFilePath; |
52 | 52 | ||
53 | /** | 53 | /** |
54 | - * Get the types of files being generated corresponding to the YANG | 54 | + * Returns the types of files being generated corresponding to the YANG |
55 | * definition. | 55 | * definition. |
56 | * | 56 | * |
57 | * @return the types of files being generated corresponding to the YANG | 57 | * @return the types of files being generated corresponding to the YANG |
... | @@ -62,7 +62,7 @@ public class JavaFileInfo { | ... | @@ -62,7 +62,7 @@ public class JavaFileInfo { |
62 | } | 62 | } |
63 | 63 | ||
64 | /** | 64 | /** |
65 | - * Set the types of files being generated corresponding to the YANG | 65 | + * Sets the types of files being generated corresponding to the YANG |
66 | * definition. | 66 | * definition. |
67 | * | 67 | * |
68 | * @param fileTypes the types of files being generated corresponding to the | 68 | * @param fileTypes the types of files being generated corresponding to the |
... | @@ -73,7 +73,7 @@ public class JavaFileInfo { | ... | @@ -73,7 +73,7 @@ public class JavaFileInfo { |
73 | } | 73 | } |
74 | 74 | ||
75 | /** | 75 | /** |
76 | - * Get the java name of the node. | 76 | + * Returns the java name of the node. |
77 | * | 77 | * |
78 | * @return the java name of node | 78 | * @return the java name of node |
79 | */ | 79 | */ |
... | @@ -82,7 +82,7 @@ public class JavaFileInfo { | ... | @@ -82,7 +82,7 @@ public class JavaFileInfo { |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | - * Set the java name of the node. | 85 | + * Sets the java name of the node. |
86 | * | 86 | * |
87 | * @param name the java name of node | 87 | * @param name the java name of node |
88 | */ | 88 | */ |
... | @@ -91,7 +91,7 @@ public class JavaFileInfo { | ... | @@ -91,7 +91,7 @@ public class JavaFileInfo { |
91 | } | 91 | } |
92 | 92 | ||
93 | /** | 93 | /** |
94 | - * Get the mapped java package. | 94 | + * Returns the mapped java package. |
95 | * | 95 | * |
96 | * @return the java package | 96 | * @return the java package |
97 | */ | 97 | */ |
... | @@ -104,7 +104,7 @@ public class JavaFileInfo { | ... | @@ -104,7 +104,7 @@ public class JavaFileInfo { |
104 | } | 104 | } |
105 | 105 | ||
106 | /** | 106 | /** |
107 | - * Set the node's package. | 107 | + * Sets the node's package. |
108 | * | 108 | * |
109 | * @param nodePackage node's package | 109 | * @param nodePackage node's package |
110 | */ | 110 | */ |
... | @@ -122,7 +122,7 @@ public class JavaFileInfo { | ... | @@ -122,7 +122,7 @@ public class JavaFileInfo { |
122 | } | 122 | } |
123 | 123 | ||
124 | /** | 124 | /** |
125 | - * Gets directory package path for code generation. | 125 | + * Returns directory package path for code generation. |
126 | * | 126 | * |
127 | * @return directory package path for code generation | 127 | * @return directory package path for code generation |
128 | */ | 128 | */ |
... | @@ -131,7 +131,7 @@ public class JavaFileInfo { | ... | @@ -131,7 +131,7 @@ public class JavaFileInfo { |
131 | } | 131 | } |
132 | 132 | ||
133 | /** | 133 | /** |
134 | - * Gets base directory package path for code generation. | 134 | + * Returns base directory package path for code generation. |
135 | * | 135 | * |
136 | * @return directory package path for code generation | 136 | * @return directory package path for code generation |
137 | */ | 137 | */ | ... | ... |
... | @@ -37,7 +37,7 @@ import static org.onosproject.yangutils.utils.UtilConstants.PERIOD; | ... | @@ -37,7 +37,7 @@ import static org.onosproject.yangutils.utils.UtilConstants.PERIOD; |
37 | import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN; | 37 | import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN; |
38 | 38 | ||
39 | /** | 39 | /** |
40 | - * Generated Java file can contain imports. | 40 | + * Represents that generated Java file can contain imports. |
41 | */ | 41 | */ |
42 | public class JavaImportData { | 42 | public class JavaImportData { |
43 | 43 | ||
... | @@ -53,14 +53,14 @@ public class JavaImportData { | ... | @@ -53,14 +53,14 @@ public class JavaImportData { |
53 | private SortedSet<JavaQualifiedTypeInfo> importSet; | 53 | private SortedSet<JavaQualifiedTypeInfo> importSet; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | - * Default constructor. | 56 | + * Creates java import data object. |
57 | */ | 57 | */ |
58 | public JavaImportData() { | 58 | public JavaImportData() { |
59 | setImportSet(new TreeSet<JavaQualifiedTypeInfo>()); | 59 | setImportSet(new TreeSet<JavaQualifiedTypeInfo>()); |
60 | } | 60 | } |
61 | 61 | ||
62 | /** | 62 | /** |
63 | - * Get if the list needs to be imported. | 63 | + * Returns if the list needs to be imported. |
64 | * | 64 | * |
65 | * @return true if any of the attribute needs to be maintained as a list. | 65 | * @return true if any of the attribute needs to be maintained as a list. |
66 | */ | 66 | */ |
... | @@ -69,7 +69,7 @@ public class JavaImportData { | ... | @@ -69,7 +69,7 @@ public class JavaImportData { |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * Set the status of importing list. | 72 | + * Sets the status of importing list. |
73 | * | 73 | * |
74 | * @param isList status to mention list is bing imported. | 74 | * @param isList status to mention list is bing imported. |
75 | */ | 75 | */ |
... | @@ -78,7 +78,7 @@ public class JavaImportData { | ... | @@ -78,7 +78,7 @@ public class JavaImportData { |
78 | } | 78 | } |
79 | 79 | ||
80 | /** | 80 | /** |
81 | - * Get the set containing the imported class/interface info. | 81 | + * Returns the set containing the imported class/interface info. |
82 | * | 82 | * |
83 | * @return the set containing the imported class/interface info | 83 | * @return the set containing the imported class/interface info |
84 | */ | 84 | */ |
... | @@ -149,7 +149,7 @@ public class JavaImportData { | ... | @@ -149,7 +149,7 @@ public class JavaImportData { |
149 | } | 149 | } |
150 | 150 | ||
151 | if (attr.isListAttr()) { | 151 | if (attr.isListAttr()) { |
152 | - imports.add(setImportForList()); | 152 | + imports.add(getImportForList()); |
153 | } | 153 | } |
154 | 154 | ||
155 | java.util.Collections.sort(imports); | 155 | java.util.Collections.sort(imports); |
... | @@ -157,7 +157,7 @@ public class JavaImportData { | ... | @@ -157,7 +157,7 @@ public class JavaImportData { |
157 | } | 157 | } |
158 | 158 | ||
159 | /** | 159 | /** |
160 | - * Gets import for hash and equals method. | 160 | + * Returns import for hash and equals method. |
161 | * | 161 | * |
162 | * @return import for hash and equals method | 162 | * @return import for hash and equals method |
163 | */ | 163 | */ |
... | @@ -166,7 +166,7 @@ public class JavaImportData { | ... | @@ -166,7 +166,7 @@ public class JavaImportData { |
166 | } | 166 | } |
167 | 167 | ||
168 | /** | 168 | /** |
169 | - * Gets import for to string method. | 169 | + * Returns import for to string method. |
170 | * | 170 | * |
171 | * @return import for to string method | 171 | * @return import for to string method |
172 | */ | 172 | */ |
... | @@ -175,9 +175,12 @@ public class JavaImportData { | ... | @@ -175,9 +175,12 @@ public class JavaImportData { |
175 | } | 175 | } |
176 | 176 | ||
177 | /** | 177 | /** |
178 | - * Sets import for the list attribute. | 178 | + * Returns import for list attribute. |
179 | + * | ||
180 | + * @return import for for list attribute | ||
179 | */ | 181 | */ |
180 | - private static String setImportForList() { | 182 | + |
183 | + private static String getImportForList() { | ||
181 | return IMPORT + COLLECTION_IMPORTS + PERIOD + LIST + SEMI_COLAN + NEW_LINE; | 184 | return IMPORT + COLLECTION_IMPORTS + PERIOD + LIST + SEMI_COLAN + NEW_LINE; |
182 | } | 185 | } |
183 | } | 186 | } | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/JavaQualifiedTypeInfo.java
... | @@ -26,7 +26,7 @@ import org.onosproject.yangutils.translator.tojava.utils.AttributesJavaDataType; | ... | @@ -26,7 +26,7 @@ import org.onosproject.yangutils.translator.tojava.utils.AttributesJavaDataType; |
26 | import com.google.common.base.MoreObjects; | 26 | import com.google.common.base.MoreObjects; |
27 | 27 | ||
28 | /** | 28 | /** |
29 | - * Maintains the information about individual imports in the generated file. | 29 | + * Represents the information about individual imports in the generated file. |
30 | */ | 30 | */ |
31 | public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> { | 31 | public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> { |
32 | 32 | ||
... | @@ -41,13 +41,13 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -41,13 +41,13 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
41 | private String classInfo; | 41 | private String classInfo; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | - * Default constructor. | 44 | + * Creates a java qualified type info object. |
45 | */ | 45 | */ |
46 | public JavaQualifiedTypeInfo() { | 46 | public JavaQualifiedTypeInfo() { |
47 | } | 47 | } |
48 | 48 | ||
49 | /** | 49 | /** |
50 | - * Get the imported package info. | 50 | + * Returns the imported package info. |
51 | * | 51 | * |
52 | * @return the imported package info | 52 | * @return the imported package info |
53 | */ | 53 | */ |
... | @@ -56,7 +56,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -56,7 +56,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | - * Set the imported package info. | 59 | + * Sets the imported package info. |
60 | * | 60 | * |
61 | * @param pkgInfo the imported package info | 61 | * @param pkgInfo the imported package info |
62 | */ | 62 | */ |
... | @@ -65,7 +65,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -65,7 +65,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
65 | } | 65 | } |
66 | 66 | ||
67 | /** | 67 | /** |
68 | - * Get the imported class/interface info. | 68 | + * Returns the imported class/interface info. |
69 | * | 69 | * |
70 | * @return the imported class/interface info | 70 | * @return the imported class/interface info |
71 | */ | 71 | */ |
... | @@ -74,7 +74,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -74,7 +74,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
74 | } | 74 | } |
75 | 75 | ||
76 | /** | 76 | /** |
77 | - * Set the imported class/interface info. | 77 | + * Sets the imported class/interface info. |
78 | * | 78 | * |
79 | * @param classInfo the imported class/interface info | 79 | * @param classInfo the imported class/interface info |
80 | */ | 80 | */ |
... | @@ -83,7 +83,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -83,7 +83,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Get the import info for an attribute, which needs to be used for code | 86 | + * Returns the import info for an attribute, which needs to be used for code |
87 | * generation for import or for qualified access. | 87 | * generation for import or for qualified access. |
88 | * | 88 | * |
89 | * @param curNode current data model node for which the java file is being | 89 | * @param curNode current data model node for which the java file is being |
... | @@ -136,7 +136,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -136,7 +136,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
136 | } | 136 | } |
137 | 137 | ||
138 | /** | 138 | /** |
139 | - * Get the import info for an attribute, which needs to be used for code | 139 | + * Returns the import info for an attribute, which needs to be used for code |
140 | * generation for import or for qualified access. | 140 | * generation for import or for qualified access. |
141 | * | 141 | * |
142 | * @param curNode current data model node for which the java file is being | 142 | * @param curNode current data model node for which the java file is being |
... | @@ -168,7 +168,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -168,7 +168,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
171 | - * Get if the attribute needs to be accessed in a qualified manner or not, | 171 | + * Returns if the attribute needs to be accessed in a qualified manner or not, |
172 | * if it needs to be imported, then the same needs to be done. | 172 | * if it needs to be imported, then the same needs to be done. |
173 | * | 173 | * |
174 | * @param curNode current cache of the data model node for which java file | 174 | * @param curNode current cache of the data model node for which java file |
... | @@ -226,7 +226,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -226,7 +226,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
226 | } | 226 | } |
227 | 227 | ||
228 | /** | 228 | /** |
229 | - * Check if the import info is same as the package of the current generated | 229 | + * Checks if the import info is same as the package of the current generated |
230 | * java file. | 230 | * java file. |
231 | * | 231 | * |
232 | * @param curNode Java identifier of the current data model node | 232 | * @param curNode Java identifier of the current data model node |
... | @@ -265,7 +265,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -265,7 +265,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
265 | } | 265 | } |
266 | 266 | ||
267 | /** | 267 | /** |
268 | - * check if the import info matches. | 268 | + * checks if the import info matches. |
269 | * | 269 | * |
270 | * @param importInfo matched import | 270 | * @param importInfo matched import |
271 | * @return if equal or not | 271 | * @return if equal or not |
... | @@ -284,7 +284,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> | ... | @@ -284,7 +284,7 @@ public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> |
284 | } | 284 | } |
285 | 285 | ||
286 | /** | 286 | /** |
287 | - * Check that there is no 2 objects with the same class name. | 287 | + * Checks that there is no 2 objects with the same class name. |
288 | * | 288 | * |
289 | * @param other compared import info. | 289 | * @param other compared import info. |
290 | */ | 290 | */ | ... | ... |
... | @@ -95,7 +95,7 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataInto | ... | @@ -95,7 +95,7 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataInto |
95 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.mergeJavaFiles; | 95 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.mergeJavaFiles; |
96 | 96 | ||
97 | /** | 97 | /** |
98 | - * Provides implementation of java code fragments temporary implementations. | 98 | + * Represents implementation of java code fragments temporary implementations. |
99 | */ | 99 | */ |
100 | public class TempJavaCodeFragmentFiles { | 100 | public class TempJavaCodeFragmentFiles { |
101 | 101 | ||
... | @@ -292,7 +292,7 @@ public class TempJavaCodeFragmentFiles { | ... | @@ -292,7 +292,7 @@ public class TempJavaCodeFragmentFiles { |
292 | private boolean isAttributePresent = false; | 292 | private boolean isAttributePresent = false; |
293 | 293 | ||
294 | /** | 294 | /** |
295 | - * Construct an object of temporary java code fragment. | 295 | + * Creates an instance of temporary java code fragment. |
296 | * | 296 | * |
297 | * @param genFileType file generation type | 297 | * @param genFileType file generation type |
298 | * @param genDir file generation directory | 298 | * @param genDir file generation directory |
... | @@ -913,7 +913,7 @@ public class TempJavaCodeFragmentFiles { | ... | @@ -913,7 +913,7 @@ public class TempJavaCodeFragmentFiles { |
913 | } | 913 | } |
914 | 914 | ||
915 | /** | 915 | /** |
916 | - * Parse attribute to get the attribute string. | 916 | + * Parses attribute to get the attribute string. |
917 | * | 917 | * |
918 | * @param attr attribute info | 918 | * @param attr attribute info |
919 | * @return attribute string | 919 | * @return attribute string |
... | @@ -934,7 +934,7 @@ public class TempJavaCodeFragmentFiles { | ... | @@ -934,7 +934,7 @@ public class TempJavaCodeFragmentFiles { |
934 | } | 934 | } |
935 | 935 | ||
936 | /** | 936 | /** |
937 | - * Append content to temporary file. | 937 | + * Appends content to temporary file. |
938 | * | 938 | * |
939 | * @param file temporary file | 939 | * @param file temporary file |
940 | * @param data data to be appended | 940 | * @param data data to be appended |
... | @@ -1061,7 +1061,7 @@ public class TempJavaCodeFragmentFiles { | ... | @@ -1061,7 +1061,7 @@ public class TempJavaCodeFragmentFiles { |
1061 | } | 1061 | } |
1062 | 1062 | ||
1063 | /** | 1063 | /** |
1064 | - * Add the new attribute info to the target generated temporary files. | 1064 | + * Adds the new attribute info to the target generated temporary files. |
1065 | * | 1065 | * |
1066 | * @param newAttrInfo the attribute info that needs to be added to temporary | 1066 | * @param newAttrInfo the attribute info that needs to be added to temporary |
1067 | * files | 1067 | * files |
... | @@ -1112,7 +1112,7 @@ public class TempJavaCodeFragmentFiles { | ... | @@ -1112,7 +1112,7 @@ public class TempJavaCodeFragmentFiles { |
1112 | } | 1112 | } |
1113 | 1113 | ||
1114 | /** | 1114 | /** |
1115 | - * Return java file info. | 1115 | + * Returns java file info. |
1116 | * | 1116 | * |
1117 | * @return java file info | 1117 | * @return java file info |
1118 | */ | 1118 | */ | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | package org.onosproject.yangutils.translator.tojava; | 17 | package org.onosproject.yangutils.translator.tojava; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | - * Data model tree traversal types. | 20 | + * Represents data model tree traversal types. |
21 | */ | 21 | */ |
22 | public enum TraversalType { | 22 | public enum TraversalType { |
23 | 23 | ... | ... |
... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | - * Augment information extended to support java code generation. | 38 | + * Represents augment information extended to support java code generation. |
39 | */ | 39 | */ |
40 | public class YangJavaAugment extends YangAugment | 40 | public class YangJavaAugment extends YangAugment |
41 | implements JavaCodeGenerator, HasJavaFileInfo, | 41 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -59,7 +59,7 @@ public class YangJavaAugment extends YangAugment | ... | @@ -59,7 +59,7 @@ public class YangJavaAugment extends YangAugment |
59 | private TempJavaCodeFragmentFiles tempFileHandle; | 59 | private TempJavaCodeFragmentFiles tempFileHandle; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Default constructor. | 62 | + * Creates a YANG java augment object. |
63 | */ | 63 | */ |
64 | public YangJavaAugment() { | 64 | public YangJavaAugment() { |
65 | super(); | 65 | super(); |
... | @@ -69,7 +69,7 @@ public class YangJavaAugment extends YangAugment | ... | @@ -69,7 +69,7 @@ public class YangJavaAugment extends YangAugment |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * Get the generated java file information. | 72 | + * Returns the generated java file information. |
73 | * | 73 | * |
74 | * @return generated java file information | 74 | * @return generated java file information |
75 | */ | 75 | */ |
... | @@ -83,7 +83,7 @@ public class YangJavaAugment extends YangAugment | ... | @@ -83,7 +83,7 @@ public class YangJavaAugment extends YangAugment |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Set the java file info object. | 86 | + * Sets the java file info object. |
87 | * | 87 | * |
88 | * @param javaInfo java file info object | 88 | * @param javaInfo java file info object |
89 | */ | 89 | */ |
... | @@ -93,7 +93,7 @@ public class YangJavaAugment extends YangAugment | ... | @@ -93,7 +93,7 @@ public class YangJavaAugment extends YangAugment |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | - * Get the data of java imports to be included in generated file. | 96 | + * Returns the data of java imports to be included in generated file. |
97 | * | 97 | * |
98 | * @return data of java imports to be included in generated file | 98 | * @return data of java imports to be included in generated file |
99 | */ | 99 | */ |
... | @@ -103,7 +103,7 @@ public class YangJavaAugment extends YangAugment | ... | @@ -103,7 +103,7 @@ public class YangJavaAugment extends YangAugment |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | - * Set the data of java imports to be included in generated file. | 106 | + * Sets the data of java imports to be included in generated file. |
107 | * | 107 | * |
108 | * @param javaImportData data of java imports to be included in generated | 108 | * @param javaImportData data of java imports to be included in generated |
109 | * file | 109 | * file |
... | @@ -114,7 +114,7 @@ public class YangJavaAugment extends YangAugment | ... | @@ -114,7 +114,7 @@ public class YangJavaAugment extends YangAugment |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Get the temporary file handle. | 117 | + * Returns the temporary file handle. |
118 | * | 118 | * |
119 | * @return temporary file handle | 119 | * @return temporary file handle |
120 | */ | 120 | */ |
... | @@ -124,7 +124,7 @@ public class YangJavaAugment extends YangAugment | ... | @@ -124,7 +124,7 @@ public class YangJavaAugment extends YangAugment |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Set temporary file handle. | 127 | + * Sets temporary file handle. |
128 | * | 128 | * |
129 | * @param fileHandle temporary file handle | 129 | * @param fileHandle temporary file handle |
130 | */ | 130 | */ | ... | ... |
... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | - * Case information extended to support java code generation. | 38 | + * Represents case information extended to support java code generation. |
39 | */ | 39 | */ |
40 | public class YangJavaCase extends YangCase | 40 | public class YangJavaCase extends YangCase |
41 | implements JavaCodeGenerator, HasJavaFileInfo, | 41 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -59,7 +59,7 @@ public class YangJavaCase extends YangCase | ... | @@ -59,7 +59,7 @@ public class YangJavaCase extends YangCase |
59 | private TempJavaCodeFragmentFiles tempFileHandle; | 59 | private TempJavaCodeFragmentFiles tempFileHandle; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Default constructor. | 62 | + * Creates YANG java case object. |
63 | */ | 63 | */ |
64 | public YangJavaCase() { | 64 | public YangJavaCase() { |
65 | super(); | 65 | super(); |
... | @@ -69,7 +69,7 @@ public class YangJavaCase extends YangCase | ... | @@ -69,7 +69,7 @@ public class YangJavaCase extends YangCase |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * Get the generated java file information. | 72 | + * Returns the generated java file information. |
73 | * | 73 | * |
74 | * @return generated java file information | 74 | * @return generated java file information |
75 | */ | 75 | */ |
... | @@ -83,7 +83,7 @@ public class YangJavaCase extends YangCase | ... | @@ -83,7 +83,7 @@ public class YangJavaCase extends YangCase |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Set the java file info object. | 86 | + * Sets the java file info object. |
87 | * | 87 | * |
88 | * @param javaInfo java file info object | 88 | * @param javaInfo java file info object |
89 | */ | 89 | */ |
... | @@ -93,7 +93,7 @@ public class YangJavaCase extends YangCase | ... | @@ -93,7 +93,7 @@ public class YangJavaCase extends YangCase |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | - * Get the data of java imports to be included in generated file. | 96 | + * Returns the data of java imports to be included in generated file. |
97 | * | 97 | * |
98 | * @return data of java imports to be included in generated file | 98 | * @return data of java imports to be included in generated file |
99 | */ | 99 | */ |
... | @@ -103,7 +103,7 @@ public class YangJavaCase extends YangCase | ... | @@ -103,7 +103,7 @@ public class YangJavaCase extends YangCase |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | - * Set the data of java imports to be included in generated file. | 106 | + * Sets the data of java imports to be included in generated file. |
107 | * | 107 | * |
108 | * @param javaImportData data of java imports to be included in generated | 108 | * @param javaImportData data of java imports to be included in generated |
109 | * file | 109 | * file |
... | @@ -114,7 +114,7 @@ public class YangJavaCase extends YangCase | ... | @@ -114,7 +114,7 @@ public class YangJavaCase extends YangCase |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Get the temporary file handle. | 117 | + * Returns the temporary file handle. |
118 | * | 118 | * |
119 | * @return temporary file handle | 119 | * @return temporary file handle |
120 | */ | 120 | */ |
... | @@ -124,7 +124,7 @@ public class YangJavaCase extends YangCase | ... | @@ -124,7 +124,7 @@ public class YangJavaCase extends YangCase |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Set temporary file handle. | 127 | + * Sets temporary file handle. |
128 | * | 128 | * |
129 | * @param fileHandle temporary file handle | 129 | * @param fileHandle temporary file handle |
130 | */ | 130 | */ | ... | ... |
... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | - * Choice information extended to support java code generation. | 38 | + * Represents choice information extended to support java code generation. |
39 | */ | 39 | */ |
40 | public class YangJavaChoice extends YangChoice | 40 | public class YangJavaChoice extends YangChoice |
41 | implements JavaCodeGenerator, HasJavaFileInfo, | 41 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -59,7 +59,7 @@ public class YangJavaChoice extends YangChoice | ... | @@ -59,7 +59,7 @@ public class YangJavaChoice extends YangChoice |
59 | private TempJavaCodeFragmentFiles tempFileHandle; | 59 | private TempJavaCodeFragmentFiles tempFileHandle; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Default constructor. | 62 | + * Creates YANG java choice object. |
63 | */ | 63 | */ |
64 | public YangJavaChoice() { | 64 | public YangJavaChoice() { |
65 | super(); | 65 | super(); |
... | @@ -69,7 +69,7 @@ public class YangJavaChoice extends YangChoice | ... | @@ -69,7 +69,7 @@ public class YangJavaChoice extends YangChoice |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * Get the generated java file information. | 72 | + * Returns the generated java file information. |
73 | * | 73 | * |
74 | * @return generated java file information | 74 | * @return generated java file information |
75 | */ | 75 | */ |
... | @@ -83,7 +83,7 @@ public class YangJavaChoice extends YangChoice | ... | @@ -83,7 +83,7 @@ public class YangJavaChoice extends YangChoice |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Set the java file info object. | 86 | + * Sets the java file info object. |
87 | * | 87 | * |
88 | * @param javaInfo java file info object | 88 | * @param javaInfo java file info object |
89 | */ | 89 | */ |
... | @@ -93,7 +93,7 @@ public class YangJavaChoice extends YangChoice | ... | @@ -93,7 +93,7 @@ public class YangJavaChoice extends YangChoice |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | - * Get the data of java imports to be included in generated file. | 96 | + * Returns the data of java imports to be included in generated file. |
97 | * | 97 | * |
98 | * @return data of java imports to be included in generated file | 98 | * @return data of java imports to be included in generated file |
99 | */ | 99 | */ |
... | @@ -103,7 +103,7 @@ public class YangJavaChoice extends YangChoice | ... | @@ -103,7 +103,7 @@ public class YangJavaChoice extends YangChoice |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | - * Set the data of java imports to be included in generated file. | 106 | + * Sets the data of java imports to be included in generated file. |
107 | * | 107 | * |
108 | * @param javaImportData data of java imports to be included in generated | 108 | * @param javaImportData data of java imports to be included in generated |
109 | * file | 109 | * file |
... | @@ -114,7 +114,7 @@ public class YangJavaChoice extends YangChoice | ... | @@ -114,7 +114,7 @@ public class YangJavaChoice extends YangChoice |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Get the temporary file handle. | 117 | + * Returns the temporary file handle. |
118 | * | 118 | * |
119 | * @return temporary file handle | 119 | * @return temporary file handle |
120 | */ | 120 | */ |
... | @@ -124,7 +124,7 @@ public class YangJavaChoice extends YangChoice | ... | @@ -124,7 +124,7 @@ public class YangJavaChoice extends YangChoice |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Set temporary file handle. | 127 | + * Sets temporary file handle. |
128 | * | 128 | * |
129 | * @param fileHandle temporary file handle | 129 | * @param fileHandle temporary file handle |
130 | */ | 130 | */ | ... | ... |
... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | - * Container information extended to support java code generation. | 38 | + * Represents container information extended to support java code generation. |
39 | */ | 39 | */ |
40 | public class YangJavaContainer extends YangContainer | 40 | public class YangJavaContainer extends YangContainer |
41 | implements JavaCodeGenerator, HasJavaFileInfo, | 41 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -59,7 +59,7 @@ public class YangJavaContainer extends YangContainer | ... | @@ -59,7 +59,7 @@ public class YangJavaContainer extends YangContainer |
59 | private TempJavaCodeFragmentFiles tempFileHandle; | 59 | private TempJavaCodeFragmentFiles tempFileHandle; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Default constructor. | 62 | + * Creates YANG java container object. |
63 | */ | 63 | */ |
64 | public YangJavaContainer() { | 64 | public YangJavaContainer() { |
65 | super(); | 65 | super(); |
... | @@ -69,7 +69,7 @@ public class YangJavaContainer extends YangContainer | ... | @@ -69,7 +69,7 @@ public class YangJavaContainer extends YangContainer |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * Get the generated java file information. | 72 | + * Returns the generated java file information. |
73 | * | 73 | * |
74 | * @return generated java file information | 74 | * @return generated java file information |
75 | */ | 75 | */ |
... | @@ -83,7 +83,7 @@ public class YangJavaContainer extends YangContainer | ... | @@ -83,7 +83,7 @@ public class YangJavaContainer extends YangContainer |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Set the java file info object. | 86 | + * Sets the java file info object. |
87 | * | 87 | * |
88 | * @param javaInfo java file info object | 88 | * @param javaInfo java file info object |
89 | */ | 89 | */ |
... | @@ -93,7 +93,7 @@ public class YangJavaContainer extends YangContainer | ... | @@ -93,7 +93,7 @@ public class YangJavaContainer extends YangContainer |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | - * Get the data of java imports to be included in generated file. | 96 | + * Returns the data of java imports to be included in generated file. |
97 | * | 97 | * |
98 | * @return data of java imports to be included in generated file | 98 | * @return data of java imports to be included in generated file |
99 | */ | 99 | */ |
... | @@ -103,7 +103,7 @@ public class YangJavaContainer extends YangContainer | ... | @@ -103,7 +103,7 @@ public class YangJavaContainer extends YangContainer |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | - * Set the data of java imports to be included in generated file. | 106 | + * Sets the data of java imports to be included in generated file. |
107 | * | 107 | * |
108 | * @param javaImportData data of java imports to be included in generated | 108 | * @param javaImportData data of java imports to be included in generated |
109 | * file | 109 | * file |
... | @@ -114,7 +114,7 @@ public class YangJavaContainer extends YangContainer | ... | @@ -114,7 +114,7 @@ public class YangJavaContainer extends YangContainer |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Get the temporary file handle. | 117 | + * Returns the temporary file handle. |
118 | * | 118 | * |
119 | * @return temporary file handle | 119 | * @return temporary file handle |
120 | */ | 120 | */ |
... | @@ -124,7 +124,7 @@ public class YangJavaContainer extends YangContainer | ... | @@ -124,7 +124,7 @@ public class YangJavaContainer extends YangContainer |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Set temporary file handle. | 127 | + * Sets temporary file handle. |
128 | * | 128 | * |
129 | * @param fileHandle temporary file handle | 129 | * @param fileHandle temporary file handle |
130 | */ | 130 | */ | ... | ... |
... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | - * Grouping information extended to support java code generation. | 38 | + * Represents grouping information extended to support java code generation. |
39 | */ | 39 | */ |
40 | public class YangJavaGrouping extends YangGrouping | 40 | public class YangJavaGrouping extends YangGrouping |
41 | implements JavaCodeGenerator, HasJavaFileInfo, | 41 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -59,7 +59,7 @@ public class YangJavaGrouping extends YangGrouping | ... | @@ -59,7 +59,7 @@ public class YangJavaGrouping extends YangGrouping |
59 | private TempJavaCodeFragmentFiles tempFileHandle; | 59 | private TempJavaCodeFragmentFiles tempFileHandle; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Default constructor. | 62 | + * Creates YANG java grouping object. |
63 | */ | 63 | */ |
64 | public YangJavaGrouping() { | 64 | public YangJavaGrouping() { |
65 | super(); | 65 | super(); |
... | @@ -69,7 +69,7 @@ public class YangJavaGrouping extends YangGrouping | ... | @@ -69,7 +69,7 @@ public class YangJavaGrouping extends YangGrouping |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * Get the generated java file information. | 72 | + * Returns the generated java file information. |
73 | * | 73 | * |
74 | * @return generated java file information | 74 | * @return generated java file information |
75 | */ | 75 | */ |
... | @@ -83,7 +83,7 @@ public class YangJavaGrouping extends YangGrouping | ... | @@ -83,7 +83,7 @@ public class YangJavaGrouping extends YangGrouping |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Set the java file info object. | 86 | + * Sets the java file info object. |
87 | * | 87 | * |
88 | * @param javaInfo java file info object | 88 | * @param javaInfo java file info object |
89 | */ | 89 | */ |
... | @@ -93,7 +93,7 @@ public class YangJavaGrouping extends YangGrouping | ... | @@ -93,7 +93,7 @@ public class YangJavaGrouping extends YangGrouping |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | - * Get the data of java imports to be included in generated file. | 96 | + * Returns the data of java imports to be included in generated file. |
97 | * | 97 | * |
98 | * @return data of java imports to be included in generated file | 98 | * @return data of java imports to be included in generated file |
99 | */ | 99 | */ |
... | @@ -103,7 +103,7 @@ public class YangJavaGrouping extends YangGrouping | ... | @@ -103,7 +103,7 @@ public class YangJavaGrouping extends YangGrouping |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | - * Set the data of java imports to be included in generated file. | 106 | + * Sets the data of java imports to be included in generated file. |
107 | * | 107 | * |
108 | * @param javaImportData data of java imports to be included in generated | 108 | * @param javaImportData data of java imports to be included in generated |
109 | * file | 109 | * file |
... | @@ -114,7 +114,7 @@ public class YangJavaGrouping extends YangGrouping | ... | @@ -114,7 +114,7 @@ public class YangJavaGrouping extends YangGrouping |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Get the temporary file handle. | 117 | + * Returns the temporary file handle. |
118 | * | 118 | * |
119 | * @return temporary file handle | 119 | * @return temporary file handle |
120 | */ | 120 | */ |
... | @@ -124,7 +124,7 @@ public class YangJavaGrouping extends YangGrouping | ... | @@ -124,7 +124,7 @@ public class YangJavaGrouping extends YangGrouping |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Set temporary file handle. | 127 | + * Sets temporary file handle. |
128 | * | 128 | * |
129 | * @param fileHandle temporary file handle | 129 | * @param fileHandle temporary file handle |
130 | */ | 130 | */ | ... | ... |
... | @@ -37,7 +37,7 @@ import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.createPacka | ... | @@ -37,7 +37,7 @@ import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.createPacka |
37 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 37 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
38 | 38 | ||
39 | /** | 39 | /** |
40 | - * Input information extended to support java code generation. | 40 | + * Represents input information extended to support java code generation. |
41 | */ | 41 | */ |
42 | public class YangJavaInput extends YangInput | 42 | public class YangJavaInput extends YangInput |
43 | implements JavaCodeGenerator, HasJavaFileInfo, | 43 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -85,7 +85,7 @@ public class YangJavaInput extends YangInput | ... | @@ -85,7 +85,7 @@ public class YangJavaInput extends YangInput |
85 | } | 85 | } |
86 | 86 | ||
87 | /** | 87 | /** |
88 | - * Set the java file info object. | 88 | + * Sets the java file info object. |
89 | * | 89 | * |
90 | * @param javaInfo java file info object | 90 | * @param javaInfo java file info object |
91 | */ | 91 | */ |
... | @@ -105,7 +105,7 @@ public class YangJavaInput extends YangInput | ... | @@ -105,7 +105,7 @@ public class YangJavaInput extends YangInput |
105 | } | 105 | } |
106 | 106 | ||
107 | /** | 107 | /** |
108 | - * Set the data of java imports to be included in generated file. | 108 | + * Sets the data of java imports to be included in generated file. |
109 | * | 109 | * |
110 | * @param javaImportData data of java imports to be included in generated | 110 | * @param javaImportData data of java imports to be included in generated |
111 | * file | 111 | * file |
... | @@ -126,7 +126,7 @@ public class YangJavaInput extends YangInput | ... | @@ -126,7 +126,7 @@ public class YangJavaInput extends YangInput |
126 | } | 126 | } |
127 | 127 | ||
128 | /** | 128 | /** |
129 | - * Set temporary file handle. | 129 | + * Sets temporary file handle. |
130 | * | 130 | * |
131 | * @param fileHandle temporary file handle | 131 | * @param fileHandle temporary file handle |
132 | */ | 132 | */ | ... | ... |
... | @@ -36,7 +36,7 @@ import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.createPacka | ... | @@ -36,7 +36,7 @@ import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.createPacka |
36 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 36 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
37 | 37 | ||
38 | /** | 38 | /** |
39 | - * YANG List information extended to support java code generation. | 39 | + * Represents YANG List information extended to support java code generation. |
40 | */ | 40 | */ |
41 | public class YangJavaList extends YangList | 41 | public class YangJavaList extends YangList |
42 | implements JavaCodeGenerator, HasJavaFileInfo, | 42 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -60,7 +60,7 @@ public class YangJavaList extends YangList | ... | @@ -60,7 +60,7 @@ public class YangJavaList extends YangList |
60 | private TempJavaCodeFragmentFiles tempFileHandle; | 60 | private TempJavaCodeFragmentFiles tempFileHandle; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | - * Default constructor. | 63 | + * Creates YANG java list object. |
64 | */ | 64 | */ |
65 | public YangJavaList() { | 65 | public YangJavaList() { |
66 | super(); | 66 | super(); |
... | @@ -70,7 +70,7 @@ public class YangJavaList extends YangList | ... | @@ -70,7 +70,7 @@ public class YangJavaList extends YangList |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | - * Get the generated java file information. | 73 | + * Returns the generated java file information. |
74 | * | 74 | * |
75 | * @return generated java file information | 75 | * @return generated java file information |
76 | */ | 76 | */ |
... | @@ -84,7 +84,7 @@ public class YangJavaList extends YangList | ... | @@ -84,7 +84,7 @@ public class YangJavaList extends YangList |
84 | } | 84 | } |
85 | 85 | ||
86 | /** | 86 | /** |
87 | - * Set the java file info object. | 87 | + * Sets the java file info object. |
88 | * | 88 | * |
89 | * @param javaInfo java file info object | 89 | * @param javaInfo java file info object |
90 | */ | 90 | */ |
... | @@ -94,7 +94,7 @@ public class YangJavaList extends YangList | ... | @@ -94,7 +94,7 @@ public class YangJavaList extends YangList |
94 | } | 94 | } |
95 | 95 | ||
96 | /** | 96 | /** |
97 | - * Get the data of java imports to be included in generated file. | 97 | + * Returns the data of java imports to be included in generated file. |
98 | * | 98 | * |
99 | * @return data of java imports to be included in generated file | 99 | * @return data of java imports to be included in generated file |
100 | */ | 100 | */ |
... | @@ -104,7 +104,7 @@ public class YangJavaList extends YangList | ... | @@ -104,7 +104,7 @@ public class YangJavaList extends YangList |
104 | } | 104 | } |
105 | 105 | ||
106 | /** | 106 | /** |
107 | - * Set the data of java imports to be included in generated file. | 107 | + * Sets the data of java imports to be included in generated file. |
108 | * | 108 | * |
109 | * @param javaImportData data of java imports to be included in generated | 109 | * @param javaImportData data of java imports to be included in generated |
110 | * file | 110 | * file |
... | @@ -115,7 +115,7 @@ public class YangJavaList extends YangList | ... | @@ -115,7 +115,7 @@ public class YangJavaList extends YangList |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | - * Get the temporary file handle. | 118 | + * Returns the temporary file handle. |
119 | * | 119 | * |
120 | * @return temporary file handle | 120 | * @return temporary file handle |
121 | */ | 121 | */ |
... | @@ -125,7 +125,7 @@ public class YangJavaList extends YangList | ... | @@ -125,7 +125,7 @@ public class YangJavaList extends YangList |
125 | } | 125 | } |
126 | 126 | ||
127 | /** | 127 | /** |
128 | - * Set temporary file handle. | 128 | + * Sets temporary file handle. |
129 | * | 129 | * |
130 | * @param fileHandle temporary file handle | 130 | * @param fileHandle temporary file handle |
131 | */ | 131 | */ | ... | ... |
... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | - * Module information extended to support java code generation. | 38 | + * Represents module information extended to support java code generation. |
39 | */ | 39 | */ |
40 | public class YangJavaModule extends YangModule | 40 | public class YangJavaModule extends YangModule |
41 | implements JavaCodeGenerator, HasJavaFileInfo, | 41 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -69,7 +69,7 @@ public class YangJavaModule extends YangModule | ... | @@ -69,7 +69,7 @@ public class YangJavaModule extends YangModule |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * Get the generated java file information. | 72 | + * Returns the generated java file information. |
73 | * | 73 | * |
74 | * @return generated java file information | 74 | * @return generated java file information |
75 | */ | 75 | */ |
... | @@ -83,7 +83,7 @@ public class YangJavaModule extends YangModule | ... | @@ -83,7 +83,7 @@ public class YangJavaModule extends YangModule |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Set the java file info object. | 86 | + * Sets the java file info object. |
87 | * | 87 | * |
88 | * @param javaInfo java file info object | 88 | * @param javaInfo java file info object |
89 | */ | 89 | */ |
... | @@ -93,7 +93,7 @@ public class YangJavaModule extends YangModule | ... | @@ -93,7 +93,7 @@ public class YangJavaModule extends YangModule |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | - * Get the data of java imports to be included in generated file. | 96 | + * Returns the data of java imports to be included in generated file. |
97 | * | 97 | * |
98 | * @return data of java imports to be included in generated file | 98 | * @return data of java imports to be included in generated file |
99 | */ | 99 | */ |
... | @@ -103,7 +103,7 @@ public class YangJavaModule extends YangModule | ... | @@ -103,7 +103,7 @@ public class YangJavaModule extends YangModule |
103 | } | 103 | } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | - * Set the data of java imports to be included in generated file. | 106 | + * Sets the data of java imports to be included in generated file. |
107 | * | 107 | * |
108 | * @param javaImportData data of java imports to be included in generated | 108 | * @param javaImportData data of java imports to be included in generated |
109 | * file | 109 | * file |
... | @@ -114,7 +114,7 @@ public class YangJavaModule extends YangModule | ... | @@ -114,7 +114,7 @@ public class YangJavaModule extends YangModule |
114 | } | 114 | } |
115 | 115 | ||
116 | /** | 116 | /** |
117 | - * Get the temporary file handle. | 117 | + * Returns the temporary file handle. |
118 | * | 118 | * |
119 | * @return temporary file handle | 119 | * @return temporary file handle |
120 | */ | 120 | */ |
... | @@ -124,7 +124,7 @@ public class YangJavaModule extends YangModule | ... | @@ -124,7 +124,7 @@ public class YangJavaModule extends YangModule |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
127 | - * Set temporary file handle. | 127 | + * Sets temporary file handle. |
128 | * | 128 | * |
129 | * @param fileHandle temporary file handle | 129 | * @param fileHandle temporary file handle |
130 | */ | 130 | */ | ... | ... |
... | @@ -17,8 +17,9 @@ | ... | @@ -17,8 +17,9 @@ |
17 | package org.onosproject.yangutils.translator.tojava.javamodel; | 17 | package org.onosproject.yangutils.translator.tojava.javamodel; |
18 | 18 | ||
19 | import java.io.IOException; | 19 | import java.io.IOException; |
20 | -import org.onosproject.yangutils.translator.exception.TranslatorException; | 20 | + |
21 | import org.onosproject.yangutils.datamodel.YangNotification; | 21 | import org.onosproject.yangutils.datamodel.YangNotification; |
22 | +import org.onosproject.yangutils.translator.exception.TranslatorException; | ||
22 | import org.onosproject.yangutils.translator.tojava.HasJavaFileInfo; | 23 | import org.onosproject.yangutils.translator.tojava.HasJavaFileInfo; |
23 | import org.onosproject.yangutils.translator.tojava.HasJavaImportData; | 24 | import org.onosproject.yangutils.translator.tojava.HasJavaImportData; |
24 | import org.onosproject.yangutils.translator.tojava.HasTempJavaCodeFragmentFiles; | 25 | import org.onosproject.yangutils.translator.tojava.HasTempJavaCodeFragmentFiles; |
... | @@ -35,7 +36,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +36,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 36 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 37 | ||
37 | /** | 38 | /** |
38 | - * Notification information extended to support java code generation. | 39 | + * Represents notification information extended to support java code generation. |
39 | */ | 40 | */ |
40 | public class YangJavaNotification extends YangNotification | 41 | public class YangJavaNotification extends YangNotification |
41 | implements JavaCodeGenerator, HasJavaFileInfo, | 42 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -83,7 +84,7 @@ public class YangJavaNotification extends YangNotification | ... | @@ -83,7 +84,7 @@ public class YangJavaNotification extends YangNotification |
83 | } | 84 | } |
84 | 85 | ||
85 | /** | 86 | /** |
86 | - * Set the java file info object. | 87 | + * Sets the java file info object. |
87 | * | 88 | * |
88 | * @param javaInfo java file info object | 89 | * @param javaInfo java file info object |
89 | */ | 90 | */ |
... | @@ -103,7 +104,7 @@ public class YangJavaNotification extends YangNotification | ... | @@ -103,7 +104,7 @@ public class YangJavaNotification extends YangNotification |
103 | } | 104 | } |
104 | 105 | ||
105 | /** | 106 | /** |
106 | - * Set the data of java imports to be included in generated file. | 107 | + * Sets the data of java imports to be included in generated file. |
107 | * | 108 | * |
108 | * @param javaImportData data of java imports to be included in generated | 109 | * @param javaImportData data of java imports to be included in generated |
109 | * file | 110 | * file |
... | @@ -124,7 +125,7 @@ public class YangJavaNotification extends YangNotification | ... | @@ -124,7 +125,7 @@ public class YangJavaNotification extends YangNotification |
124 | } | 125 | } |
125 | 126 | ||
126 | /** | 127 | /** |
127 | - * Set temporary file handle. | 128 | + * Sets temporary file handle. |
128 | * | 129 | * |
129 | * @param fileHandle temporary file handle | 130 | * @param fileHandle temporary file handle |
130 | */ | 131 | */ | ... | ... |
... | @@ -37,7 +37,7 @@ import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.createPacka | ... | @@ -37,7 +37,7 @@ import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.createPacka |
37 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 37 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
38 | 38 | ||
39 | /** | 39 | /** |
40 | - * Output information extended to support java code generation. | 40 | + * Represents output information extended to support java code generation. |
41 | */ | 41 | */ |
42 | public class YangJavaOutput extends YangOutput | 42 | public class YangJavaOutput extends YangOutput |
43 | implements JavaCodeGenerator, HasJavaFileInfo, | 43 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -85,7 +85,7 @@ public class YangJavaOutput extends YangOutput | ... | @@ -85,7 +85,7 @@ public class YangJavaOutput extends YangOutput |
85 | } | 85 | } |
86 | 86 | ||
87 | /** | 87 | /** |
88 | - * Set the java file info object. | 88 | + * Sets the java file info object. |
89 | * | 89 | * |
90 | * @param javaInfo java file info object | 90 | * @param javaInfo java file info object |
91 | */ | 91 | */ |
... | @@ -105,7 +105,7 @@ public class YangJavaOutput extends YangOutput | ... | @@ -105,7 +105,7 @@ public class YangJavaOutput extends YangOutput |
105 | } | 105 | } |
106 | 106 | ||
107 | /** | 107 | /** |
108 | - * Set the data of java imports to be included in generated file. | 108 | + * Sets the data of java imports to be included in generated file. |
109 | * | 109 | * |
110 | * @param javaImportData data of java imports to be included in generated | 110 | * @param javaImportData data of java imports to be included in generated |
111 | * file | 111 | * file |
... | @@ -126,7 +126,7 @@ public class YangJavaOutput extends YangOutput | ... | @@ -126,7 +126,7 @@ public class YangJavaOutput extends YangOutput |
126 | } | 126 | } |
127 | 127 | ||
128 | /** | 128 | /** |
129 | - * Set temporary file handle. | 129 | + * Sets temporary file handle. |
130 | * | 130 | * |
131 | * @param fileHandle temporary file handle | 131 | * @param fileHandle temporary file handle |
132 | */ | 132 | */ | ... | ... |
utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaRpc.java
... | @@ -21,7 +21,7 @@ import org.onosproject.yangutils.datamodel.YangRpc; | ... | @@ -21,7 +21,7 @@ import org.onosproject.yangutils.datamodel.YangRpc; |
21 | import org.onosproject.yangutils.translator.tojava.JavaCodeGenerator; | 21 | import org.onosproject.yangutils.translator.tojava.JavaCodeGenerator; |
22 | 22 | ||
23 | /** | 23 | /** |
24 | - * Rpc information extended to support java code generation. | 24 | + * Represents rpc information extended to support java code generation. |
25 | */ | 25 | */ |
26 | public class YangJavaRpc extends YangRpc implements JavaCodeGenerator { | 26 | public class YangJavaRpc extends YangRpc implements JavaCodeGenerator { |
27 | 27 | ||
... | @@ -32,7 +32,7 @@ public class YangJavaRpc extends YangRpc implements JavaCodeGenerator { | ... | @@ -32,7 +32,7 @@ public class YangJavaRpc extends YangRpc implements JavaCodeGenerator { |
32 | } | 32 | } |
33 | 33 | ||
34 | /** | 34 | /** |
35 | - * Prepare the information for java code generation corresponding to YANG | 35 | + * Prepares the information for java code generation corresponding to YANG |
36 | * rpc info. | 36 | * rpc info. |
37 | * | 37 | * |
38 | * @param codeGenDir code generation directory | 38 | * @param codeGenDir code generation directory |
... | @@ -44,7 +44,7 @@ public class YangJavaRpc extends YangRpc implements JavaCodeGenerator { | ... | @@ -44,7 +44,7 @@ public class YangJavaRpc extends YangRpc implements JavaCodeGenerator { |
44 | } | 44 | } |
45 | 45 | ||
46 | /** | 46 | /** |
47 | - * Create a java file using the YANG rpc info. | 47 | + * Creates a java file using the YANG rpc info. |
48 | * | 48 | * |
49 | * @throws IOException IO operation fail | 49 | * @throws IOException IO operation fail |
50 | */ | 50 | */ | ... | ... |
... | @@ -36,7 +36,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -36,7 +36,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
36 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 36 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
37 | 37 | ||
38 | /** | 38 | /** |
39 | - * Sub module information extended to support java code generation. | 39 | + * Represents Sub module information extended to support java code generation. |
40 | */ | 40 | */ |
41 | public class YangJavaSubModule extends YangSubModule | 41 | public class YangJavaSubModule extends YangSubModule |
42 | implements JavaCodeGenerator, HasJavaFileInfo, | 42 | implements JavaCodeGenerator, HasJavaFileInfo, |
... | @@ -60,7 +60,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -60,7 +60,7 @@ public class YangJavaSubModule extends YangSubModule |
60 | private TempJavaCodeFragmentFiles tempFileHandle; | 60 | private TempJavaCodeFragmentFiles tempFileHandle; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | - * Default constructor. | 63 | + * Creates YANG java sub module object. |
64 | */ | 64 | */ |
65 | public YangJavaSubModule() { | 65 | public YangJavaSubModule() { |
66 | super(); | 66 | super(); |
... | @@ -70,7 +70,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -70,7 +70,7 @@ public class YangJavaSubModule extends YangSubModule |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | - * Get the generated java file information. | 73 | + * Returns the generated java file information. |
74 | * | 74 | * |
75 | * @return generated java file information | 75 | * @return generated java file information |
76 | */ | 76 | */ |
... | @@ -84,7 +84,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -84,7 +84,7 @@ public class YangJavaSubModule extends YangSubModule |
84 | } | 84 | } |
85 | 85 | ||
86 | /** | 86 | /** |
87 | - * Set the java file info object. | 87 | + * Sets the java file info object. |
88 | * | 88 | * |
89 | * @param javaInfo java file info object | 89 | * @param javaInfo java file info object |
90 | */ | 90 | */ |
... | @@ -94,7 +94,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -94,7 +94,7 @@ public class YangJavaSubModule extends YangSubModule |
94 | } | 94 | } |
95 | 95 | ||
96 | /** | 96 | /** |
97 | - * Get the data of java imports to be included in generated file. | 97 | + * Returns the data of java imports to be included in generated file. |
98 | * | 98 | * |
99 | * @return data of java imports to be included in generated file | 99 | * @return data of java imports to be included in generated file |
100 | */ | 100 | */ |
... | @@ -104,7 +104,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -104,7 +104,7 @@ public class YangJavaSubModule extends YangSubModule |
104 | } | 104 | } |
105 | 105 | ||
106 | /** | 106 | /** |
107 | - * Set the data of java imports to be included in generated file. | 107 | + * Sets the data of java imports to be included in generated file. |
108 | * | 108 | * |
109 | * @param javaImportData data of java imports to be included in generated | 109 | * @param javaImportData data of java imports to be included in generated |
110 | * file | 110 | * file |
... | @@ -115,7 +115,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -115,7 +115,7 @@ public class YangJavaSubModule extends YangSubModule |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | - * Get the temporary file handle. | 118 | + * Returns the temporary file handle. |
119 | * | 119 | * |
120 | * @return temporary file handle | 120 | * @return temporary file handle |
121 | */ | 121 | */ |
... | @@ -125,7 +125,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -125,7 +125,7 @@ public class YangJavaSubModule extends YangSubModule |
125 | } | 125 | } |
126 | 126 | ||
127 | /** | 127 | /** |
128 | - * Set temporary file handle. | 128 | + * Sets temporary file handle. |
129 | * | 129 | * |
130 | * @param fileHandle temporary file handle | 130 | * @param fileHandle temporary file handle |
131 | */ | 131 | */ |
... | @@ -135,7 +135,7 @@ public class YangJavaSubModule extends YangSubModule | ... | @@ -135,7 +135,7 @@ public class YangJavaSubModule extends YangSubModule |
135 | } | 135 | } |
136 | 136 | ||
137 | /** | 137 | /** |
138 | - * Get the name space of the module to which the sub module belongs to. | 138 | + * Returns the name space of the module to which the sub module belongs to. |
139 | * | 139 | * |
140 | * @param belongsToInfo Information of the module to which the sub module | 140 | * @param belongsToInfo Information of the module to which the sub module |
141 | * belongs | 141 | * belongs | ... | ... |
... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -35,7 +35,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; | 35 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | - * Type define information extended to support java code generation. | 38 | + * Represents type define information extended to support java code generation. |
39 | */ | 39 | */ |
40 | public class YangJavaTypeDef extends YangTypeDef | 40 | public class YangJavaTypeDef extends YangTypeDef |
41 | implements JavaCodeGenerator, HasJavaFileInfo, HasJavaImportData, HasTempJavaCodeFragmentFiles { | 41 | implements JavaCodeGenerator, HasJavaFileInfo, HasJavaImportData, HasTempJavaCodeFragmentFiles { |
... | @@ -58,7 +58,7 @@ public class YangJavaTypeDef extends YangTypeDef | ... | @@ -58,7 +58,7 @@ public class YangJavaTypeDef extends YangTypeDef |
58 | private TempJavaCodeFragmentFiles tempFileHandle; | 58 | private TempJavaCodeFragmentFiles tempFileHandle; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | - * Default constructor. | 61 | + * Creates a YANG java typedef object. |
62 | */ | 62 | */ |
63 | public YangJavaTypeDef() { | 63 | public YangJavaTypeDef() { |
64 | super(); | 64 | super(); |
... | @@ -68,7 +68,7 @@ public class YangJavaTypeDef extends YangTypeDef | ... | @@ -68,7 +68,7 @@ public class YangJavaTypeDef extends YangTypeDef |
68 | } | 68 | } |
69 | 69 | ||
70 | /** | 70 | /** |
71 | - * Get the generated java file information. | 71 | + * Returns the generated java file information. |
72 | * | 72 | * |
73 | * @return generated java file information | 73 | * @return generated java file information |
74 | */ | 74 | */ |
... | @@ -82,7 +82,7 @@ public class YangJavaTypeDef extends YangTypeDef | ... | @@ -82,7 +82,7 @@ public class YangJavaTypeDef extends YangTypeDef |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | - * Set the java file info object. | 85 | + * Sets the java file info object. |
86 | * | 86 | * |
87 | * @param javaInfo java file info object | 87 | * @param javaInfo java file info object |
88 | */ | 88 | */ |
... | @@ -92,7 +92,7 @@ public class YangJavaTypeDef extends YangTypeDef | ... | @@ -92,7 +92,7 @@ public class YangJavaTypeDef extends YangTypeDef |
92 | } | 92 | } |
93 | 93 | ||
94 | /** | 94 | /** |
95 | - * Get the data of java imports to be included in generated file. | 95 | + * Returns the data of java imports to be included in generated file. |
96 | * | 96 | * |
97 | * @return data of java imports to be included in generated file | 97 | * @return data of java imports to be included in generated file |
98 | */ | 98 | */ |
... | @@ -102,7 +102,7 @@ public class YangJavaTypeDef extends YangTypeDef | ... | @@ -102,7 +102,7 @@ public class YangJavaTypeDef extends YangTypeDef |
102 | } | 102 | } |
103 | 103 | ||
104 | /** | 104 | /** |
105 | - * Set the data of java imports to be included in generated file. | 105 | + * Sets the data of java imports to be included in generated file. |
106 | * | 106 | * |
107 | * @param javaImportData data of java imports to be included in generated | 107 | * @param javaImportData data of java imports to be included in generated |
108 | * file | 108 | * file |
... | @@ -113,7 +113,7 @@ public class YangJavaTypeDef extends YangTypeDef | ... | @@ -113,7 +113,7 @@ public class YangJavaTypeDef extends YangTypeDef |
113 | } | 113 | } |
114 | 114 | ||
115 | /** | 115 | /** |
116 | - * Get the temporary file handle. | 116 | + * Returns the temporary file handle. |
117 | * | 117 | * |
118 | * @return temporary file handle | 118 | * @return temporary file handle |
119 | */ | 119 | */ |
... | @@ -123,7 +123,7 @@ public class YangJavaTypeDef extends YangTypeDef | ... | @@ -123,7 +123,7 @@ public class YangJavaTypeDef extends YangTypeDef |
123 | } | 123 | } |
124 | 124 | ||
125 | /** | 125 | /** |
126 | - * Set temporary file handle. | 126 | + * Sets temporary file handle. |
127 | * | 127 | * |
128 | * @param fileHandle temporary file handle | 128 | * @param fileHandle temporary file handle |
129 | */ | 129 | */ | ... | ... |
... | @@ -30,7 +30,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy | ... | @@ -30,7 +30,7 @@ import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSy |
30 | import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getPackageDirPathFromJavaJPackage; | 30 | import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getPackageDirPathFromJavaJPackage; |
31 | 31 | ||
32 | /** | 32 | /** |
33 | - * Uses information extended to support java code generation. | 33 | + * Represents uses information extended to support java code generation. |
34 | */ | 34 | */ |
35 | public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJavaFileInfo, HasJavaImportData { | 35 | public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJavaFileInfo, HasJavaImportData { |
36 | 36 | ||
... | @@ -46,7 +46,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava | ... | @@ -46,7 +46,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava |
46 | private JavaImportData javaImportData; | 46 | private JavaImportData javaImportData; |
47 | 47 | ||
48 | /** | 48 | /** |
49 | - * Default constructor. | 49 | + * Creates YANG java uses object. |
50 | */ | 50 | */ |
51 | public YangJavaUses() { | 51 | public YangJavaUses() { |
52 | super(); | 52 | super(); |
... | @@ -56,7 +56,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava | ... | @@ -56,7 +56,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava |
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | - * Get the generated java file information. | 59 | + * Returns the generated java file information. |
60 | * | 60 | * |
61 | * @return generated java file information | 61 | * @return generated java file information |
62 | */ | 62 | */ |
... | @@ -70,7 +70,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava | ... | @@ -70,7 +70,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava |
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | - * Set the java file info object. | 73 | + * Sets the java file info object. |
74 | * | 74 | * |
75 | * @param javaInfo java file info object | 75 | * @param javaInfo java file info object |
76 | */ | 76 | */ |
... | @@ -80,7 +80,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava | ... | @@ -80,7 +80,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava |
80 | } | 80 | } |
81 | 81 | ||
82 | /** | 82 | /** |
83 | - * Get the data of java imports to be included in generated file. | 83 | + * Returns the data of java imports to be included in generated file. |
84 | * | 84 | * |
85 | * @return data of java imports to be included in generated file | 85 | * @return data of java imports to be included in generated file |
86 | */ | 86 | */ |
... | @@ -90,7 +90,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava | ... | @@ -90,7 +90,7 @@ public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJava |
90 | } | 90 | } |
91 | 91 | ||
92 | /** | 92 | /** |
93 | - * Set the data of java imports to be included in generated file. | 93 | + * Sets the data of java imports to be included in generated file. |
94 | * | 94 | * |
95 | * @param javaImportData data of java imports to be included in generated | 95 | * @param javaImportData data of java imports to be included in generated |
96 | * file | 96 | * file | ... | ... |
... | @@ -59,14 +59,14 @@ import static org.onosproject.yangutils.utils.UtilConstants.SHORT_WRAPPER; | ... | @@ -59,14 +59,14 @@ import static org.onosproject.yangutils.utils.UtilConstants.SHORT_WRAPPER; |
59 | import static org.onosproject.yangutils.utils.UtilConstants.STRING_DATA_TYPE; | 59 | import static org.onosproject.yangutils.utils.UtilConstants.STRING_DATA_TYPE; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | - * Provides java data types corresponding to YANG type. | 62 | + * Represents java data types info corresponding to YANG type. |
63 | */ | 63 | */ |
64 | public final class AttributesJavaDataType { | 64 | public final class AttributesJavaDataType { |
65 | 65 | ||
66 | private static Set<JavaQualifiedTypeInfo> importInfo = new TreeSet<>(); | 66 | private static Set<JavaQualifiedTypeInfo> importInfo = new TreeSet<>(); |
67 | 67 | ||
68 | /** | 68 | /** |
69 | - * Default constructor. | 69 | + * Creates an instance of attribute java data type. |
70 | */ | 70 | */ |
71 | private AttributesJavaDataType() { | 71 | private AttributesJavaDataType() { |
72 | } | 72 | } | ... | ... |
... | @@ -34,12 +34,12 @@ import static org.onosproject.yangutils.utils.UtilConstants.PUBLIC; | ... | @@ -34,12 +34,12 @@ import static org.onosproject.yangutils.utils.UtilConstants.PUBLIC; |
34 | import static org.onosproject.yangutils.utils.UtilConstants.SPACE; | 34 | import static org.onosproject.yangutils.utils.UtilConstants.SPACE; |
35 | 35 | ||
36 | /** | 36 | /** |
37 | - * Generates class definition for generated files. | 37 | + * Represents generator for class definition of generated files. |
38 | */ | 38 | */ |
39 | public final class ClassDefinitionGenerator { | 39 | public final class ClassDefinitionGenerator { |
40 | 40 | ||
41 | /** | 41 | /** |
42 | - * Default constructor. | 42 | + * Creates an instance of class definition generator. |
43 | */ | 43 | */ |
44 | private ClassDefinitionGenerator() { | 44 | private ClassDefinitionGenerator() { |
45 | } | 45 | } | ... | ... |
... | @@ -32,18 +32,18 @@ import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN; | ... | @@ -32,18 +32,18 @@ import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN; |
32 | import static org.onosproject.yangutils.utils.UtilConstants.SPACE; | 32 | import static org.onosproject.yangutils.utils.UtilConstants.SPACE; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | - * Utility class to generate the java snippet. | 35 | + * Represents utility class to generate the java snippet. |
36 | */ | 36 | */ |
37 | public final class JavaCodeSnippetGen { | 37 | public final class JavaCodeSnippetGen { |
38 | 38 | ||
39 | /** | 39 | /** |
40 | - * Default constructor. | 40 | + * Creates an instance of java code snippet gen. |
41 | */ | 41 | */ |
42 | private JavaCodeSnippetGen() { | 42 | private JavaCodeSnippetGen() { |
43 | } | 43 | } |
44 | 44 | ||
45 | /** | 45 | /** |
46 | - * Get the java file header comment. | 46 | + * Returns the java file header comment. |
47 | * | 47 | * |
48 | * @return the java file header comment | 48 | * @return the java file header comment |
49 | */ | 49 | */ |
... | @@ -56,19 +56,18 @@ public final class JavaCodeSnippetGen { | ... | @@ -56,19 +56,18 @@ public final class JavaCodeSnippetGen { |
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | - * Get the textual java code information corresponding to the import list. | 59 | + * Returns the textual java code information corresponding to the import list. |
60 | * | 60 | * |
61 | * @param importInfo import info | 61 | * @param importInfo import info |
62 | * @return the textual java code information corresponding to the import | 62 | * @return the textual java code information corresponding to the import |
63 | * list | 63 | * list |
64 | */ | 64 | */ |
65 | public static String getImportText(JavaQualifiedTypeInfo importInfo) { | 65 | public static String getImportText(JavaQualifiedTypeInfo importInfo) { |
66 | - | ||
67 | return IMPORT + importInfo.getPkgInfo() + PERIOD + importInfo.getClassInfo() + SEMI_COLAN + NEW_LINE; | 66 | return IMPORT + importInfo.getPkgInfo() + PERIOD + importInfo.getClassInfo() + SEMI_COLAN + NEW_LINE; |
68 | } | 67 | } |
69 | 68 | ||
70 | /** | 69 | /** |
71 | - * Based on the file type and the YANG name of the file, generate the class | 70 | + * Returns based on the file type and the YANG name of the file, generate the class |
72 | * / interface definition start. | 71 | * / interface definition start. |
73 | * | 72 | * |
74 | * @param genFileTypes type of file being generated | 73 | * @param genFileTypes type of file being generated |
... | @@ -85,7 +84,7 @@ public final class JavaCodeSnippetGen { | ... | @@ -85,7 +84,7 @@ public final class JavaCodeSnippetGen { |
85 | } | 84 | } |
86 | 85 | ||
87 | /** | 86 | /** |
88 | - * Get the textual java code for attribute definition in class. | 87 | + * Returns the textual java code for attribute definition in class. |
89 | * | 88 | * |
90 | * @param javaAttributeTypePkg Package of the attribute type | 89 | * @param javaAttributeTypePkg Package of the attribute type |
91 | * @param javaAttributeType java attribute type | 90 | * @param javaAttributeType java attribute type |
... | @@ -124,18 +123,16 @@ public final class JavaCodeSnippetGen { | ... | @@ -124,18 +123,16 @@ public final class JavaCodeSnippetGen { |
124 | * @return list attribute string | 123 | * @return list attribute string |
125 | */ | 124 | */ |
126 | public static String getListAttribute(String type) { | 125 | public static String getListAttribute(String type) { |
127 | - | ||
128 | return LIST + DIAMOND_OPEN_BRACKET + type + DIAMOND_CLOSE_BRACKET; | 126 | return LIST + DIAMOND_OPEN_BRACKET + type + DIAMOND_CLOSE_BRACKET; |
129 | } | 127 | } |
130 | 128 | ||
131 | /** | 129 | /** |
132 | - * Based on the file type and the YANG name of the file, generate the class | 130 | + * Returns based on the file type and the YANG name of the file, generate the class |
133 | * / interface definition close. | 131 | * / interface definition close. |
134 | * | 132 | * |
135 | * @return corresponding textual java code information | 133 | * @return corresponding textual java code information |
136 | */ | 134 | */ |
137 | public static String getJavaClassDefClose() { | 135 | public static String getJavaClassDefClose() { |
138 | - | ||
139 | return CLOSE_CURLY_BRACKET; | 136 | return CLOSE_CURLY_BRACKET; |
140 | } | 137 | } |
141 | } | 138 | } | ... | ... |
... | @@ -62,12 +62,12 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataInto | ... | @@ -62,12 +62,12 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataInto |
62 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.partString; | 62 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.partString; |
63 | 63 | ||
64 | /** | 64 | /** |
65 | - * Generates java file. | 65 | + * Representation of java file generator. |
66 | */ | 66 | */ |
67 | public final class JavaFileGenerator { | 67 | public final class JavaFileGenerator { |
68 | 68 | ||
69 | /** | 69 | /** |
70 | - * Default constructor. | 70 | + * Creates an instance of java file generator. |
71 | */ | 71 | */ |
72 | private JavaFileGenerator() { | 72 | private JavaFileGenerator() { |
73 | } | 73 | } | ... | ... |
... | @@ -57,12 +57,12 @@ import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.INT | ... | @@ -57,12 +57,12 @@ import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.INT |
57 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataIntoJavaFile; | 57 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataIntoJavaFile; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Provides utilities for java file generator. | 60 | + * Represents utilities for java file generator. |
61 | */ | 61 | */ |
62 | public final class JavaFileGeneratorUtils { | 62 | public final class JavaFileGeneratorUtils { |
63 | 63 | ||
64 | /** | 64 | /** |
65 | - * Default constructor. | 65 | + * Creates an instance of java file generator util. |
66 | */ | 66 | */ |
67 | private JavaFileGeneratorUtils() { | 67 | private JavaFileGeneratorUtils() { |
68 | } | 68 | } |
... | @@ -82,7 +82,7 @@ public final class JavaFileGeneratorUtils { | ... | @@ -82,7 +82,7 @@ public final class JavaFileGeneratorUtils { |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | - * Return data stored in temporary files. | 85 | + * Returns data stored in temporary files. |
86 | * | 86 | * |
87 | * @param generatedTempFiles temporary file types | 87 | * @param generatedTempFiles temporary file types |
88 | * @param curNode current YANG node | 88 | * @param curNode current YANG node |
... | @@ -126,7 +126,7 @@ public final class JavaFileGeneratorUtils { | ... | @@ -126,7 +126,7 @@ public final class JavaFileGeneratorUtils { |
126 | } | 126 | } |
127 | 127 | ||
128 | /** | 128 | /** |
129 | - * Initiate generation of file based on generated file type. | 129 | + * Initiates generation of file based on generated file type. |
130 | * | 130 | * |
131 | * @param file generated file | 131 | * @param file generated file |
132 | * @param className generated file class name | 132 | * @param className generated file class name |
... | @@ -232,7 +232,7 @@ public final class JavaFileGeneratorUtils { | ... | @@ -232,7 +232,7 @@ public final class JavaFileGeneratorUtils { |
232 | } | 232 | } |
233 | 233 | ||
234 | /** | 234 | /** |
235 | - * Write data to the specific generated file. | 235 | + * Writes data to the specific generated file. |
236 | * | 236 | * |
237 | * @param file generated file | 237 | * @param file generated file |
238 | * @param fileName file name | 238 | * @param fileName file name | ... | ... |
... | @@ -38,7 +38,7 @@ import static org.onosproject.yangutils.utils.UtilConstants.UNDER_SCORE; | ... | @@ -38,7 +38,7 @@ import static org.onosproject.yangutils.utils.UtilConstants.UNDER_SCORE; |
38 | import static org.onosproject.yangutils.utils.UtilConstants.VERSION_PREFIX; | 38 | import static org.onosproject.yangutils.utils.UtilConstants.VERSION_PREFIX; |
39 | 39 | ||
40 | /** | 40 | /** |
41 | - * Utility Class for translating the name from YANG to java convention. | 41 | + * Represents an utility Class for translating the name from YANG to java convention. |
42 | */ | 42 | */ |
43 | public final class JavaIdentifierSyntax { | 43 | public final class JavaIdentifierSyntax { |
44 | 44 | ||
... | @@ -51,13 +51,13 @@ public final class JavaIdentifierSyntax { | ... | @@ -51,13 +51,13 @@ public final class JavaIdentifierSyntax { |
51 | private static final String ZERO = "0"; | 51 | private static final String ZERO = "0"; |
52 | 52 | ||
53 | /** | 53 | /** |
54 | - * Default constructor. | 54 | + * Create instance of java identifier syntax. |
55 | */ | 55 | */ |
56 | private JavaIdentifierSyntax() { | 56 | private JavaIdentifierSyntax() { |
57 | } | 57 | } |
58 | 58 | ||
59 | /** | 59 | /** |
60 | - * Get the root package string. | 60 | + * Returns the root package string. |
61 | * | 61 | * |
62 | * @param version YANG version | 62 | * @param version YANG version |
63 | * @param nameSpace name space of the module | 63 | * @param nameSpace name space of the module |
... | @@ -79,7 +79,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -79,7 +79,7 @@ public final class JavaIdentifierSyntax { |
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | - * Get the contained data model parent node. | 82 | + * Returns the contained data model parent node. |
83 | * | 83 | * |
84 | * @param currentNode current node which parent contained node is required | 84 | * @param currentNode current node which parent contained node is required |
85 | * @return parent node in which the current node is an attribute | 85 | * @return parent node in which the current node is an attribute |
... | @@ -95,7 +95,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -95,7 +95,7 @@ public final class JavaIdentifierSyntax { |
95 | } | 95 | } |
96 | 96 | ||
97 | /** | 97 | /** |
98 | - * Get the node package string. | 98 | + * Returns the node package string. |
99 | * | 99 | * |
100 | * @param curNode current java node whose package string needs to be set | 100 | * @param curNode current java node whose package string needs to be set |
101 | * @return returns the root package string | 101 | * @return returns the root package string |
... | @@ -128,12 +128,12 @@ public final class JavaIdentifierSyntax { | ... | @@ -128,12 +128,12 @@ public final class JavaIdentifierSyntax { |
128 | } | 128 | } |
129 | 129 | ||
130 | /** | 130 | /** |
131 | - * Get package name from name space. | 131 | + * Returns package name from name space. |
132 | * | 132 | * |
133 | * @param nameSpace name space of YANG module | 133 | * @param nameSpace name space of YANG module |
134 | * @return java package name as per java rules | 134 | * @return java package name as per java rules |
135 | */ | 135 | */ |
136 | - public static String getPkgFromNameSpace(String nameSpace) { | 136 | + private static String getPkgFromNameSpace(String nameSpace) { |
137 | 137 | ||
138 | ArrayList<String> pkgArr = new ArrayList<String>(); | 138 | ArrayList<String> pkgArr = new ArrayList<String>(); |
139 | nameSpace = nameSpace.replace(QUOTES, EMPTY_STRING); | 139 | nameSpace = nameSpace.replace(QUOTES, EMPTY_STRING); |
... | @@ -153,7 +153,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -153,7 +153,7 @@ public final class JavaIdentifierSyntax { |
153 | * @return revision string | 153 | * @return revision string |
154 | * @throws TranslatorException when date is invalid. | 154 | * @throws TranslatorException when date is invalid. |
155 | */ | 155 | */ |
156 | - public static String getYangRevisionStr(String date) throws TranslatorException { | 156 | + private static String getYangRevisionStr(String date) throws TranslatorException { |
157 | 157 | ||
158 | String[] revisionArr = date.split(HYPHEN); | 158 | String[] revisionArr = date.split(HYPHEN); |
159 | 159 | ||
... | @@ -183,7 +183,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -183,7 +183,7 @@ public final class JavaIdentifierSyntax { |
183 | * @param pkgArr package array | 183 | * @param pkgArr package array |
184 | * @return package string | 184 | * @return package string |
185 | */ | 185 | */ |
186 | - public static String getPkgFrmArr(ArrayList<String> pkgArr) { | 186 | + private static String getPkgFrmArr(ArrayList<String> pkgArr) { |
187 | 187 | ||
188 | String pkg = EMPTY_STRING; | 188 | String pkg = EMPTY_STRING; |
189 | int size = pkgArr.size(); | 189 | int size = pkgArr.size(); |
... | @@ -203,7 +203,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -203,7 +203,7 @@ public final class JavaIdentifierSyntax { |
203 | } | 203 | } |
204 | 204 | ||
205 | /** | 205 | /** |
206 | - * Get package sub name from YANG identifier name. | 206 | + * Returns package sub name from YANG identifier name. |
207 | * | 207 | * |
208 | * @param name YANG identifier name | 208 | * @param name YANG identifier name |
209 | * @return java package sub name as per java rules | 209 | * @return java package sub name as per java rules |
... | @@ -220,7 +220,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -220,7 +220,7 @@ public final class JavaIdentifierSyntax { |
220 | } | 220 | } |
221 | 221 | ||
222 | /** | 222 | /** |
223 | - * Translate the YANG identifier name to java identifier. | 223 | + * Returns the YANG identifier name as java identifier. |
224 | * | 224 | * |
225 | * @param yangIdentifier identifier in YANG file | 225 | * @param yangIdentifier identifier in YANG file |
226 | * @return corresponding java identifier | 226 | * @return corresponding java identifier |
... | @@ -236,7 +236,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -236,7 +236,7 @@ public final class JavaIdentifierSyntax { |
236 | } | 236 | } |
237 | 237 | ||
238 | /** | 238 | /** |
239 | - * Translate the YANG identifier name to java identifier with first letter | 239 | + * Returns the YANG identifier name as java identifier with first letter |
240 | * in caps. | 240 | * in caps. |
241 | * | 241 | * |
242 | * @param yangIdentifier identifier in YANG file | 242 | * @param yangIdentifier identifier in YANG file |
... | @@ -247,7 +247,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -247,7 +247,7 @@ public final class JavaIdentifierSyntax { |
247 | } | 247 | } |
248 | 248 | ||
249 | /** | 249 | /** |
250 | - * Translate the YANG identifier name to java identifier with first letter | 250 | + * Returns the YANG identifier name as java identifier with first letter |
251 | * in small. | 251 | * in small. |
252 | * | 252 | * |
253 | * @param yangIdentifier identifier in YANG file. | 253 | * @param yangIdentifier identifier in YANG file. |
... | @@ -258,7 +258,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -258,7 +258,7 @@ public final class JavaIdentifierSyntax { |
258 | } | 258 | } |
259 | 259 | ||
260 | /** | 260 | /** |
261 | - * Get the java Package from package path. | 261 | + * Returns the java Package from package path. |
262 | * | 262 | * |
263 | * @param packagePath package path | 263 | * @param packagePath package path |
264 | * @return java package | 264 | * @return java package |
... | @@ -268,7 +268,7 @@ public final class JavaIdentifierSyntax { | ... | @@ -268,7 +268,7 @@ public final class JavaIdentifierSyntax { |
268 | } | 268 | } |
269 | 269 | ||
270 | /** | 270 | /** |
271 | - * Get the directory path corresponding to java package. | 271 | + * Returns the directory path corresponding to java package. |
272 | * | 272 | * |
273 | * @param packagePath package path | 273 | * @param packagePath package path |
274 | * @return java package | 274 | * @return java package | ... | ... |
... | @@ -83,12 +83,12 @@ import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.SET | ... | @@ -83,12 +83,12 @@ import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.SET |
83 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.trimAtLast; | 83 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.trimAtLast; |
84 | 84 | ||
85 | /** | 85 | /** |
86 | - * Generated methods for generated files based on the file type. | 86 | + * Represents generator for methods of generated files based on the file type. |
87 | */ | 87 | */ |
88 | public final class MethodsGenerator { | 88 | public final class MethodsGenerator { |
89 | 89 | ||
90 | /** | 90 | /** |
91 | - * Default constructor. | 91 | + * Creates an instance of method generator. |
92 | */ | 92 | */ |
93 | private MethodsGenerator() { | 93 | private MethodsGenerator() { |
94 | } | 94 | } |
... | @@ -506,7 +506,7 @@ public final class MethodsGenerator { | ... | @@ -506,7 +506,7 @@ public final class MethodsGenerator { |
506 | } | 506 | } |
507 | 507 | ||
508 | /** | 508 | /** |
509 | - * To string method for class. | 509 | + * Returns to string method for class. |
510 | * | 510 | * |
511 | * @param attr attribute info | 511 | * @param attr attribute info |
512 | * @return to string method | 512 | * @return to string method |
... | @@ -521,9 +521,9 @@ public final class MethodsGenerator { | ... | @@ -521,9 +521,9 @@ public final class MethodsGenerator { |
521 | } | 521 | } |
522 | 522 | ||
523 | /** | 523 | /** |
524 | - * Returns to hash code method open strings. | 524 | + * Returns hash code method open strings. |
525 | * | 525 | * |
526 | - * @return to hash code method open string | 526 | + * @return hash code method open string |
527 | */ | 527 | */ |
528 | public static String getHashCodeMethodOpen() { | 528 | public static String getHashCodeMethodOpen() { |
529 | 529 | ||
... | @@ -533,7 +533,7 @@ public final class MethodsGenerator { | ... | @@ -533,7 +533,7 @@ public final class MethodsGenerator { |
533 | } | 533 | } |
534 | 534 | ||
535 | /** | 535 | /** |
536 | - * Returns to hash code methods close string. | 536 | + * Returns hash code methods close string. |
537 | * | 537 | * |
538 | * @param hashcodeString hash code string | 538 | * @param hashcodeString hash code string |
539 | * @return to hash code method close string | 539 | * @return to hash code method close string |
... | @@ -547,7 +547,7 @@ public final class MethodsGenerator { | ... | @@ -547,7 +547,7 @@ public final class MethodsGenerator { |
547 | } | 547 | } |
548 | 548 | ||
549 | /** | 549 | /** |
550 | - * Hash code method for class. | 550 | + * Returns hash code method for class. |
551 | * | 551 | * |
552 | * @param attr attribute info | 552 | * @param attr attribute info |
553 | * @return hash code method | 553 | * @return hash code method |
... | @@ -558,10 +558,10 @@ public final class MethodsGenerator { | ... | @@ -558,10 +558,10 @@ public final class MethodsGenerator { |
558 | } | 558 | } |
559 | 559 | ||
560 | /** | 560 | /** |
561 | - * Returns to equals method open strings. | 561 | + * Returns equals method open strings. |
562 | * | 562 | * |
563 | * @param className class name | 563 | * @param className class name |
564 | - * @return to equals method open string | 564 | + * @return equals method open string |
565 | */ | 565 | */ |
566 | public static String getEqualsMethodOpen(String className) { | 566 | public static String getEqualsMethodOpen(String className) { |
567 | 567 | ||
... | @@ -597,10 +597,10 @@ public final class MethodsGenerator { | ... | @@ -597,10 +597,10 @@ public final class MethodsGenerator { |
597 | } | 597 | } |
598 | 598 | ||
599 | /** | 599 | /** |
600 | - * Returns to equals methods close string. | 600 | + * Returns equals methods close string. |
601 | * | 601 | * |
602 | * @param equalMethodString equal method string | 602 | * @param equalMethodString equal method string |
603 | - * @return to equals method close string | 603 | + * @return equals method close string |
604 | */ | 604 | */ |
605 | public static String getEqualsMethodClose(String equalMethodString) { | 605 | public static String getEqualsMethodClose(String equalMethodString) { |
606 | 606 | ||
... | @@ -614,7 +614,7 @@ public final class MethodsGenerator { | ... | @@ -614,7 +614,7 @@ public final class MethodsGenerator { |
614 | } | 614 | } |
615 | 615 | ||
616 | /** | 616 | /** |
617 | - * Equals method for class. | 617 | + * Returns equals method for class. |
618 | * | 618 | * |
619 | * @param attr attribute info | 619 | * @param attr attribute info |
620 | * @return equals method | 620 | * @return equals method | ... | ... |
... | @@ -21,12 +21,12 @@ import java.util.Arrays; | ... | @@ -21,12 +21,12 @@ import java.util.Arrays; |
21 | import java.util.List; | 21 | import java.util.List; |
22 | 22 | ||
23 | /** | 23 | /** |
24 | - * Provides utility constants while generating java files. | 24 | + * Represents utilities constants which are used while generating java files. |
25 | */ | 25 | */ |
26 | public final class UtilConstants { | 26 | public final class UtilConstants { |
27 | 27 | ||
28 | /** | 28 | /** |
29 | - * Default constructor. | 29 | + * Creates an instance of util constants. |
30 | */ | 30 | */ |
31 | private UtilConstants() { | 31 | private UtilConstants() { |
32 | } | 32 | } | ... | ... |
... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
16 | package org.onosproject.yangutils.utils; | 16 | package org.onosproject.yangutils.utils; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | - * ENUM to represent the type of data in parse tree. | 19 | + * Represents ENUM to represent the type of data in parse tree. |
20 | */ | 20 | */ |
21 | public enum YangConstructType { | 21 | public enum YangConstructType { |
22 | /** | 22 | /** | ... | ... |
... | @@ -27,7 +27,7 @@ import java.io.OutputStream; | ... | @@ -27,7 +27,7 @@ import java.io.OutputStream; |
27 | import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE; | 27 | import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE; |
28 | 28 | ||
29 | /** | 29 | /** |
30 | - * Provides the license header for the generated files. | 30 | + * Represents the license header for the generated files. |
31 | */ | 31 | */ |
32 | public final class CopyrightHeader { | 32 | public final class CopyrightHeader { |
33 | 33 | ||
... | @@ -39,7 +39,7 @@ public final class CopyrightHeader { | ... | @@ -39,7 +39,7 @@ public final class CopyrightHeader { |
39 | private static String copyrightHeader; | 39 | private static String copyrightHeader; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | - * Default constructor. | 42 | + * Creates an instance of copyright header. |
43 | */ | 43 | */ |
44 | private CopyrightHeader() { | 44 | private CopyrightHeader() { |
45 | } | 45 | } |
... | @@ -69,11 +69,11 @@ public final class CopyrightHeader { | ... | @@ -69,11 +69,11 @@ public final class CopyrightHeader { |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * parse Copyright to the temporary file. | 72 | + * parses Copyright to the temporary file. |
73 | * | 73 | * |
74 | * @throws IOException when fails to get the copyright header | 74 | * @throws IOException when fails to get the copyright header |
75 | */ | 75 | */ |
76 | - public static void parseCopyrightHeader() throws IOException { | 76 | + private static void parseCopyrightHeader() throws IOException { |
77 | 77 | ||
78 | File temp = new File(TEMP_FILE); | 78 | File temp = new File(TEMP_FILE); |
79 | 79 | ... | ... |
... | @@ -36,18 +36,18 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.addPackageInfo | ... | @@ -36,18 +36,18 @@ import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.addPackageInfo |
36 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.createDirectories; | 36 | import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.createDirectories; |
37 | 37 | ||
38 | /** | 38 | /** |
39 | - * Utility to handle file system operations. | 39 | + * Represents utility to handle file system operations. |
40 | */ | 40 | */ |
41 | public final class FileSystemUtil { | 41 | public final class FileSystemUtil { |
42 | 42 | ||
43 | /** | 43 | /** |
44 | - * Hiding constructor of a utility class. | 44 | + * Creates an instance of file system util. |
45 | */ | 45 | */ |
46 | private FileSystemUtil() { | 46 | private FileSystemUtil() { |
47 | } | 47 | } |
48 | 48 | ||
49 | /** | 49 | /** |
50 | - * Check if the package directory structure created. | 50 | + * Checks if the package directory structure created. |
51 | * | 51 | * |
52 | * @param pkg Package to check if it is created | 52 | * @param pkg Package to check if it is created |
53 | * @return existence status of package | 53 | * @return existence status of package |
... | @@ -63,7 +63,7 @@ public final class FileSystemUtil { | ... | @@ -63,7 +63,7 @@ public final class FileSystemUtil { |
63 | } | 63 | } |
64 | 64 | ||
65 | /** | 65 | /** |
66 | - * Create a package structure with package info java file if not present. | 66 | + * Creates a package structure with package info java file if not present. |
67 | * | 67 | * |
68 | * @param pkg java package string | 68 | * @param pkg java package string |
69 | * @param pkgInfo description of package | 69 | * @param pkgInfo description of package |
... | @@ -82,7 +82,7 @@ public final class FileSystemUtil { | ... | @@ -82,7 +82,7 @@ public final class FileSystemUtil { |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | - * Read the contents from source file and append its contents to append | 85 | + * Reads the contents from source file and append its contents to append |
86 | * file. | 86 | * file. |
87 | * | 87 | * |
88 | * @param toAppend destination file in which the contents of source file is | 88 | * @param toAppend destination file in which the contents of source file is |
... | @@ -133,7 +133,7 @@ public final class FileSystemUtil { | ... | @@ -133,7 +133,7 @@ public final class FileSystemUtil { |
133 | } | 133 | } |
134 | 134 | ||
135 | /** | 135 | /** |
136 | - * Update the generated file handle. | 136 | + * Updates the generated file handle. |
137 | * | 137 | * |
138 | * @param inputFile input file | 138 | * @param inputFile input file |
139 | * @param contentTobeAdded content to be appended to the file | 139 | * @param contentTobeAdded content to be appended to the file | ... | ... |
... | @@ -49,12 +49,12 @@ import static org.onosproject.yangutils.utils.UtilConstants.SPACE; | ... | @@ -49,12 +49,12 @@ import static org.onosproject.yangutils.utils.UtilConstants.SPACE; |
49 | import static org.onosproject.yangutils.utils.UtilConstants.VALUE; | 49 | import static org.onosproject.yangutils.utils.UtilConstants.VALUE; |
50 | 50 | ||
51 | /** | 51 | /** |
52 | - * Provides javadoc for the generated classes. | 52 | + * Represents javadoc for the generated classes. |
53 | */ | 53 | */ |
54 | public final class JavaDocGen { | 54 | public final class JavaDocGen { |
55 | 55 | ||
56 | /** | 56 | /** |
57 | - * Default Constructor. | 57 | + * Creates an instance of java doc gen. |
58 | */ | 58 | */ |
59 | private JavaDocGen() { | 59 | private JavaDocGen() { |
60 | } | 60 | } | ... | ... |
... | @@ -23,7 +23,7 @@ import java.util.List; | ... | @@ -23,7 +23,7 @@ import java.util.List; |
23 | import java.util.Stack; | 23 | import java.util.Stack; |
24 | 24 | ||
25 | /** | 25 | /** |
26 | - * Provides utility for searching the files in a directory. | 26 | + * Represents utility for searching the files in a directory. |
27 | */ | 27 | */ |
28 | public final class YangFileScanner { | 28 | public final class YangFileScanner { |
29 | 29 | ||
... | @@ -31,7 +31,7 @@ public final class YangFileScanner { | ... | @@ -31,7 +31,7 @@ public final class YangFileScanner { |
31 | private static final String YANG_FILE_EXTENTION = ".yang"; | 31 | private static final String YANG_FILE_EXTENTION = ".yang"; |
32 | 32 | ||
33 | /** | 33 | /** |
34 | - * Default constructor. | 34 | + * Creates an instance of YANG file scanner. |
35 | */ | 35 | */ |
36 | private YangFileScanner() { | 36 | private YangFileScanner() { |
37 | } | 37 | } | ... | ... |
... | @@ -48,7 +48,7 @@ import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.PAC | ... | @@ -48,7 +48,7 @@ import static org.onosproject.yangutils.utils.io.impl.JavaDocGen.JavaDocType.PAC |
48 | import static org.slf4j.LoggerFactory.getLogger; | 48 | import static org.slf4j.LoggerFactory.getLogger; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | - * Provides common utility functionalities for code generation. | 51 | + * Represents common utility functionalities for code generation. |
52 | */ | 52 | */ |
53 | public final class YangIoUtils { | 53 | public final class YangIoUtils { |
54 | 54 | ||
... | @@ -56,7 +56,7 @@ public final class YangIoUtils { | ... | @@ -56,7 +56,7 @@ public final class YangIoUtils { |
56 | private static final String TARGET_RESOURCE_PATH = SLASH + TEMP + SLASH + YANG_RESOURCES + SLASH; | 56 | private static final String TARGET_RESOURCE_PATH = SLASH + TEMP + SLASH + YANG_RESOURCES + SLASH; |
57 | 57 | ||
58 | /** | 58 | /** |
59 | - * Default constructor. | 59 | + * Creates an instance of YANG io utils. |
60 | */ | 60 | */ |
61 | private YangIoUtils() { | 61 | private YangIoUtils() { |
62 | } | 62 | } |
... | @@ -68,7 +68,6 @@ public final class YangIoUtils { | ... | @@ -68,7 +68,6 @@ public final class YangIoUtils { |
68 | * @return directory structure | 68 | * @return directory structure |
69 | */ | 69 | */ |
70 | public static File createDirectories(String path) { | 70 | public static File createDirectories(String path) { |
71 | - | ||
72 | File generatedDir = new File(path); | 71 | File generatedDir = new File(path); |
73 | generatedDir.mkdirs(); | 72 | generatedDir.mkdirs(); |
74 | return generatedDir; | 73 | return generatedDir; |
... | @@ -114,7 +113,6 @@ public final class YangIoUtils { | ... | @@ -114,7 +113,6 @@ public final class YangIoUtils { |
114 | * @throws IOException when failed to delete directory | 113 | * @throws IOException when failed to delete directory |
115 | */ | 114 | */ |
116 | public static void clean(String dir) throws IOException { | 115 | public static void clean(String dir) throws IOException { |
117 | - | ||
118 | File generatedDirectory = new File(dir); | 116 | File generatedDirectory = new File(dir); |
119 | if (generatedDirectory.exists()) { | 117 | if (generatedDirectory.exists()) { |
120 | try { | 118 | try { |
... | @@ -133,7 +131,6 @@ public final class YangIoUtils { | ... | @@ -133,7 +131,6 @@ public final class YangIoUtils { |
133 | * @param context current build context | 131 | * @param context current build context |
134 | */ | 132 | */ |
135 | public static void addToSource(String source, MavenProject project, BuildContext context) { | 133 | public static void addToSource(String source, MavenProject project, BuildContext context) { |
136 | - | ||
137 | project.addCompileSourceRoot(source); | 134 | project.addCompileSourceRoot(source); |
138 | context.refresh(project.getBasedir()); | 135 | context.refresh(project.getBasedir()); |
139 | log.info("Source directory added to compilation root: " + source); | 136 | log.info("Source directory added to compilation root: " + source); |
... | @@ -147,7 +144,6 @@ public final class YangIoUtils { | ... | @@ -147,7 +144,6 @@ public final class YangIoUtils { |
147 | * @return new string | 144 | * @return new string |
148 | */ | 145 | */ |
149 | public static String trimAtLast(String valueString, String removealStirng) { | 146 | public static String trimAtLast(String valueString, String removealStirng) { |
150 | - | ||
151 | StringBuilder stringBuilder = new StringBuilder(valueString); | 147 | StringBuilder stringBuilder = new StringBuilder(valueString); |
152 | int index = valueString.lastIndexOf(removealStirng); | 148 | int index = valueString.lastIndexOf(removealStirng); |
153 | stringBuilder.deleteCharAt(index); | 149 | stringBuilder.deleteCharAt(index); |
... | @@ -161,7 +157,6 @@ public final class YangIoUtils { | ... | @@ -161,7 +157,6 @@ public final class YangIoUtils { |
161 | * @return parted string | 157 | * @return parted string |
162 | */ | 158 | */ |
163 | public static String partString(String partString) { | 159 | public static String partString(String partString) { |
164 | - | ||
165 | String[] strArray = partString.split(COMMA); | 160 | String[] strArray = partString.split(COMMA); |
166 | String newString = EMPTY_STRING; | 161 | String newString = EMPTY_STRING; |
167 | for (int i = 0; i < strArray.length; i++) { | 162 | for (int i = 0; i < strArray.length; i++) { |
... | @@ -176,7 +171,7 @@ public final class YangIoUtils { | ... | @@ -176,7 +171,7 @@ public final class YangIoUtils { |
176 | } | 171 | } |
177 | 172 | ||
178 | /** | 173 | /** |
179 | - * Get the directory path of the package in canonical form. | 174 | + * Returns the directory path of the package in canonical form. |
180 | * | 175 | * |
181 | * @param baseCodeGenPath base path where the generated files needs to be | 176 | * @param baseCodeGenPath base path where the generated files needs to be |
182 | * put | 177 | * put |
... | @@ -197,7 +192,7 @@ public final class YangIoUtils { | ... | @@ -197,7 +192,7 @@ public final class YangIoUtils { |
197 | } | 192 | } |
198 | 193 | ||
199 | /** | 194 | /** |
200 | - * Get the absolute path of the package in canonical form. | 195 | + * Returns the absolute path of the package in canonical form. |
201 | * | 196 | * |
202 | * @param baseCodeGenPath base path where the generated files needs to be | 197 | * @param baseCodeGenPath base path where the generated files needs to be |
203 | * put | 198 | * put |
... | @@ -205,12 +200,11 @@ public final class YangIoUtils { | ... | @@ -205,12 +200,11 @@ public final class YangIoUtils { |
205 | * @return absolute path of the package in canonical form | 200 | * @return absolute path of the package in canonical form |
206 | */ | 201 | */ |
207 | public static String getAbsolutePackagePath(String baseCodeGenPath, String pathOfJavaPkg) { | 202 | public static String getAbsolutePackagePath(String baseCodeGenPath, String pathOfJavaPkg) { |
208 | - | ||
209 | return baseCodeGenPath + pathOfJavaPkg; | 203 | return baseCodeGenPath + pathOfJavaPkg; |
210 | } | 204 | } |
211 | 205 | ||
212 | /** | 206 | /** |
213 | - * Copy YANG files to the current project's output directory. | 207 | + * Copies YANG files to the current project's output directory. |
214 | * | 208 | * |
215 | * @param yangFiles list of YANG files | 209 | * @param yangFiles list of YANG files |
216 | * @param outputDir project's output directory | 210 | * @param outputDir project's output directory |
... | @@ -243,7 +237,6 @@ public final class YangIoUtils { | ... | @@ -243,7 +237,6 @@ public final class YangIoUtils { |
243 | * @return list of files | 237 | * @return list of files |
244 | */ | 238 | */ |
245 | private static List<File> getListOfFile(List<String> strings) { | 239 | private static List<File> getListOfFile(List<String> strings) { |
246 | - | ||
247 | List<File> files = new ArrayList<>(); | 240 | List<File> files = new ArrayList<>(); |
248 | for (String file : strings) { | 241 | for (String file : strings) { |
249 | files.add(new File(file)); | 242 | files.add(new File(file)); |
... | @@ -252,14 +245,13 @@ public final class YangIoUtils { | ... | @@ -252,14 +245,13 @@ public final class YangIoUtils { |
252 | } | 245 | } |
253 | 246 | ||
254 | /** | 247 | /** |
255 | - * Merge the temp java files to main java files. | 248 | + * Merges the temp java files to main java files. |
256 | * | 249 | * |
257 | * @param appendFile temp file | 250 | * @param appendFile temp file |
258 | * @param srcFile main file | 251 | * @param srcFile main file |
259 | * @throws IOException when fails to append contents | 252 | * @throws IOException when fails to append contents |
260 | */ | 253 | */ |
261 | public static void mergeJavaFiles(File appendFile, File srcFile) throws IOException { | 254 | public static void mergeJavaFiles(File appendFile, File srcFile) throws IOException { |
262 | - | ||
263 | try { | 255 | try { |
264 | appendFileContents(appendFile, srcFile); | 256 | appendFileContents(appendFile, srcFile); |
265 | } catch (IOException e) { | 257 | } catch (IOException e) { |
... | @@ -268,14 +260,13 @@ public final class YangIoUtils { | ... | @@ -268,14 +260,13 @@ public final class YangIoUtils { |
268 | } | 260 | } |
269 | 261 | ||
270 | /** | 262 | /** |
271 | - * Insert data in the generated file. | 263 | + * Inserts data in the generated file. |
272 | * | 264 | * |
273 | * @param file file in which need to be inserted | 265 | * @param file file in which need to be inserted |
274 | * @param data data which need to be inserted | 266 | * @param data data which need to be inserted |
275 | * @throws IOException when fails to insert into file | 267 | * @throws IOException when fails to insert into file |
276 | */ | 268 | */ |
277 | public static void insertDataIntoJavaFile(File file, String data) throws IOException { | 269 | public static void insertDataIntoJavaFile(File file, String data) throws IOException { |
278 | - | ||
279 | try { | 270 | try { |
280 | updateFileHandle(file, data, false); | 271 | updateFileHandle(file, data, false); |
281 | } catch (IOException e) { | 272 | } catch (IOException e) { | ... | ... |
-
Please register or login to post a comment