BUG-1537: improved YangModuleInfo.
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / Module.java
index d6c4966c70c62d988081110d27b6283f62c9119b..9a28d8fe633a247c75724c767a1a5e702d295473 100644 (file)
@@ -7,10 +7,9 @@
  */
 package org.opendaylight.yangtools.yang.model.api;
 
-import java.net.URI;
-import java.util.Date;
 import java.util.List;
 import java.util.Set;
+import javax.annotation.concurrent.Immutable;
 
 /**
  * This interface contains the methods for getting the data from the YANG
@@ -56,35 +55,8 @@ import java.util.Set;
 
     </code>
  */
-
-public interface Module extends DataNodeContainer, SourceStreamAware {
-
-    /**
-     * 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
-     */
-    URI getNamespace();
-
-    /**
-     * Returns the name of the module which is specified as argument of YANG
-     * {@link Module <b><font color="#FF0000">module</font></b>} keyword
-     *
-     * @return string with the name of the module
-     */
-    String getName();
-
-    /**
-     * 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
-     */
-    Date getRevision();
-
+@Immutable
+public interface Module extends DataNodeContainer, SourceStreamAware, ModuleIdentifier {
     /**
      * Returns the prefix of the module
      *
@@ -155,6 +127,8 @@ public interface Module extends DataNodeContainer, SourceStreamAware {
      */
     Set<ModuleImport> getImports();
 
+    Set<Module> getSubmodules();
+
     /**
      * Returns <code>FeatureDefinition</code> instances which contain data from
      * <b>feature</b> statements defined in the module.
@@ -185,7 +159,7 @@ public interface Module extends DataNodeContainer, SourceStreamAware {
      * @return set of the augmentation schema instances which are specified in
      *         the module as YANG {@link Module <b><font
      *         color="#dc143c">augment</font></b>} keyword and are
-     *         lexicographicaly ordered
+     *         lexicographically ordered
      */
     Set<AugmentationSchema> getAugmentations();
 
@@ -215,7 +189,7 @@ public interface Module extends DataNodeContainer, SourceStreamAware {
      * @return set of identity schema node instances which are specified in the
      *         module as YANG {@link Module <b><font
      *         color="#bdb76b">identity</font></b>} keywords and are
-     *         lexicographicaly ordered
+     *         lexicographically ordered
      */
     Set<IdentitySchemaNode> getIdentities();
 
@@ -226,7 +200,7 @@ public interface Module extends DataNodeContainer, SourceStreamAware {
      * @return set of extension definition instances which are specified in the
      *         module as YANG {@link Module <b><font
      *         color="#808000">extension</font></b>} keyword and are
-     *         lexicographicaly ordered
+     *         lexicographically ordered
      */
     List<ExtensionDefinition> getExtensionSchemaNodes();
 
@@ -237,4 +211,9 @@ public interface Module extends DataNodeContainer, SourceStreamAware {
      */
     List<UnknownSchemaNode> getUnknownSchemaNodes();
 
+    /**
+     * Get yang source.
+     */
+    String getSource();
+
 }