blob: ba119f6efed97f5cbd6b0724dc5d1048078f8c89 [file] [log] [blame]
Gaurav Agrawal50fb4642016-02-05 20:44:48 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Gaurav Agrawal50fb4642016-02-05 20:44:48 +05303 *
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
Bharat saraswald9822e92016-04-05 15:13:44 +053019import java.io.IOException;
20
Gaurav Agrawal50fb4642016-02-05 20:44:48 +053021import org.onosproject.yangutils.datamodel.YangNode;
Bharat saraswalec4ef7c2016-02-11 22:00:49 +053022import org.onosproject.yangutils.parser.exceptions.ParserException;
23
Gaurav Agrawal50fb4642016-02-05 20:44:48 +053024/**
25 * Abstraction of entity which provides parser service of YANG files for yangutils-maven-plugin.
26 */
27public interface YangUtilsParser {
28
29 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053030 * Returns the data model node. It is an entry function to initiate the YANG file parsing.
Gaurav Agrawal50fb4642016-02-05 20:44:48 +053031 *
Gaurav Agrawal8e8770a2016-02-27 03:57:50 +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}