blob: 36e9c1dfa8ba7efb6d983c8ccae3dad62abba742 [file] [log] [blame]
Gaurav Agrawal50fb4642016-02-05 20:44:48 +05301/*
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
17package org.onosproject.yangutils.parser;
18
19import org.onosproject.yangutils.datamodel.YangNode;
Bharat saraswalec4ef7c2016-02-11 22:00:49 +053020import org.onosproject.yangutils.parser.exceptions.ParserException;
21
22import java.io.IOException;
Gaurav Agrawal50fb4642016-02-05 20:44:48 +053023
24/**
25 * Abstraction of entity which provides parser service of YANG files for yangutils-maven-plugin.
26 */
27public interface YangUtilsParser {
28
29 /**
30 * It is an entry function to initiate the YANG file parsing.
31 *
Gaurav Agrawal925f5632016-02-18 20:50:36 +053032 * @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 Agrawal50fb4642016-02-05 20:44:48 +053036 */
Bharat saraswalec4ef7c2016-02-11 22:00:49 +053037 YangNode getDataModel(String file) throws IOException, ParserException;
Gaurav Agrawal50fb4642016-02-05 20:44:48 +053038}