Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 0f7908b | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 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 | |
| 17 | package org.onosproject.yangutils.datamodel; |
| 18 | |
| 19 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame^] | 20 | * Represents YANG node identifier which is a combination of prefix and name. |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 21 | */ |
| 22 | public class YangNodeIdentifier { |
| 23 | |
| 24 | // Name of the node. |
| 25 | String name; |
| 26 | |
| 27 | // Prefix of the node. |
| 28 | String prefix; |
| 29 | |
| 30 | /** |
| 31 | * Creates an instance of YANG node identifier. |
| 32 | */ |
| 33 | public YangNodeIdentifier() { |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Returns name of the node identifier. |
| 38 | * |
| 39 | * @return name of the node identifier |
| 40 | */ |
| 41 | public String getName() { |
| 42 | return name; |
| 43 | } |
| 44 | |
| 45 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame^] | 46 | * Sets name of the node identifier. |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 47 | * |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 48 | * @param name name of the node identifier |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 49 | */ |
| 50 | public void setName(String name) { |
| 51 | this.name = name; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Returns prefix of the node identifier. |
| 56 | * |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 57 | * @return name of the node identifier |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 58 | */ |
| 59 | public String getPrefix() { |
| 60 | return prefix; |
| 61 | } |
| 62 | |
| 63 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame^] | 64 | * Sets prefix of the node identifier. |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 65 | * |
| 66 | * @param prefix prefix of the node identifier |
| 67 | */ |
| 68 | public void setPrefix(String prefix) { |
| 69 | this.prefix = prefix; |
| 70 | } |
| 71 | } |