b76d3f1bc7b18f3e2b42475e194b394fd9163309
[mdsal.git] / binding2 / mdsal-binding2-spec / src / main / java / org / opendaylight / mdsal / binding2 / spec / YangModuleInfo.java
1 /*
2  * Copyright (c) 2016 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/epl-v10.html
7  */
8
9 package org.opendaylight.mdsal.binding2.spec;
10
11 import com.google.common.annotations.Beta;
12 import com.google.common.base.Optional;
13 import java.io.IOException;
14 import java.io.InputStream;
15 import java.util.Set;
16 import org.opendaylight.yangtools.concepts.SemVer;
17 import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
18
19 /**
20  * Provides basic information about YANG module
21  */
22 @Beta
23 public interface YangModuleInfo {
24
25     /**
26      * Returns yang module name
27      *
28      * @return YANG module name
29      */
30     String getName();
31
32     /**
33      * Returns revision of yang module.
34      *
35      * @return YANG module revision
36      */
37     String getRevision();
38
39     /**
40      * Returns semantic version of yang module
41      *
42      * @return YANG module semantic version
43      */
44     Optional<SemVer> getSemanticVersion();
45
46     /**
47      * Returns XML namespace associated to the YANG module
48      *
49      * @return XML namespace associated to the YANG module.
50      */
51     String getNamespace();
52
53     /**
54      * Returns set of imported modules
55      * @return set of YangModuleInfo instances
56      */
57     Set<YangModuleInfo> getImportedModules();
58
59     /**
60      * Transforms YangModuleInfo instance to its source representation
61      * @return YangModuleInfo source representation
62      */
63     SchemaSourceRepresentation getModuleSourceRepresentation();
64
65 }