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.concurrent.Immutable;
15 * This interface contains the methods for getting the data from the YANG
18 * <i>Example of YANG module</i> <code><br/>
19 * {@link #getName() <b><font color="#FF0000">module</font></b>} module_name{<br />
20 {@link #getYangVersion() <b><font color="#8b4513">yang-version</font></b>} "1";<br /><br />
22 {@link #getNamespace() <b><font color="#00FF00">namespace</font></b>} "urn:module:namespace";<br />
23 {@link #getPrefix() <b><font color="#0000FF">prefix</font></b><a name="prefix"></a>} "prefix";<br /><br />
25 {@link #getDescription() <b><font color="#b8860b">description</font></b>} "description test";<br />
26 {@link #getReference() <b><font color="#008b8b">reference</font></b>} "reference test";<br /><br />
28 {@link #getOrganization() <b><font color="#606060">organization</font></b>} "John Doe, john.doe@email.com";<br />
29 {@link #getContact() <b><font color="#FF9900">contact</font></b>} "http://www.opendaylight.org/";<br /><br />
31 {@link #getFeatures() <b><font color="#8b0000">feature</font></b>} feature-test{<br />
32 description "description of some feature";<br />
35 {@link #getNotifications() <b><font color="#b22222">notification</font></b>} notification-test;<br />
36 {@link #getRpcs() <b><font color="#d2691e">rpc</font></b>} rpc-test;<br />
37 <!-- {@link #getDeviations() <b><font color="#b8860b">deviation</font></b>} deviation-test;<br /> -->
38 {@link #getIdentities() <b><font color="#bdb76b">identity</font></b>} identity-test;<br />
39 {@link #getExtensionSchemaNodes() <b><font color="#808000">extension</font></b>} extension-test;<br />
42 {@link #getRevision() <b><font color="#339900">revision</font></b>} 2011-08-27 {<br />
44 {@link #getImports() <b><font color="#9400d3">import</font></b>} other_module {<br />
45 prefix "other_module_prefix"<br />
46 revision-date 2011-08-27<br />
47 }<br /><br />
49 container cont {<br />
52 {@link #getAugmentations() <b><font color="#dc143c">augment</font></b>} "/cont" { ;<br />
59 public interface Module extends DataNodeContainer, SourceStreamAware, ModuleIdentifier {
61 * Returns the prefix of the module
63 * @return string with the module prefix which is specified as argument of
64 * YANG {@link Module <b><font color="#0000FF">prefix</font></b>}
70 * Returns the YANG version.
74 * @return string with the module YANG version which is specified as
75 * argument of YANG {@link Module <b> <font
76 * color="#8b4513">yang-version</font></b>} keyword
78 String getYangVersion();
81 * Returns the module description.
83 * @return string with the module description which is specified as argument
84 * of YANG {@link Module <b><font
85 * color="#b8860b">description</font></b>} keyword
87 String getDescription();
90 * Returns the module reference.
92 * @return string with the module reference which is specified as argument
93 * of YANG {@link Module <b><font
94 * color="#008b8b">reference</font></b>} keyword
96 String getReference();
99 * Returns the module organization.
101 * @return string with the name of the organization specified in the module
102 * as the argument of YANG {@link Module <b><font
103 * color="#606060">organization</font></b>} keyword
105 String getOrganization();
108 * Returns the module contact.
110 * The contact represents the person or persons to whom technical queries
111 * concerning this module should be sent, such as their name, postal
112 * address, telephone number, and electronic mail address.
114 * @return string with the contact data specified in the module as the
115 * argument of YANG {@link Module <b><font
116 * color="#FF9900">contact</font></b>} keyword
121 * Returns imports which represents YANG modules which are imported to this
122 * module via <b>import</b> statement.
124 * @return set of module imports which are specified in the module as the
125 * argument of YANG {@link Module <b><font
126 * color="#9400d3">import</font></b>} keywords.
128 Set<ModuleImport> getImports();
130 Set<Module> getSubmodules();
133 * Returns <code>FeatureDefinition</code> instances which contain data from
134 * <b>feature</b> statements defined in the module.
136 * The feature is used to define a mechanism by which portions of the schema
137 * are marked as conditional.
139 * @return feature statements in lexicographical order which are specified
140 * in the module as the argument of YANG {@link Module <b><font
141 * color="#8b0000">feature</font></b>} keywords.
143 Set<FeatureDefinition> getFeatures();
146 * Returns <code>NotificationDefinition</code> instances which contain data
147 * from <b>notification</b> statements defined in the module.
149 * @return notification statements in lexicographical order which are
150 * specified in the module as the argument of YANG {@link Module
151 * <b><font color="#b22222">notification</font></b>} keywords.
153 Set<NotificationDefinition> getNotifications();
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
212 List<UnknownSchemaNode> getUnknownSchemaNodes();