blob: c63e832d8b61140fb875b5587ba87b6551c5ea9b [file] [log] [blame]
Gaurav Agrawal95b416c2016-06-07 14:00:26 +05301/*
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
17package org.onosproject.yangutils.datamodel;
18
19import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
20
21/**
22 * Abstraction of resolution object which will be resolved by linker.
23 *
24 * @param <T> type of resolution entity uses / type
25 */
26public interface YangResolutionInfo<T> extends LocationInfo {
27
28 /**
29 * Resolves linking with all the ancestors node for a resolution info.
30 *
31 * @param dataModelRootNode module/sub-module node
32 * @throws DataModelException DataModelException a violation of data model
33 * rules
34 */
35 void resolveLinkingForResolutionInfo(YangReferenceResolver dataModelRootNode)
36 throws DataModelException;
37
38 /**
39 * Retrieves information about the entity that needs to be resolved.
40 *
41 * @return information about the entity that needs to be resolved
42 */
43 YangEntityToResolveInfo<T> getEntityToResolveInfo();
44
45 /**
46 * Performs inter file linking of uses/type referring to typedef/grouping
47 * of other YANG file.
48 *
49 * @param dataModelRootNode module/sub-module node
50 * @throws DataModelException a violation in data model rule
51 */
52 void linkInterFile(YangReferenceResolver dataModelRootNode)
53 throws DataModelException;
54}