Class AbstractEffectiveModule<D extends DeclaredStatement<String>>
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementBase<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNodeWithoutStatus<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNode<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractSchemaEffectiveDocumentedNode<String,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveModule<D>
-
- All Implemented Interfaces:
Immutable
,MutationBehaviour<Immutable>
,DataNodeContainer
,DocumentedNode
,DocumentedNode.WithStatus
,EffectiveStatement<String,D>
,ModelStatement<String>
,Module
,NamespaceRevisionAware
,NotificationNodeContainer
,NotificationNodeContainerCompat<String,D>
,SchemaTreeAwareEffectiveStatement<String,D>
@Beta public abstract class AbstractEffectiveModule<D extends DeclaredStatement<String>> extends AbstractSchemaEffectiveDocumentedNode<String,D> implements Module, NotificationNodeContainerCompat<String,D>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeAwareEffectiveStatement
SchemaTreeAwareEffectiveStatement.Namespace<T extends SchemaTreeEffectiveStatement<?>>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEffectiveModule(@NonNull StmtContext<String,D,? extends EffectiveStatement<String,?>> ctx, @NonNull String prefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<DataSchemaNode>
findDataChildByName(QName name)
Returns the child node corresponding to the specified name.protected static @NonNull String
findPrefix(@NonNull StmtContext<?,?,?> ctx, String type, String name)
Set<AugmentationSchemaNode>
getAugmentations()
ReturnsAugmentationSchemaNode
instances which contain data fromaugment
statements defined in the module.Set<DataSchemaNode>
getChildNodes()
Returns set of all child nodes defined within this DataNodeContainer.Optional<String>
getContact()
Returns the module contact.Set<Deviation>
getDeviations()
ReturnsDeviation
instances which contain data fromdeviation
statements defined in the module.List<ExtensionDefinition>
getExtensionSchemaNodes()
ReturnsExtensionDefinition
instances which contain data fromextension
statements defined in the module.Set<FeatureDefinition>
getFeatures()
ReturnsFeatureDefinition
instances which contain data fromfeature
statements defined in the module.Set<GroupingDefinition>
getGroupings()
Returns set of all groupings defined within this DataNodeContainer.Set<IdentitySchemaNode>
getIdentities()
ReturnsIdentitySchemaNode
instances which contain data fromidentity
statements defined in the module.Set<ModuleImport>
getImports()
Returns imports which represents YANG modules which are imported to this module viaimport
statement.String
getName()
Returns the name of the module which is specified as argument of YANGmodule
statement.URI
getNamespace()
Returns the namespace of the module which is specified as argument of YANGnamespace
keyword.Set<NotificationDefinition>
getNotifications()
Return the set of notifications in this container, keyed by QName.Optional<String>
getOrganization()
Returns the module organization.String
getPrefix()
Returns the prefix of the module.Optional<Revision>
getRevision()
Returns the revision date for the module.Set<RpcDefinition>
getRpcs()
ReturnsRpcDefinition
instances which contain data fromrpc
statements defined in the module.Optional<SemVer>
getSemanticVersion()
Returns the semantic version of YANG module.Set<TypeDefinition<?>>
getTypeDefinitions()
Returns set of all newly defined types within this DataNodeContainer.Set<UsesNode>
getUses()
Returns grouping nodes used ny this container.YangVersion
getYangVersion()
Returns the YANG version.String
toString()
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractSchemaEffectiveDocumentedNode
derivedSet, findDataSchemaNode, getNamespaceContents
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNode
getStatus, getUnknownSchemaNodes
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNodeWithoutStatus
getDescription, getReference, nullableDescription, nullableReference
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase
argument, getDeclared, getStatementSource, statementDefinition
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementBase
allSubstatementsOfType, effectiveSubstatements, firstEffectiveSubstatementOfType, firstSchemaNode, firstSubstatementOfType, firstSubstatementOfType, get, getAll, initSubstatements, initSubstatements
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DataNodeContainer
findDataChildByName, findDataTreeChild, findDataTreeChild, findDataTreeChild, getDataChildByName
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
getDescription, getReference, getUnknownSchemaNodes
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement
effectiveSubstatements, findAll, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, get, getAll, getDeclared, streamEffectiveSubstatements
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.ModelStatement
argument, getStatementSource, statementDefinition
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.Module
getQNameModule, getSubmodules
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.compat.NotificationNodeContainerCompat
findNotification
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeAwareEffectiveStatement
findSchemaTreeNode
-
-
-
-
Constructor Detail
-
AbstractEffectiveModule
protected AbstractEffectiveModule(@NonNull StmtContext<String,D,? extends EffectiveStatement<String,?>> ctx, @NonNull String prefix)
-
-
Method Detail
-
getNamespace
public URI getNamespace()
Description copied from interface:Module
Returns the namespace of the module which is specified as argument of YANGnamespace
keyword. If you need both namespace and revision, please consider usingModule.getQNameModule()
.- Specified by:
getNamespace
in interfaceModule
- Specified by:
getNamespace
in interfaceNamespaceRevisionAware
- Returns:
- URI format of the namespace of the module
-
getName
public String getName()
Description copied from interface:Module
Returns the name of the module which is specified as argument of YANGmodule
statement.
-
getRevision
public Optional<Revision> getRevision()
Description copied from interface:Module
Returns the revision date for the module. If you need both namespace and revision, please consider usingModule.getQNameModule()
.- Specified by:
getRevision
in interfaceModule
- Specified by:
getRevision
in interfaceNamespaceRevisionAware
- Returns:
- date of the module revision which is specified as argument of YANG
revison
statement
-
getPrefix
public String getPrefix()
Description copied from interface:Module
Returns the prefix of the module.
-
getYangVersion
public YangVersion getYangVersion()
Description copied from interface:Module
Returns the YANG version.- Specified by:
getYangVersion
in interfaceModule
- Returns:
- YANG version of this module.
-
getOrganization
public Optional<String> getOrganization()
Description copied from interface:Module
Returns the module organization.- Specified by:
getOrganization
in interfaceModule
- Returns:
- string with the name of the organization specified in the module as the argument of YANG
organization
statement
-
getContact
public Optional<String> getContact()
Description copied from interface:Module
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.
- Specified by:
getContact
in interfaceModule
- Returns:
- string with the contact data specified in the module as the argument of YANG
contact
statement
-
getImports
public Set<ModuleImport> getImports()
Description copied from interface:Module
Returns imports which represents YANG modules which are imported to this module viaimport
statement.- Specified by:
getImports
in interfaceModule
- Returns:
- set of module imports which are specified in the module as the argument of YANG
import
statements.
-
getFeatures
public Set<FeatureDefinition> getFeatures()
Description copied from interface:Module
ReturnsFeatureDefinition
instances which contain data fromfeature
statements defined in the module.The feature is used to define a mechanism by which portions of the schema are marked as conditional.
- Specified by:
getFeatures
in interfaceModule
- Returns:
- feature statements in lexicographical order which are specified in the module as the argument of YANG
feature
statements.
-
getNotifications
public Set<NotificationDefinition> getNotifications()
Description copied from interface:NotificationNodeContainer
Return the set of notifications in this container, keyed by QName. RFC7950 specifies thatAugmentationSchemaNode
s,GroupingDefinition
s,ListSchemaNode
s andContainerSchemaNode
s can also containNotificationDefinition
s.- Specified by:
getNotifications
in interfaceNotificationNodeContainer
- Returns:
- set of notification nodes
-
getAugmentations
public Set<AugmentationSchemaNode> getAugmentations()
Description copied from interface:Module
ReturnsAugmentationSchemaNode
instances which contain data fromaugment
statements defined in the module.- Specified by:
getAugmentations
in interfaceModule
- Returns:
- set of the augmentation schema instances which are specified in the module as YANG
augment
statement and are lexicographically ordered
-
getRpcs
public Set<RpcDefinition> getRpcs()
Description copied from interface:Module
ReturnsRpcDefinition
instances which contain data fromrpc
statements defined in the module.
-
getDeviations
public Set<Deviation> getDeviations()
Description copied from interface:Module
ReturnsDeviation
instances which contain data fromdeviation
statements defined in the module.- Specified by:
getDeviations
in interfaceModule
- Returns:
- set of the deviation instances
-
getExtensionSchemaNodes
public List<ExtensionDefinition> getExtensionSchemaNodes()
Description copied from interface:Module
ReturnsExtensionDefinition
instances which contain data fromextension
statements defined in the module.- Specified by:
getExtensionSchemaNodes
in interfaceModule
- Returns:
- set of extension definition instances which are specified in the module as YANG
extension
statements and are lexicographically ordered
-
getIdentities
public Set<IdentitySchemaNode> getIdentities()
Description copied from interface:Module
ReturnsIdentitySchemaNode
instances which contain data fromidentity
statements defined in the module.- Specified by:
getIdentities
in interfaceModule
- Returns:
- set of identity schema node instances which are specified in the module as YANG
identity
statements and are lexicographically ordered
-
getTypeDefinitions
public final Set<TypeDefinition<?>> getTypeDefinitions()
Description copied from interface:DataNodeContainer
Returns set of all newly defined types within this DataNodeContainer.- Specified by:
getTypeDefinitions
in interfaceDataNodeContainer
- Returns:
- typedef statements in lexicographical order
-
getChildNodes
public final Set<DataSchemaNode> getChildNodes()
Description copied from interface:DataNodeContainer
Returns set of all child nodes defined within this DataNodeContainer. Although the return type is a collection, each node is guaranteed to be present at most once.Note that the nodes returned are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are present instead of their children. This is consistent withschema tree
.- Specified by:
getChildNodes
in interfaceDataNodeContainer
- Returns:
- child nodes in lexicographical order
-
getGroupings
public final Set<GroupingDefinition> getGroupings()
Description copied from interface:DataNodeContainer
Returns set of all groupings defined within this DataNodeContainer.- Specified by:
getGroupings
in interfaceDataNodeContainer
- Returns:
- grouping statements in lexicographical order
-
findDataChildByName
public final Optional<DataSchemaNode> findDataChildByName(QName name)
Description copied from interface:DataNodeContainer
Returns the child node corresponding to the specified name.Note that the nodes searched are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are returned instead of their matching children.- Specified by:
findDataChildByName
in interfaceDataNodeContainer
- Parameters:
name
- QName of child- Returns:
- child node of this DataNodeContainer if child with given name is present, empty otherwise
-
getUses
public Set<UsesNode> getUses()
Description copied from interface:DataNodeContainer
Returns grouping nodes used ny this container.- Specified by:
getUses
in interfaceDataNodeContainer
- Returns:
- Set of all uses nodes defined within this DataNodeContainer
-
getSemanticVersion
public Optional<SemVer> getSemanticVersion()
Description copied from interface:Module
Returns the semantic version of YANG module. If the semantic version is not specified, default semantic version of module is returned.- Specified by:
getSemanticVersion
in interfaceModule
- Returns:
- SemVer semantic version of YANG module which is specified as argument of
(urn:opendaylight:yang:extension:semantic-version?revision=2016-02-02)semantic-version
statement
-
findPrefix
protected static final @NonNull String findPrefix(@NonNull StmtContext<?,?,?> ctx, String type, String name)
-
-