Make AnyDataSchemaNode.getSchemaOfAnyData() return Optional
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleIdentifier.java
index d79b942b432ebe0f2bdc813af46ae649ae6b8474..e31e1dfadbfd90289f1628aa15f0e2c2bab494f5 100644 (file)
@@ -7,9 +7,8 @@
  */
 package org.opendaylight.yangtools.yang.model.api;
 
-import java.net.URI;
-import java.util.Date;
-import org.opendaylight.yangtools.concepts.SemVer;
+import java.util.Optional;
+import org.opendaylight.yangtools.yang.common.Revision;
 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 
 /**
@@ -28,16 +27,6 @@ public interface ModuleIdentifier {
      */
     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.
-     *
-     * @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.
      *
@@ -45,23 +34,5 @@ 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;
-    }
+    Optional<Revision> getRevision();
 }