Examine supported features in yanglib
[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 java.util.Set;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
16 import org.opendaylight.yangtools.yang.parser.api.YangParserException;
17
18 /**
19  * An entity which can assemble a set of sources into a SchemaContext. Note that unlike other variations on this
20  * theme, the definitions are done via {@link SourceReference} and can thus contain locations where a particular
21  * source can be located.
22  *
23  * <p>
24  * It is left an implementation detail whether the locations provided are checked or if the SchemaContext is resolved
25  * using some other mechanism.
26  */
27 @Beta
28 @NonNullByDefault
29 public interface SchemaContextResolver {
30
31     EffectiveModelContext resolveSchemaContext(List<SourceReference> librarySources,
32         List<SourceReference> requiredSources, Set<QName> supportedFeatures) throws YangParserException;
33 }