Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package org.onosproject.yangutils.translator.tojava.javamodel; |
| 17 | |
Bharat saraswal | e3175d3 | 2016-08-31 17:50:11 +0530 | [diff] [blame^] | 18 | import org.onosproject.yangutils.datamodel.LocationInfo; |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 19 | import org.onosproject.yangutils.datamodel.YangType; |
Bharat saraswal | 2da23bf | 2016-08-25 15:28:39 +0530 | [diff] [blame] | 20 | import org.onosproject.yangutils.datamodel.javadatamodel.JavaQualifiedTypeInfoContainer; |
Bharat saraswal | e3175d3 | 2016-08-31 17:50:11 +0530 | [diff] [blame^] | 21 | import org.onosproject.yangutils.utils.io.YangToJavaNamingConflictUtil; |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 22 | |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 23 | /** |
| 24 | * Represent java based identification of the YANG leaves. |
| 25 | */ |
| 26 | public interface JavaLeafInfoContainer |
Bharat saraswal | e3175d3 | 2016-08-31 17:50:11 +0530 | [diff] [blame^] | 27 | extends JavaQualifiedTypeInfoContainer, LocationInfo { |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 28 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 29 | * Retrieves the data type of the leaf. |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 30 | * |
| 31 | * @return data type of the leaf |
| 32 | */ |
| 33 | YangType<?> getDataType(); |
| 34 | |
| 35 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 36 | * Retrieves the name of the leaf. |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 37 | * |
| 38 | * @return name of the leaf |
| 39 | */ |
| 40 | String getName(); |
| 41 | |
| 42 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 43 | * Retrieves the java name of the leaf. |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 44 | * |
| 45 | * @param conflictResolveConfig user config to resolve conflicts |
| 46 | * @return name of the leaf |
| 47 | */ |
| 48 | String getJavaName(YangToJavaNamingConflictUtil conflictResolveConfig); |
| 49 | |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 50 | /** |
| 51 | * Identifies if object is a leaf-list. |
| 52 | * |
| 53 | * @return true if leaf-list false otherwise |
| 54 | */ |
| 55 | boolean isLeafList(); |
| 56 | |
| 57 | /** |
| 58 | * updates the qualified info. |
| 59 | */ |
| 60 | void updateJavaQualifiedInfo(); |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 61 | |
| 62 | /** |
| 63 | * Returns java naming conflict resolver. |
| 64 | * |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 65 | * @return java naming conflict resolver |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 66 | */ |
| 67 | YangToJavaNamingConflictUtil getConflictResolveConfig(); |
| 68 | |
| 69 | /** |
| 70 | * Sets java naming conflict resolver. |
| 71 | * |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 72 | * @param conflictResolveConfig java naming conflict resolver |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 73 | */ |
| 74 | void setConflictResolveConfig(YangToJavaNamingConflictUtil conflictResolveConfig); |
| 75 | |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 76 | } |