Remove ModuleIdentifier from reactor namespaces
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleIdentifier.java
index 9ede1bf913a87aff6b923ef0e4d90cf7bed1ed05..e31e1dfadbfd90289f1628aa15f0e2c2bab494f5 100644 (file)
@@ -5,66 +5,34 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 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;
-
+import java.util.Optional;
+import org.opendaylight.yangtools.yang.common.Revision;
+import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 
+/**
+ * Module identifier. This "identifier" is deprecated and is to be removed in 2.0.0.
+ * @author Robert Varga
+ *
+ * @deprecated Use {@link SourceIdentifier} instead.
+ */
+@Deprecated
 public interface ModuleIdentifier {
-    /**
-     * Returns a {@link QNameModule}, which contains the namespace and
-     * the revision of the module.
-     *
-     * @return QNameModule identifier.
-     */
-    QNameModule getQNameModule();
-
     /**
      * 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
      */
     String getName();
 
     /**
-     * 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
-     */
-    // FIXME: 2.0.0: should be a default method calling getQNameModule().getNamespace()
-    URI getNamespace();
-
-    /**
-     * Returns the revision date for the module. If you need both namespace and
-     * revision, please consider using {@link #getQNameModule()}.
+     * Returns the revision date for the module.
      *
      * @return date of the module revision which is specified as argument of
      *         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 openconfig version of yang module.
-     *
-     * If the openconfig version is not specified, default openconfig version of
-     * module is returned.
-     *
-     * @return SemVer openconfig version of yang module which is specified as
-     *         argument of
-     *         (http://openconfig.net/yang/openconfig-ext)openconfig-version statement
-     */
-    default SemVer getOpenconfigVersion() {
-        return Module.DEFAULT_OPENCONFIG_VERSION;
-    }
+    Optional<Revision> getRevision();
 }