Cleanup checkstyle in yang-{data,model}-api
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleImport.java
1 /*
2  * Copyright (c) 2013 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 package org.opendaylight.yangtools.yang.model.api;
9
10 import java.util.Date;
11 import org.opendaylight.yangtools.concepts.SemVer;
12
13 /**
14  * Interface describing YANG 'import' statement.
15  *
16  * <p>
17  * The import statement makes definitions from one module available inside
18  * another module or submodule.
19  */
20 public interface ModuleImport extends DocumentedNode {
21     /**
22      * Returns the name of the module to import.
23      *
24      * @return Name of the module to import
25      */
26     String getModuleName();
27
28     /**
29      * Returns the module revision to import. May be null.
30      *
31      * @return Revision of module to import
32      */
33     Date getRevision();
34
35     /**
36      * Returns the semantic version to import.
37      *
38      * @return Semantic version of module to import
39      */
40     default SemVer getSemanticVersion() {
41         return Module.DEFAULT_SEMANTIC_VERSION;
42     }
43
44     /**
45      * Returns the prefix associated with the imported module.
46      *
47      * @return Prefix used to point to imported module
48      */
49     String getPrefix();
50 }