2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.model.api;
10 import java.util.List;
12 import javax.annotation.Nonnull;
13 import javax.annotation.concurrent.Immutable;
14 import org.opendaylight.yangtools.concepts.SemVer;
17 * This interface contains the methods for getting the data from the YANG
20 * <i>Example of YANG module</i> <code><br>
21 * {@link #getName() <b><font color="#FF0000">module</font></b>} module_name{<br>
22 {@link #getYangVersion() <b><font color="#8b4513">yang-version</font></b>} "1";<br><br>
24 {@link #getNamespace() <b><font color="#00FF00">namespace</font></b>} "urn:module:namespace";<br>
25 {@link #getPrefix() <b><font color="#0000FF">prefix</font></b><a name="prefix"></a>} "prefix";<br><br>
27 {@link #getDescription() <b><font color="#b8860b">description</font></b>} "description test";<br>
28 {@link #getReference() <b><font color="#008b8b">reference</font></b>} "reference test";<br><br>
30 {@link #getOrganization() <b><font color="#606060">organization</font></b>}
31 "John Doe, john.doe@email.com";<br>
32 {@link #getContact() <b><font color="#FF9900">contact</font></b>} "http://www.opendaylight.org/";<br>
35 {@link #getFeatures() <b><font color="#8b0000">feature</font></b>} feature-test{<br>
36 description "description of some feature";<br>
39 {@link #getNotifications() <b><font color="#b22222">notification</font></b>} notification-test;<br>
40 {@link #getRpcs() <b><font color="#d2691e">rpc</font></b>} rpc-test;<br>
41 <!-- {@link #getDeviations() <b><font color="#b8860b">deviation</font></b>} deviation-test;<br> -->
42 {@link #getIdentities() <b><font color="#bdb76b">identity</font></b>} identity-test;<br>
43 {@link #getExtensionSchemaNodes() <b><font color="#808000">extension</font></b>} extension-test;<br>
46 {@link #getRevision() <b><font color="#339900">revision</font></b>} 2011-08-27 {<br>
48 {@link #getImports() <b><font color="#9400d3">import</font></b>} other_module {<br>
49 prefix "other_module_prefix"<br>
50 revision-date 2011-08-27<br>
53 container cont {<br>
56 {@link #getAugmentations() <b><font color="#dc143c">augment</font></b>} "/cont" { ;<br>
63 public interface Module extends DataNodeContainer, ModuleIdentifier, NotificationNodeContainer {
65 * Default semantic version of Module.
67 SemVer DEFAULT_SEMANTIC_VERSION = SemVer.create(0, 0, 0);
70 * Returns the prefix of the module.
72 * @return string with the module prefix which is specified as argument of
73 * YANG {@link Module <b><font color="#0000FF">prefix</font></b>}
79 * Returns the YANG version. Default value is 1.
81 * @return string with the module YANG version which is specified as
82 * argument of YANG {@link Module <b> <font
83 * color="#8b4513">yang-version</font></b>} keyword
85 // FIXME: version 2.0.0: return YangVersion
86 String getYangVersion();
89 * Returns the module description.
91 * @return string with the module description which is specified as argument
92 * of YANG {@link Module <b><font
93 * color="#b8860b">description</font></b>} keyword
95 String getDescription();
98 * Returns the module reference.
100 * @return string with the module reference which is specified as argument
101 * of YANG {@link Module <b><font
102 * color="#008b8b">reference</font></b>} keyword
104 String getReference();
107 * Returns the module organization.
109 * @return string with the name of the organization specified in the module
110 * as the argument of YANG {@link Module <b><font
111 * color="#606060">organization</font></b>} keyword
113 String getOrganization();
116 * Returns the module contact.
119 * The contact represents the person or persons to whom technical queries
120 * concerning this module should be sent, such as their name, postal
121 * address, telephone number, and electronic mail address.
123 * @return string with the contact data specified in the module as the
124 * argument of YANG {@link Module <b><font
125 * color="#FF9900">contact</font></b>} keyword
130 * Returns imports which represents YANG modules which are imported to this
131 * module via <b>import</b> statement.
133 * @return set of module imports which are specified in the module as the
134 * argument of YANG {@link Module <b><font
135 * color="#9400d3">import</font></b>} keywords.
137 Set<ModuleImport> getImports();
139 Set<Module> getSubmodules();
142 * Returns <code>FeatureDefinition</code> instances which contain data from
143 * <b>feature</b> statements defined in the module.
146 * The feature is used to define a mechanism by which portions of the schema
147 * are marked as conditional.
149 * @return feature statements in lexicographical order which are specified
150 * in the module as the argument of YANG {@link Module <b><font
151 * color="#8b0000">feature</font></b>} keywords.
153 Set<FeatureDefinition> getFeatures();
156 * Returns <code>AugmentationSchema</code> instances which contain data from
157 * <b>augment</b> statements defined in the module.
159 * @return set of the augmentation schema instances which are specified in
160 * the module as YANG {@link Module <b><font
161 * color="#dc143c">augment</font></b>} keyword and are
162 * lexicographically ordered
164 Set<AugmentationSchema> getAugmentations();
167 * Returns <code>RpcDefinition</code> instances which contain data from
168 * <b>rpc</b> statements defined in the module.
170 * @return set of the rpc definition instances which are specified in the
171 * module as YANG {@link Module <b><font
172 * color="#d2691e">rpc</font></b>} keywords and are lexicographicaly
175 Set<RpcDefinition> getRpcs();
178 * Returns <code>Deviation</code> instances which contain data from
179 * <b>deviation</b> statements defined in the module.
181 * @return set of the deviation instances
183 Set<Deviation> getDeviations();
186 * Returns <code>IdentitySchemaNode</code> instances which contain data from
187 * <b>identity</b> statements defined in the module.
189 * @return set of identity schema node instances which are specified in the
190 * module as YANG {@link Module <b><font
191 * color="#bdb76b">identity</font></b>} keywords and are
192 * lexicographically ordered
194 Set<IdentitySchemaNode> getIdentities();
197 * Returns <code>ExtensionDefinition</code> instances which contain data
198 * from <b>extension</b> statements defined in the module.
200 * @return set of extension definition instances which are specified in the
201 * module as YANG {@link Module <b><font
202 * color="#808000">extension</font></b>} keyword and are
203 * lexicographically ordered
205 List<ExtensionDefinition> getExtensionSchemaNodes();
208 * Returns unknown nodes defined in module.
210 * @return unknown nodes in lexicographical order
213 List<UnknownSchemaNode> getUnknownSchemaNodes();