Cleanup checkstyle in yang-{data,model}-api
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleIdentifier.java
index 8858b51d618237a59cf53e0d94e95232edaea9f8..fac4b62b4c0d9beb2f7994d96312fae562839ce7 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;
 
 
@@ -25,7 +25,7 @@ public interface ModuleIdentifier {
 
     /**
      * Returns the name of the module which is specified as argument of YANG
-     * {@link Module <b><font color="#FF0000">module</font></b>} keyword
+     * {@link Module <b><font color="#FF0000">module</font></b>} keyword.
      *
      * @return string with the name of the module
      */
@@ -39,6 +39,7 @@ public interface ModuleIdentifier {
      *
      * @return URI format of the namespace of the module
      */
+    // FIXME: 2.0.0: should be a default method calling getQNameModule().getNamespace()
     URI getNamespace();
 
     /**
@@ -49,5 +50,23 @@ public interface ModuleIdentifier {
      *         YANG {@link Module <b><font color="#339900">revison</font></b>}
      *         keyword
      */
+    // FIXME: BUG-4688: should return Revision
+    // FIXME: BUG-4688: should be a default method calling getQNameModule().getRevision().get()
     Date getRevision();
+
+    /**
+     * Returns the semantic version of yang module.
+     *
+     * <p>
+     * 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;
+    }
 }