- * {@link #getName() module} module_name{
- {@link #getYangVersion() yang-version} "1";
-
- {@link #getNamespace() namespace} "urn:module:namespace";
- {@link #getPrefix() prefix} "prefix";
-
- {@link #getDescription() description} "description test";
- {@link #getReference() reference} "reference test";
-
- {@link #getOrganization() organization} "John Doe, john.doe@email.com";
- {@link #getContact() contact} "http://www.opendaylight.org/";
-
- {@link #getFeatures() feature} feature-test{
- description "description of some feature";
- }
-
- {@link #getNotifications() notification} notification-test;
- {@link #getRpcs() rpc} rpc-test;
-
- {@link #getIdentities() identity} identity-test;
- {@link #getExtensionSchemaNodes() extension} extension-test;
-
-
- {@link #getRevision() revision} 2011-08-27 {
-
- {@link #getImports() import} other_module {
- prefix "other_module_prefix"
- revision-date 2011-08-27
- }
+ * This interface contains the methods for getting the data from the YANG module.
+ */
+public interface Module extends DataNodeContainer, DocumentedNode, Immutable, NotificationNodeContainer,
+ NamespaceRevisionAware {
+ /**
+ * Returns the name of the module which is specified as argument of YANG {@code module} statement.
+ *
+ * @return string with the name of the module
+ */
+ String getName();
- container cont {
- }
+ /**
+ * Returns a {@link QNameModule}, which contains the namespace and the revision of the module.
+ *
+ * @return QNameModule identifier.
+ */
+ QNameModule getQNameModule();
- {@link #getAugmentations() augment} "/cont" { ;
- }
+ /**
+ * Returns the namespace of the module which is specified as argument of YANG {@code namespace}
+ * keyword. If you need both namespace and revision, please consider using {@link #getQNameModule()}.
+ *
+ * @return URI format of the namespace of the module
+ */
+ @Override
+ default URI getNamespace() {
+ return getQNameModule().getNamespace();
}
-
- */
-@Immutable
-public interface Module extends DataNodeContainer, SourceStreamAware, ModuleIdentifier {
/**
- * Returns the prefix of the module
+ * Returns the revision date for the module. If you need both namespace and
+ * revision, please consider using {@link #getQNameModule()}.
*
- * @return string with the module prefix which is specified as argument of
- * YANG {@link Module prefix}
- * keyword
+ * @return date of the module revision which is specified as argument of YANG {@code revison} statement
*/
- String getPrefix();
+ @Override
+ default Optional
+ * 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 contact} keyword
+ * @return string with the contact data specified in the module as the argument of YANG {@code contact} statement
*/
- String getContact();
+ Optional
+ * 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 feature} keywords.
+ * @return feature statements in lexicographical order which are specified in the module as the argument of YANG
+ * {@code feature} statements.
*/
SetFeatureDefinition
instances which contain data from
- * feature statements defined in the module.
+ * Returns {@link FeatureDefinition} instances which contain data from {@code feature} statements defined in the
+ * module.
*
- * The feature is used to define a mechanism by which portions of the schema
- * are marked as conditional.
+ * NotificationDefinition
instances which contain data
- * from notification statements defined in the module.
- *
- * @return notification statements in lexicographical order which are
- * specified in the module as the argument of YANG {@link Module
- * notification} keywords.
- */
- SetAugmentationSchema
instances which contain data from
- * augment statements defined in the module.
+ * Returns {@link AugmentationSchemaNode} instances which contain data from {@code augment} statements defined
+ * in the module.
*
- * @return set of the augmentation schema instances which are specified in
- * the module as YANG {@link Module augment} keyword and are
- * lexicographically ordered
+ * @return set of the augmentation schema instances which are specified in the module as YANG {@code augment}
+ * statement and are lexicographically ordered
*/
- SetRpcDefinition
instances which contain data from
- * rpc statements defined in the module.
+ * Returns {@link RpcDefinition} instances which contain data from {@code rpc} statements defined in the module.
*
- * @return set of the rpc definition instances which are specified in the
- * module as YANG {@link Module rpc} keywords and are lexicographicaly
- * ordered
+ * @return set of the RPC definition instances which are specified in the module as YANG {@code rpc} statements and
+ * are lexicographicaly ordered
*/
SetDeviation
instances which contain data from
- * deviation statements defined in the module.
+ * Returns {@link Deviation} instances which contain data from {@code deviation} statements defined in the module.
*
* @return set of the deviation instances
*/
SetIdentitySchemaNode
instances which contain data from
- * identity statements defined in the module.
+ * Returns {@link IdentitySchemaNode} instances which contain data from {@code identity} statements defined in the
+ * module.
*
- * @return set of identity schema node instances which are specified in the
- * module as YANG {@link Module identity} keywords and are
- * lexicographically ordered
+ * @return set of identity schema node instances which are specified in the module as YANG {@code identity}
+ * statements and are lexicographically ordered
*/
SetExtensionDefinition
instances which contain data
- * from extension statements defined in the module.
+ * Returns {@link ExtensionDefinition} instances which contain data from {@code extension} statements defined in
+ * the module.
*
- * @return set of extension definition instances which are specified in the
- * module as YANG {@link Module extension} keyword and are
- * lexicographically ordered
+ * @return set of extension definition instances which are specified in the module as YANG {@code extension}
+ * statements and are lexicographically ordered
*/
List