sonu gupta | 1bb37b8 | 2016-11-11 16:51:18 +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 | |
| 17 | package org.onosproject.yms.app.ydt; |
| 18 | |
| 19 | import org.onosproject.yangutils.datamodel.YangNode; |
| 20 | import org.onosproject.yangutils.datamodel.YangSchemaNode; |
sonu gupta | 1bb37b8 | 2016-11-11 16:51:18 +0530 | [diff] [blame] | 21 | |
| 22 | /** |
| 23 | * Manages the application information required for schema nodes defined in |
| 24 | * the module (sub-module). |
| 25 | */ |
sonu gupta | eff184b | 2016-11-24 12:43:49 +0530 | [diff] [blame^] | 26 | public class AugmentedSchemaData implements AugmentAppData { |
sonu gupta | 1bb37b8 | 2016-11-11 16:51:18 +0530 | [diff] [blame] | 27 | |
| 28 | /* |
| 29 | * Reference for schema node of augmenting application. |
| 30 | */ |
| 31 | private YangSchemaNode augModSchema; |
| 32 | |
| 33 | @Override |
sonu gupta | 1bb37b8 | 2016-11-11 16:51:18 +0530 | [diff] [blame] | 34 | public YangSchemaNode getAugmentingSchemaNode() { |
| 35 | return augModSchema; |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | public void setAugmentingSchemaNode(YangSchemaNode schemaNode) { |
| 40 | augModSchema = schemaNode; |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public YangSchemaNode getSchemaNode() { |
| 45 | return augModSchema; |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public YangSchemaNode getRootSchemaNode() { |
| 50 | return ((YangNode) getSchemaNode()).getParent(); |
| 51 | } |
| 52 | } |