Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Gaurav Agrawal | bd80447 | 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 | |
Bharat saraswal | 96dfef0 | 2016-06-16 00:29:12 +0530 | [diff] [blame] | 19 | import java.io.Serializable; |
| 20 | |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 21 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 22 | * Represents YANG node identifier which is a combination of prefix and name. |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 23 | */ |
Bharat saraswal | 96dfef0 | 2016-06-16 00:29:12 +0530 | [diff] [blame] | 24 | public class YangNodeIdentifier implements Serializable { |
| 25 | |
| 26 | private static final long serialVersionUID = 806201648L; |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 27 | |
| 28 | // Name of the node. |
Vidyashree Rama | 7142d9c | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 29 | private String name; |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 30 | |
| 31 | // Prefix of the node. |
Vidyashree Rama | 7142d9c | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 32 | private String prefix; |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 33 | |
| 34 | /** |
| 35 | * Creates an instance of YANG node identifier. |
| 36 | */ |
| 37 | public YangNodeIdentifier() { |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Returns name of the node identifier. |
| 42 | * |
| 43 | * @return name of the node identifier |
| 44 | */ |
| 45 | public String getName() { |
| 46 | return name; |
| 47 | } |
| 48 | |
| 49 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 50 | * Sets name of the node identifier. |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 51 | * |
Gaurav Agrawal | d9d6cc8 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 52 | * @param name name of the node identifier |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 53 | */ |
| 54 | public void setName(String name) { |
| 55 | this.name = name; |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Returns prefix of the node identifier. |
| 60 | * |
Gaurav Agrawal | d9d6cc8 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 61 | * @return name of the node identifier |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 62 | */ |
| 63 | public String getPrefix() { |
| 64 | return prefix; |
| 65 | } |
| 66 | |
| 67 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 68 | * Sets prefix of the node identifier. |
Gaurav Agrawal | bd80447 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 69 | * |
| 70 | * @param prefix prefix of the node identifier |
| 71 | */ |
| 72 | public void setPrefix(String prefix) { |
| 73 | this.prefix = prefix; |
| 74 | } |
| 75 | } |