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