blob: 6df33bb8d215a2a56eef9b361597162ec2d35f1f [file] [log] [blame]
Shankara-Huawei15c8ed82016-06-20 19:29:59 +05301/*
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 */
16package org.onosproject.yangutils.datamodel;
17
18import java.io.Serializable;
19import java.util.List;
20
21/**
22 * Representation of data model node to maintain absolute path defined in YANG path-arg.
23 */
24public class YangAtomicPath implements Serializable {
25
26 private static final long serialVersionUID = 806201688L;
27
28 // YANG node identifier.
29 private YangNodeIdentifier nodeIdentifier;
30
31 // List of path predicates expression.
32 private List<YangPathPredicate> pathPredicatesList;
33
34 /**
35 * Returns the node identifier.
36 *
37 * @return the node identifier
38 */
39 public YangNodeIdentifier getNodeIdentifier() {
40 return nodeIdentifier;
41 }
42
43 /**
44 * Sets the node identifier.
45 *
46 * @param nodeIdentifier Sets the node identifier
47 */
48 public void setNodeIdentifier(YangNodeIdentifier nodeIdentifier) {
49 this.nodeIdentifier = nodeIdentifier;
50 }
51
52 /**
53 * Returns the path predicate expression.
54 *
55 * @return the path predicate expression
56 */
57 public List<YangPathPredicate> getPathPredicatesList() {
58 return pathPredicatesList;
59 }
60
61 /**
62 * Sets the path predicate expression.
63 *
64 * @param pathPredicatesList Sets the path predicate expression
65 */
66 public void setPathPredicatesList(List<YangPathPredicate> pathPredicatesList) {
67 this.pathPredicatesList = pathPredicatesList;
68 }
69
70 /**
71 * Adds predicate expression in data holder.
72 *
73 * @param predicatesExp the predicate expression to be added
74 */
75 public void addLeavesPredicate(YangPathPredicate predicatesExp) {
76 getPathPredicatesList().add(predicatesExp);
77 }
78}