/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.yangtools.yang.model.api;
import java.util.List;
import java.util.Set;
import javax.annotation.concurrent.Immutable;
/**
* This interface contains the methods for getting the data from the YANG
* module.
*
* Example of YANG module
* {@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
}
container cont {
}
{@link #getAugmentations() augment} "/cont" { ;
}
}
*/
@Immutable
public interface Module extends DataNodeContainer, SourceStreamAware, ModuleIdentifier {
/**
* Returns the prefix of the module
*
* @return string with the module prefix which is specified as argument of
* YANG {@link Module prefix}
* keyword
*/
String getPrefix();
/**
* Returns the YANG version.
*
* Default value is 1.
*
* @return string with the module YANG version which is specified as
* argument of YANG {@link Module yang-version} keyword
*/
String getYangVersion();
/**
* Returns the module description.
*
* @return string with the module description which is specified as argument
* of YANG {@link Module description} keyword
*/
String getDescription();
/**
* Returns the module reference.
*
* @return string with the module reference which is specified as argument
* of YANG {@link Module reference} keyword
*/
String getReference();
/**
* Returns the module organization.
*
* @return string with the name of the organization specified in the module
* as the argument of YANG {@link Module organization} keyword
*/
String getOrganization();
/**
* Returns the module contact.
*
* 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
*/
String getContact();
/**
* Returns imports which represents YANG modules which are imported to this
* module via import statement.
*
* @return set of module imports which are specified in the module as the
* argument of YANG {@link Module import} keywords.
*/
Set getImports();
Set getSubmodules();
/**
* Returns FeatureDefinition
instances which contain data from
* feature statements defined in the module.
*
* 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.
*/
Set getFeatures();
/**
* Returns 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.
*/
Set getNotifications();
/**
* Returns AugmentationSchema
instances which contain data from
* 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
*/
Set getAugmentations();
/**
* Returns RpcDefinition
instances which contain data from
* 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
*/
Set getRpcs();
/**
* Returns Deviation
instances which contain data from
* deviation statements defined in the module.
*
* @return set of the deviation instances
*/
Set getDeviations();
/**
* Returns IdentitySchemaNode
instances which contain data from
* 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
*/
Set getIdentities();
/**
* Returns ExtensionDefinition
instances which contain data
* from 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
*/
List getExtensionSchemaNodes();
/**
* Returns unknown nodes defined in module.
*
* @return unknown nodes in lexicographical order
*/
List getUnknownSchemaNodes();
/**
* Get yang source.
*/
String getSource();
}