Added getParent() method to DataSchemaNode and DataNodeContainer. Fixed Bugs.
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / Module.java
index 837f1718dba21006c3737fd6322f8d88e510abde..3d5cdee20592022588cd10d36a3036f356838ecb 100644 (file)
@@ -19,51 +19,51 @@ import java.util.Set;
  * <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 #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 #getFeatures() <b><font color="#8b0000">feature</font></b>} feature-test{<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 #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 #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;{@link #getAugmentations() <b><font color="#dc143c">augment</font></b>} "/cont" { ;<br />
     &nbsp;&nbsp;}<br />
     }
-    
+
     </code>
  */
 
-public interface Module extends DataNodeContainer {
+public interface Module extends DataNodeContainer, YangNode {
 
     /**
      * 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();
@@ -71,14 +71,14 @@ public interface Module extends DataNodeContainer {
     /**
      * 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
@@ -87,7 +87,7 @@ public interface Module extends DataNodeContainer {
 
     /**
      * Returns the prefix of the module
-     * 
+     *
      * @return string with the module prefix which is specified as argument of
      *         YANG {@link Module <b><font color="#0000FF">prefix</font></b>}
      *         keyword
@@ -96,9 +96,9 @@ public interface Module extends DataNodeContainer {
 
     /**
      * Returns the YANG version.
-     * 
+     *
      * Default value is 1.
-     * 
+     *
      * @return string with the module YANG version which is specified as
      *         argument of YANG {@link Module <b> <font
      *         color="#8b4513">yang-version</font></b>} keyword
@@ -107,7 +107,7 @@ public interface Module extends DataNodeContainer {
 
     /**
      * Returns the module description.
-     * 
+     *
      * @return string with the module description which is specified as argument
      *         of YANG {@link Module <b><font
      *         color="#b8860b">description</font></b>} keyword
@@ -116,7 +116,7 @@ public interface Module extends DataNodeContainer {
 
     /**
      * Returns the module reference.
-     * 
+     *
      * @return string with the module reference which is specified as argument
      *         of YANG {@link Module <b><font
      *         color="#008b8b">reference</font></b>} keyword
@@ -125,7 +125,7 @@ public interface Module extends DataNodeContainer {
 
     /**
      * Returns the module organization.
-     * 
+     *
      * @return string with the name of the organization specified in the module
      *         as the argument of YANG {@link Module <b><font
      *         color="#606060">organization</font></b>} keyword
@@ -134,11 +134,11 @@ public interface Module extends DataNodeContainer {
 
     /**
      * Returns the module contact.
-     * 
+     *
      * The contact represents the person or persons to whom technical queries
      * concerning this module should be sent, such as their name, postal
      * address, telephone number, and electronic mail address.
-     * 
+     *
      * @return string with the contact data specified in the module as the
      *         argument of YANG {@link Module <b><font
      *         color="#FF9900">contact</font></b>} keyword
@@ -148,7 +148,7 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns imports which represents YANG modules which are imported to this
      * module via <b>import</b> statement.
-     * 
+     *
      * @return set of module imports which are specified in the module as the
      *         argument of YANG {@link Module <b><font
      *         color="#9400d3">import</font></b>} keywords.
@@ -158,10 +158,10 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns <code>FeatureDefinition</code> instances which contain data from
      * <b>feature</b> statements defined in the module.
-     * 
+     *
      * The feature is used to define a mechanism by which portions of the schema
      * are marked as conditional.
-     * 
+     *
      * @return feature statements in lexicographical order which are specified
      *         in the module as the argument of YANG {@link Module <b><font
      *         color="#8b0000">feature</font></b>} keywords.
@@ -171,7 +171,7 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns <code>NotificationDefinition</code> instances which contain data
      * from <b>notification</b> statements defined in the module.
-     * 
+     *
      * @return notification statements in lexicographical order which are
      *         specified in the module as the argument of YANG {@link Module
      *         <b><font color="#b22222">notification</font></b>} keywords.
@@ -181,7 +181,7 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns <code>AugmentationSchema</code> instances which contain data from
      * <b>augment</b> statements defined in the module.
-     * 
+     *
      * @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
@@ -192,7 +192,7 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns <code>RpcDefinition</code> instances which contain data from
      * <b>rpc</b> statements defined in the module.
-     * 
+     *
      * @return set of the rpc definition instances which are specified in the
      *         module as YANG {@link Module <b><font
      *         color="#d2691e">rpc</font></b>} keywords and are lexicographicaly
@@ -203,7 +203,7 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns <code>Deviation</code> instances which contain data from
      * <b>deviation</b> statements defined in the module.
-     * 
+     *
      * @return set of the deviation instances
      */
     Set<Deviation> getDeviations();
@@ -211,7 +211,7 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns <code>IdentitySchemaNode</code> instances which contain data from
      * <b>identity</b> statements defined in the module.
-     * 
+     *
      * @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
@@ -222,7 +222,7 @@ public interface Module extends DataNodeContainer {
     /**
      * Returns <code>ExtensionDefinition</code> instances which contain data
      * from <b>extension</b> statements defined in the module.
-     * 
+     *
      * @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
@@ -232,7 +232,7 @@ public interface Module extends DataNodeContainer {
 
     /**
      * Returns unknown nodes defined in module.
-     * 
+     *
      * @return unknown nodes in lexicographical order
      */
     List<UnknownSchemaNode> getUnknownSchemaNodes();