Gaurav Agrawal | 2218057 | 2016-02-05 20:44:48 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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.parser; |
| 18 | |
| 19 | import org.onosproject.yangutils.datamodel.YangNode; |
Bharat saraswal | f790747 | 2016-02-11 22:00:49 +0530 | [diff] [blame] | 20 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
| 21 | |
| 22 | import java.io.IOException; |
Gaurav Agrawal | 2218057 | 2016-02-05 20:44:48 +0530 | [diff] [blame] | 23 | |
| 24 | /** |
| 25 | * Abstraction of entity which provides parser service of YANG files for yangutils-maven-plugin. |
| 26 | */ |
| 27 | public interface YangUtilsParser { |
| 28 | |
| 29 | /** |
| 30 | * It is an entry function to initiate the YANG file parsing. |
| 31 | * |
Gaurav Agrawal | 2717991 | 2016-02-18 20:50:36 +0530 | [diff] [blame] | 32 | * @param file input YANG file. |
| 33 | * @return YangNode root node of the data model tree. |
| 34 | * @throws ParserException when fails to get the data model. |
| 35 | * @throws IOException when there is an exception in IO operation. |
Gaurav Agrawal | 2218057 | 2016-02-05 20:44:48 +0530 | [diff] [blame] | 36 | */ |
Bharat saraswal | f790747 | 2016-02-11 22:00:49 +0530 | [diff] [blame] | 37 | YangNode getDataModel(String file) throws IOException, ParserException; |
Gaurav Agrawal | 2218057 | 2016-02-05 20:44:48 +0530 | [diff] [blame] | 38 | } |