blob: 8c0ff9fc21fb360a31eb5d39b43ac269fa50435c [file] [log] [blame]
Gaurav Agrawalbd804472016-03-25 11:25:36 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Gaurav Agrawalbd804472016-03-25 11:25:36 +05303 *
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
17package org.onosproject.yangutils.datamodel;
18
Bharat saraswal96dfef02016-06-16 00:29:12 +053019import java.io.Serializable;
20
Gaurav Agrawalbd804472016-03-25 11:25:36 +053021/**
Bharat saraswald9822e92016-04-05 15:13:44 +053022 * Represents YANG node identifier which is a combination of prefix and name.
Gaurav Agrawalbd804472016-03-25 11:25:36 +053023 */
Bharat saraswal96dfef02016-06-16 00:29:12 +053024public class YangNodeIdentifier implements Serializable {
25
26 private static final long serialVersionUID = 806201648L;
Gaurav Agrawalbd804472016-03-25 11:25:36 +053027
28 // Name of the node.
Vidyashree Rama7142d9c2016-04-26 15:06:06 +053029 private String name;
Gaurav Agrawalbd804472016-03-25 11:25:36 +053030
31 // Prefix of the node.
Vidyashree Rama7142d9c2016-04-26 15:06:06 +053032 private String prefix;
Gaurav Agrawalbd804472016-03-25 11:25:36 +053033
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 saraswald9822e92016-04-05 15:13:44 +053050 * Sets name of the node identifier.
Gaurav Agrawalbd804472016-03-25 11:25:36 +053051 *
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053052 * @param name name of the node identifier
Gaurav Agrawalbd804472016-03-25 11:25:36 +053053 */
54 public void setName(String name) {
55 this.name = name;
56 }
57
58 /**
59 * Returns prefix of the node identifier.
60 *
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053061 * @return name of the node identifier
Gaurav Agrawalbd804472016-03-25 11:25:36 +053062 */
63 public String getPrefix() {
64 return prefix;
65 }
66
67 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053068 * Sets prefix of the node identifier.
Gaurav Agrawalbd804472016-03-25 11:25:36 +053069 *
70 * @param prefix prefix of the node identifier
71 */
72 public void setPrefix(String prefix) {
73 this.prefix = prefix;
74 }
75}