BUG-997: Introduce SchemaSource respository and related APIs
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / api / SchemaRepository.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. 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/eplv10.html
7  */
8 package org.opendaylight.yangtools.yang.model.repo.api;
9
10 import javax.annotation.Nonnull;
11
12 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
13
14 /**
15  * Interface exposed by repository implementations. A schema repository is a logically
16  * centralized place for model storage and creation of {@link SchemaContext} instances.
17  */
18 public interface SchemaRepository {
19     /**
20      * Instantiate a new {@link SchemaContextFactory}, which will filter available schema
21      * sources using the provided filter.
22      *
23      * @param filter Filter which acts as the gating function before a schema source is
24      *               considered by the factory for inclusion in the {@link SchemaContext}
25      *               it produces.
26      * @return A new schema context factory.
27      */
28     SchemaContextFactory createSchemaContextFactory(@Nonnull SchemaSourceFilter filter);
29 }