Bump to odlparent-9.0.0/yangtools-7.0.1-SNAPSHOT
[mdsal.git] / yanglib / mdsal-yanglib-api / src / main / java / org / opendaylight / mdsal / yanglib / api / SchemaContextResolver.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech s.r.o. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.yanglib.api;
9
10 import com.google.common.annotations.Beta;
11 import java.util.List;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
14 import org.opendaylight.yangtools.yang.parser.api.YangParserException;
15
16 /**
17  * An entity which can assemble a set of sources into a SchemaContext. Note that unlike other variations on this
18  * theme, the definitions are done via {@link SourceReference} and can thus contain locations where a particular
19  * source can be located.
20  *
21  * <p>
22  * It is left an implementation detail whether the locations provided are checked or if the SchemaContext is resolved
23  * using some other mechanism.
24  */
25 @Beta
26 @NonNullByDefault
27 public interface SchemaContextResolver {
28
29     EffectiveModelContext resolveSchemaContext(List<SourceReference> librarySources,
30             List<SourceReference> requiredSources) throws YangParserException;
31 }