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;
14 import org.opendaylight.yangtools.yang.common.QName;
17 * The interface contains the methods for manipulating all the top level context
18 * data (data from all red modules) like YANG notifications, extensions,
21 public interface SchemaContext extends ContainerSchemaNode {
23 public static final QName NAME = QName.create(URI.create("urn:ietf:params:xml:ns:netconf:base:1.0"), null, "data");
26 * Returns data schema node instances which represents direct subnodes (like
27 * leaf, leaf-list, list, container) in all YANG modules in the context.
29 * @return set of <code>DataSchemaNode</code> instances which represents
30 * YANG data nodes at the module top level
32 Set<DataSchemaNode> getDataDefinitions();
35 * Returns modules which are part of the schema context.
37 * @return set of the modules which belong to the schema context
39 Set<Module> getModules();
43 * Returns notification definition instances which are defined as the direct
44 * subelements in all YANG modules in the context.
46 * @return set of <code>NotificationDefinition</code> instances which
47 * represents nodes defined via <code>notification</code> YANG
50 Set<NotificationDefinition> getNotifications();
53 * Returns rpc definition instances which are defined as the direct
54 * subelements in all YANG modules in the context.
56 * @return set of <code>RpcDefinition</code> instances which represents
57 * nodes defined via <code>rpc</code> YANG keyword
59 Set<RpcDefinition> getOperations();
62 * Returns extencion definition instances which are defined as the direct
63 * subelements in all YANG modules in the context
65 * @return set of <code>ExtensionDefinition</code> instances which
66 * represents nodes defined via <code>extension</code> YANG keyword
68 Set<ExtensionDefinition> getExtensions();
71 * Returns module instance (from the context) with concrete name and
75 * string with the module name
77 * date of the module revision
78 * @return module instance which has name and revision (if specified) the
79 * same as are the values specified in parameters <code>name</code>
80 * and <code>revision</code>. In other cases the <code>null</code>
84 Module findModuleByName(final String name, final Date revision);
88 * Returns module instance (from the context) with concrete namespace.
91 * URI instance with specified namespace
92 * @return module instance which has namespace equal to the
93 * <code>namespace</code> or <code>null</code> in other cases
95 Set<Module> findModuleByNamespace(final URI namespace);
97 Module findModuleByNamespaceAndRevision(final URI namespace,final Date revision);