Add support for formatting EffectiveModelContext
[mdsal.git] / yanglib / mdsal-yanglib-api / src / main / java / org / opendaylight / mdsal / yanglib / api / YangLibSupport.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 org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.yangtools.rfc8528.data.api.MountPointContextFactory;
13 import org.opendaylight.yangtools.rfc8528.data.api.MountPointIdentifier;
14 import org.opendaylight.yangtools.yang.common.Revision;
15
16 /**
17  * Main entry point into YANG (Module) Library support instance.
18  */
19 @Beta
20 @NonNullByDefault
21 public interface YangLibSupport {
22     /**
23      * Create a MountPointContextFactory, backed by a specific SchemaContextResolver.
24      *
25      * @param mountId Resulting Mount Point identifier
26      * @param resolver SchemaContext resolver
27      * @return A new factory
28      * @throws NullPointerException if any argument is null
29      */
30     MountPointContextFactory createMountPointContextFactory(MountPointIdentifier mountId,
31             SchemaContextResolver resolver);
32
33     /**
34      * Return the revision date of the model this support implements. The value returned from this method is suitable
35      * for reporting in <a href="https://tools.ietf.org/html/rfc8040#section-3.3.3">RFC8040 section 3.3.3</a>.
36      *
37      * @return A revision.
38      */
39     Revision implementedRevision();
40
41     /**
42      * Create a new content builder which is used to serialize yang library content into NormalizedNodes.
43      * This content builder has further options which can influence the resulting content.
44      *
45      * @return A new yang library content builder.
46      */
47     YangLibraryContentBuilder newContentBuilder();
48 }