BUG-4861: Make FractionDigitsStatement#getValue() return an int
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / Module.java
index d6c4966c70c62d988081110d27b6283f62c9119b..0da03eb986d914797343a4b973fe7b49af3bb2f3 100644 (file)
@@ -7,84 +7,56 @@
  */
 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
- * module.<br />
- * <br />
- * <i>Example of YANG module</i> <code><br/>
- * {@link #getName() <b><font color="#FF0000">module</font></b>} module_name{<br />
-    &nbsp;&nbsp;{@link #getYangVersion() <b><font color="#8b4513">yang-version</font></b>} "1";<br /><br />
+ * module.<br>
+ * <br>
+ * <i>Example of YANG module</i> <code><br>
+ * {@link #getName() <b><font color="#FF0000">module</font></b>} module_name{<br>
+    &nbsp;&nbsp;{@link #getYangVersion() <b><font color="#8b4513">yang-version</font></b>} "1";<br><br>
 
-    &nbsp;&nbsp;{@link #getNamespace() <b><font color="#00FF00">namespace</font></b>} "urn:module:namespace";<br />
-    &nbsp;&nbsp;{@link #getPrefix() <b><font color="#0000FF">prefix</font></b><a name="prefix"></a>} "prefix";<br /><br />
+    &nbsp;&nbsp;{@link #getNamespace() <b><font color="#00FF00">namespace</font></b>} "urn:module:namespace";<br>
+    &nbsp;&nbsp;{@link #getPrefix() <b><font color="#0000FF">prefix</font></b><a name="prefix"></a>} "prefix";<br><br>
 
-    &nbsp;&nbsp;{@link #getDescription() <b><font color="#b8860b">description</font></b>} "description test";<br />
-    &nbsp;&nbsp;{@link #getReference() <b><font color="#008b8b">reference</font></b>} "reference test";<br /><br />
+    &nbsp;&nbsp;{@link #getDescription() <b><font color="#b8860b">description</font></b>} "description test";<br>
+    &nbsp;&nbsp;{@link #getReference() <b><font color="#008b8b">reference</font></b>} "reference test";<br><br>
 
-    &nbsp;&nbsp;{@link #getOrganization() <b><font color="#606060">organization</font></b>} "John Doe, john.doe@email.com";<br />
-    &nbsp;&nbsp;{@link #getContact() <b><font color="#FF9900">contact</font></b>} "http://www.opendaylight.org/";<br /><br />
+    &nbsp;&nbsp;{@link #getOrganization() <b><font color="#606060">organization</font></b>} "John Doe, john.doe@email.com";<br>
+    &nbsp;&nbsp;{@link #getContact() <b><font color="#FF9900">contact</font></b>} "http://www.opendaylight.org/";<br><br>
 
-    &nbsp;&nbsp;{@link #getFeatures() <b><font color="#8b0000">feature</font></b>} feature-test{<br />
-    &nbsp;&nbsp;&nbsp;&nbsp; description "description of some feature";<br />
-    &nbsp;&nbsp;}</br>
+    &nbsp;&nbsp;{@link #getFeatures() <b><font color="#8b0000">feature</font></b>} feature-test{<br>
+    &nbsp;&nbsp;&nbsp;&nbsp; description "description of some feature";<br>
+    &nbsp;&nbsp;}<br>
 
-    &nbsp;&nbsp;{@link #getNotifications() <b><font color="#b22222">notification</font></b>} notification-test;<br />
-    &nbsp;&nbsp;{@link #getRpcs() <b><font color="#d2691e">rpc</font></b>} rpc-test;<br />
-    <!-- &nbsp;&nbsp;{@link #getDeviations() <b><font color="#b8860b">deviation</font></b>} deviation-test;<br /> -->
-    &nbsp;&nbsp;{@link #getIdentities() <b><font color="#bdb76b">identity</font></b>} identity-test;<br />
-    &nbsp;&nbsp;{@link #getExtensionSchemaNodes() <b><font color="#808000">extension</font></b>} extension-test;<br />
+    &nbsp;&nbsp;{@link #getNotifications() <b><font color="#b22222">notification</font></b>} notification-test;<br>
+    &nbsp;&nbsp;{@link #getRpcs() <b><font color="#d2691e">rpc</font></b>} rpc-test;<br>
+    <!-- &nbsp;&nbsp;{@link #getDeviations() <b><font color="#b8860b">deviation</font></b>} deviation-test;<br> -->
+    &nbsp;&nbsp;{@link #getIdentities() <b><font color="#bdb76b">identity</font></b>} identity-test;<br>
+    &nbsp;&nbsp;{@link #getExtensionSchemaNodes() <b><font color="#808000">extension</font></b>} extension-test;<br>
 
 
-    &nbsp;&nbsp;{@link #getRevision() <b><font color="#339900">revision</font></b>} 2011-08-27 {<br />
+    &nbsp;&nbsp;{@link #getRevision() <b><font color="#339900">revision</font></b>} 2011-08-27 {<br>
 
-    &nbsp;&nbsp;{@link #getImports() <b><font color="#9400d3">import</font></b>} other_module {<br />
-    &nbsp;&nbsp;&nbsp;&nbsp;prefix "other_module_prefix"<br />
-    &nbsp;&nbsp;&nbsp;&nbsp;revision-date 2011-08-27<br />
-    &nbsp;&nbsp;}<br /><br />
+    &nbsp;&nbsp;{@link #getImports() <b><font color="#9400d3">import</font></b>} other_module {<br>
+    &nbsp;&nbsp;&nbsp;&nbsp;prefix "other_module_prefix"<br>
+    &nbsp;&nbsp;&nbsp;&nbsp;revision-date 2011-08-27<br>
+    &nbsp;&nbsp;}<br><br>
 
-    &nbsp;&nbsp;container cont {<br />
-    &nbsp;&nbsp;}<br />
+    &nbsp;&nbsp;container cont {<br>
+    &nbsp;&nbsp;}<br>
 
-    &nbsp;&nbsp;{@link #getAugmentations() <b><font color="#dc143c">augment</font></b>} "/cont" { ;<br />
-    &nbsp;&nbsp;}<br />
+    &nbsp;&nbsp;{@link #getAugmentations() <b><font color="#dc143c">augment</font></b>} "/cont" { ;<br>
+    &nbsp;&nbsp;}<br>
     }
 
     </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();
+
 }