Merge "Bug 2894 - Yang Data Codec Gson: null pointer exception when trying to deseria...
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleIdentifier.java
index a1e8b433c06a69c278ad925a1697e5eba72bdaff..8858b51d618237a59cf53e0d94e95232edaea9f8 100644 (file)
@@ -11,17 +11,17 @@ package org.opendaylight.yangtools.yang.model.api;
 import java.net.URI;
 import java.util.Date;
 
+import org.opendaylight.yangtools.yang.common.QNameModule;
 
-public interface ModuleIdentifier {
 
+public interface ModuleIdentifier {
     /**
-     * Returns the namespace of the module which is specified as argument of
-     * YANG {@link Module <b><font color="#00FF00">namespace</font></b>}
-     * keyword.
+     * Returns a {@link QNameModule}, which contains the namespace and
+     * the revision of the module.
      *
-     * @return URI format of the namespace of the module
+     * @return QNameModule identifier.
      */
-    URI getNamespace();
+    QNameModule getQNameModule();
 
     /**
      * Returns the name of the module which is specified as argument of YANG
@@ -32,7 +32,18 @@ public interface ModuleIdentifier {
     String getName();
 
     /**
-     * Returns the revision date for the module.
+     * Returns the namespace of the module which is specified as argument of
+     * YANG {@link Module <b><font color="#00FF00">namespace</font></b>}
+     * keyword. If you need both namespace and revision, please consider using
+     * {@link #getQNameModule()}.
+     *
+     * @return URI format of the namespace of the module
+     */
+    URI getNamespace();
+
+    /**
+     * Returns the revision date for the module. If you need both namespace and
+     * revision, please consider using {@link #getQNameModule()}.
      *
      * @return date of the module revision which is specified as argument of
      *         YANG {@link Module <b><font color="#339900">revison</font></b>}