Bug 4662: Introduce a SemanticVersion concept - import processing
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleIdentifier.java
index 8858b51d618237a59cf53e0d94e95232edaea9f8..0ca6e4d25cdd2f397d969b1a0a0b3aaaae543b7c 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.yangtools.yang.model.api;
 
 import java.net.URI;
 import java.util.Date;
-
+import org.opendaylight.yangtools.concepts.SemVer;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 
 
@@ -50,4 +50,19 @@ public interface ModuleIdentifier {
      *         keyword
      */
     Date getRevision();
+
+    /**
+     * Returns the semantic version of yang module.
+     *
+     * If the semantic version is not specified, default semantic version of
+     * module is returned.
+     *
+     * @return SemVer semantic version of yang module which is specified as
+     *         argument of
+     *         (urn:opendaylight:yang:extension:semantic-version?revision
+     *         =2016-02-02)semantic-version statement
+     */
+    default SemVer getSemanticVersion() {
+        return Module.DEFAULT_SEMANTIC_VERSION;
+    }
 }