blob: fb45c274470e4a33790c45e65d03fcb2cef13339 [file] [log] [blame]
Gaurav Agrawal8c775582017-01-12 14:12:29 +05301/*
Bharat saraswal59e7ac92017-01-19 19:51:50 +05302 * 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.
Gaurav Agrawal8c775582017-01-12 14:12:29 +053015 */
16
17package org.onosproject.yang;
18
19import java.util.Set;
20
21/**
22 * Representation of a compiled YANG model.
23 */
24public interface YangModel {
25
26 /**
27 * Returns set of YANG module with information.
28 *
29 * @return YANG module info
30 */
31 Set<YangModule> getYangModules();
32
33 /**
34 * Returns set of YANG modules identifier.
35 *
36 * @return YANG module identifier
37 */
38 Set<YangModuleId> getYangModulesId();
39
40 /**
41 * Returns YANG module information corresponding to a given module
42 * identifier.
43 *
44 * @param id module identifier
45 * @return YANG module information
46 */
47 YangModule getYangModule(YangModuleId id);
Bharat saraswal59e7ac92017-01-19 19:51:50 +053048
49 /**
50 * Adds YANG module information for a given module identifier.
51 *
52 * @param id module identifier
53 * @param module YANG module information
54 */
55 void addModule(YangModuleId id, YangModule module);
Gaurav Agrawal8c775582017-01-12 14:12:29 +053056}