blob: 512b1042d51938ef60f6ec2581bd4ac0389084de [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
19/**
Bharat saraswald9822e92016-04-05 15:13:44 +053020 * Represents YANG node identifier which is a combination of prefix and name.
Gaurav Agrawalbd804472016-03-25 11:25:36 +053021 */
22public class YangNodeIdentifier {
23
24 // Name of the node.
Vidyashree Rama7142d9c2016-04-26 15:06:06 +053025 private String name;
Gaurav Agrawalbd804472016-03-25 11:25:36 +053026
27 // Prefix of the node.
Vidyashree Rama7142d9c2016-04-26 15:06:06 +053028 private String prefix;
Gaurav Agrawalbd804472016-03-25 11:25:36 +053029
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 saraswald9822e92016-04-05 15:13:44 +053046 * Sets name of the node identifier.
Gaurav Agrawalbd804472016-03-25 11:25:36 +053047 *
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053048 * @param name name of the node identifier
Gaurav Agrawalbd804472016-03-25 11:25:36 +053049 */
50 public void setName(String name) {
51 this.name = name;
52 }
53
54 /**
55 * Returns prefix of the node identifier.
56 *
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053057 * @return name of the node identifier
Gaurav Agrawalbd804472016-03-25 11:25:36 +053058 */
59 public String getPrefix() {
60 return prefix;
61 }
62
63 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053064 * Sets prefix of the node identifier.
Gaurav Agrawalbd804472016-03-25 11:25:36 +053065 *
66 * @param prefix prefix of the node identifier
67 */
68 public void setPrefix(String prefix) {
69 this.prefix = prefix;
70 }
71}