Shankara-Huawei | 15c8ed8 | 2016-06-20 19:29:59 +0530 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.yangutils.datamodel; |
| 17 | |
| 18 | import java.io.Serializable; |
| 19 | import java.util.List; |
| 20 | |
| 21 | /** |
| 22 | * Representation of data model node to maintain relative path defined in YANG path-arg. |
| 23 | */ |
| 24 | public class YangRelativePath implements Serializable { |
| 25 | |
| 26 | private static final long serialVersionUID = 806201690L; |
| 27 | |
| 28 | // Relative path ancestor node count the number of node exist between current node to parent node. |
| 29 | private int ancestorNodeCount; |
| 30 | |
| 31 | // Absolute path expression. |
| 32 | private List<YangAtomicPath> atomicPathList; |
| 33 | |
| 34 | /** |
| 35 | * Returns the absolute path. |
| 36 | * |
| 37 | * @return the absolute path |
| 38 | */ |
| 39 | public List<YangAtomicPath> getAtomicPathList() { |
| 40 | return atomicPathList; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Sets the absolute path. |
| 45 | * |
| 46 | * @param atomicPathList Sets the absolute path |
| 47 | */ |
| 48 | public void setAtomicPathList(List<YangAtomicPath> atomicPathList) { |
| 49 | this.atomicPathList = atomicPathList; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Returns the relative path ancestor count. |
| 54 | * |
| 55 | * @return the relative path ancestor count |
| 56 | */ |
| 57 | public int getAncestorNodeCount() { |
| 58 | return ancestorNodeCount; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Sets the relative path ancestor count. |
| 63 | * |
| 64 | * @param ancestorNodeCount Sets the relative path ancestor count |
| 65 | */ |
| 66 | public void setAncestorNodeCount(int ancestorNodeCount) { |
| 67 | this.ancestorNodeCount = ancestorNodeCount; |
| 68 | } |
| 69 | } |