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;
11 import java.util.Date;
12 import java.util.List;
16 * This interface contains the methods for getting the data from the YANG
19 * <i>Example of YANG module</i> <code><br/>
20 * {@link #getName() <b><font color="#FF0000">module</font></b>} module_name{<br />
21 {@link #getYangVersion() <b><font color="#8b4513">yang-version</font></b>} "1";<br /><br />
23 {@link #getNamespace() <b><font color="#00FF00">namespace</font></b>} "urn:module:namespace";<br />
24 {@link #getPrefix() <b><font color="#0000FF">prefix</font></b><a name="prefix"></a>} "prefix";<br /><br />
26 {@link #getDescription() <b><font color="#b8860b">description</font></b>} "description test";<br />
27 {@link #getReference() <b><font color="#008b8b">reference</font></b>} "reference test";<br /><br />
29 {@link #getOrganization() <b><font color="#606060">organization</font></b>} "John Doe, john.doe@email.com";<br />
30 {@link #getContact() <b><font color="#FF9900">contact</font></b>} "http://www.opendaylight.org/";<br /><br />
32 {@link #getFeatures() <b><font color="#8b0000">feature</font></b>} feature-test{<br />
33 description "description of some feature";<br />
36 {@link #getNotifications() <b><font color="#b22222">notification</font></b>} notification-test;<br />
37 {@link #getRpcs() <b><font color="#d2691e">rpc</font></b>} rpc-test;<br />
38 <!-- {@link #getDeviations() <b><font color="#b8860b">deviation</font></b>} deviation-test;<br /> -->
39 {@link #getIdentities() <b><font color="#bdb76b">identity</font></b>} identity-test;<br />
40 {@link #getExtensionSchemaNodes() <b><font color="#808000">extension</font></b>} extension-test;<br />
43 {@link #getRevision() <b><font color="#339900">revision</font></b>} 2011-08-27 {<br />
45 {@link #getImports() <b><font color="#9400d3">import</font></b>} other_module {<br />
46 prefix "other_module_prefix"<br />
47 revision-date 2011-08-27<br />
48 }<br /><br />
50 container cont {<br />
53 {@link #getAugmentations() <b><font color="#dc143c">augment</font></b>} "/cont" { ;<br />
60 public interface Module extends DataNodeContainer, YangNode {
63 * Returns the namespace of the module which is specified as argument of
64 * YANG {@link Module <b><font color="#00FF00">namespace</font></b>}
67 * @return URI format of the namespace of the module
72 * Returns the name of the module which is specified as argument of YANG
73 * {@link Module <b><font color="#FF0000">module</font></b>} keyword
75 * @return string with the name of the module
80 * Returns the revision date for the module.
82 * @return date of the module revision which is specified as argument of
83 * YANG {@link Module <b><font color="#339900">revison</font></b>}
89 * Returns the prefix of the module
91 * @return string with the module prefix which is specified as argument of
92 * YANG {@link Module <b><font color="#0000FF">prefix</font></b>}
98 * Returns the YANG version.
100 * Default value is 1.
102 * @return string with the module YANG version which is specified as
103 * argument of YANG {@link Module <b> <font
104 * color="#8b4513">yang-version</font></b>} keyword
106 String getYangVersion();
109 * Returns the module description.
111 * @return string with the module description which is specified as argument
112 * of YANG {@link Module <b><font
113 * color="#b8860b">description</font></b>} keyword
115 String getDescription();
118 * Returns the module reference.
120 * @return string with the module reference which is specified as argument
121 * of YANG {@link Module <b><font
122 * color="#008b8b">reference</font></b>} keyword
124 String getReference();
127 * Returns the module organization.
129 * @return string with the name of the organization specified in the module
130 * as the argument of YANG {@link Module <b><font
131 * color="#606060">organization</font></b>} keyword
133 String getOrganization();
136 * Returns the module contact.
138 * The contact represents the person or persons to whom technical queries
139 * concerning this module should be sent, such as their name, postal
140 * address, telephone number, and electronic mail address.
142 * @return string with the contact data specified in the module as the
143 * argument of YANG {@link Module <b><font
144 * color="#FF9900">contact</font></b>} keyword
149 * Returns imports which represents YANG modules which are imported to this
150 * module via <b>import</b> statement.
152 * @return set of module imports which are specified in the module as the
153 * argument of YANG {@link Module <b><font
154 * color="#9400d3">import</font></b>} keywords.
156 Set<ModuleImport> getImports();
159 * Returns <code>FeatureDefinition</code> instances which contain data from
160 * <b>feature</b> statements defined in the module.
162 * The feature is used to define a mechanism by which portions of the schema
163 * are marked as conditional.
165 * @return feature statements in lexicographical order which are specified
166 * in the module as the argument of YANG {@link Module <b><font
167 * color="#8b0000">feature</font></b>} keywords.
169 Set<FeatureDefinition> getFeatures();
172 * Returns <code>NotificationDefinition</code> instances which contain data
173 * from <b>notification</b> statements defined in the module.
175 * @return notification statements in lexicographical order which are
176 * specified in the module as the argument of YANG {@link Module
177 * <b><font color="#b22222">notification</font></b>} keywords.
179 Set<NotificationDefinition> getNotifications();
182 * Returns <code>AugmentationSchema</code> instances which contain data from
183 * <b>augment</b> statements defined in the module.
185 * @return set of the augmentation schema instances which are specified in
186 * the module as YANG {@link Module <b><font
187 * color="#dc143c">augment</font></b>} keyword and are
188 * lexicographicaly ordered
190 Set<AugmentationSchema> getAugmentations();
193 * Returns <code>RpcDefinition</code> instances which contain data from
194 * <b>rpc</b> statements defined in the module.
196 * @return set of the rpc definition instances which are specified in the
197 * module as YANG {@link Module <b><font
198 * color="#d2691e">rpc</font></b>} keywords and are lexicographicaly
201 Set<RpcDefinition> getRpcs();
204 * Returns <code>Deviation</code> instances which contain data from
205 * <b>deviation</b> statements defined in the module.
207 * @return set of the deviation instances
209 Set<Deviation> getDeviations();
212 * Returns <code>IdentitySchemaNode</code> instances which contain data from
213 * <b>identity</b> statements defined in the module.
215 * @return set of identity schema node instances which are specified in the
216 * module as YANG {@link Module <b><font
217 * color="#bdb76b">identity</font></b>} keywords and are
218 * lexicographicaly ordered
220 Set<IdentitySchemaNode> getIdentities();
223 * Returns <code>ExtensionDefinition</code> instances which contain data
224 * from <b>extension</b> statements defined in the module.
226 * @return set of extension definition instances which are specified in the
227 * module as YANG {@link Module <b><font
228 * color="#808000">extension</font></b>} keyword and are
229 * lexicographicaly ordered
231 List<ExtensionDefinition> getExtensionSchemaNodes();
234 * Returns unknown nodes defined in module.
236 * @return unknown nodes in lexicographical order
238 List<UnknownSchemaNode> getUnknownSchemaNodes();