Vidyashree Rama | 07c26bb | 2016-07-28 17:33:15 +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.yangutils.datamodel; |
| 18 | |
| 19 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
| 20 | import org.onosproject.yangutils.datamodel.utils.Parsable; |
| 21 | import org.onosproject.yangutils.datamodel.utils.YangConstructType; |
| 22 | |
| 23 | /** |
| 24 | * Represents data model node to maintain information defined in YANG extended name. |
| 25 | */ |
| 26 | public class YangAppExtendedName implements Parsable { |
| 27 | |
| 28 | /** |
| 29 | * App extended name information. |
| 30 | */ |
| 31 | private String yangAppExtendedName; |
| 32 | |
| 33 | /** |
| 34 | * Prefix of extended name. |
| 35 | */ |
| 36 | private String prefix; |
| 37 | |
| 38 | /** |
| 39 | * Returns the YANG app extended name information. |
| 40 | * |
| 41 | * @return the YANG app extended name information |
| 42 | */ |
| 43 | public String getYangAppExtendedName() { |
| 44 | return yangAppExtendedName; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Sets the YANG app extended name information. |
| 49 | * |
| 50 | * @param yangAppExtendedName the YANG app extended name to set |
| 51 | */ |
| 52 | public void setYangAppExtendedName(String yangAppExtendedName) { |
| 53 | this.yangAppExtendedName = yangAppExtendedName; |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Returns the prefix. |
| 58 | * |
| 59 | * @return the prefix |
| 60 | */ |
| 61 | public String getPrefix() { |
| 62 | return prefix; |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Sets the prefix information. |
| 67 | * |
| 68 | * @param prefix the prefix to set |
| 69 | */ |
| 70 | public void setPrefix(String prefix) { |
| 71 | this.prefix = prefix; |
| 72 | } |
| 73 | |
| 74 | @Override |
| 75 | public YangConstructType getYangConstructType() { |
| 76 | return YangConstructType.APP_EXTENDED_NAME_DATA; |
| 77 | } |
| 78 | |
| 79 | @Override |
| 80 | public void validateDataOnEntry() throws DataModelException { |
| 81 | // TODO : to be implemented |
| 82 | } |
| 83 | |
| 84 | @Override |
| 85 | public void validateDataOnExit() throws DataModelException { |
| 86 | // TODO : to be implemented |
| 87 | } |
| 88 | } |