@Beta public abstract class AbstractEffectiveModule<D extends DeclaredStatement<String>> extends AbstractSchemaEffectiveDocumentedNode<String,D> implements Module, NotificationNodeContainerCompat<String,D>
DocumentedNode.WithStatus
SchemaTreeAwareEffectiveStatement.Namespace<T extends SchemaTreeEffectiveStatement<?>>
Modifier | Constructor and Description |
---|---|
protected |
AbstractEffectiveModule(@NonNull StmtContext<String,D,? extends EffectiveStatement<String,?>> ctx,
@NonNull String prefix) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendPrefixes(StmtContext<?,?,?> ctx,
ImmutableMap.Builder<String,ModuleEffectiveStatement> builder) |
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()
Returns
AugmentationSchemaNode instances which contain data from augment 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()
Returns
Deviation instances which contain data from deviation statements defined in the module. |
List<ExtensionDefinition> |
getExtensionSchemaNodes()
Returns
ExtensionDefinition instances which contain data from extension statements defined in
the module. |
Set<FeatureDefinition> |
getFeatures()
Returns
FeatureDefinition instances which contain data from feature statements defined in the
module. |
Set<GroupingDefinition> |
getGroupings()
Returns set of all groupings defined within this DataNodeContainer.
|
Set<IdentitySchemaNode> |
getIdentities()
Returns
IdentitySchemaNode instances which contain data from identity statements defined in the
module. |
Set<ModuleImport> |
getImports()
Returns imports which represents YANG modules which are imported to this module via
import statement. |
String |
getName()
Returns the name of the module which is specified as argument of YANG
module statement. |
URI |
getNamespace()
Returns the namespace of the module which is specified as argument of YANG
namespace
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()
Returns
RpcDefinition instances which contain data from rpc 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.
|
protected static @NonNull Object |
maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects.
|
String |
toString() |
protected static <T> @NonNull ImmutableList<T> |
unmaskList(@NonNull Object masked,
@NonNull Class<T> type)
Utility method for recovering singleton lists squashed by
maskList(ImmutableList) . |
findDataSchemaNode, getNamespaceContents
getStatus, getUnknownSchemaNodes
getDescription, getReference, nullableDescription, nullableReference
argument, getDeclared, getStatementSource, statementDefinition
allSubstatementsOfType, effectiveSubstatements, firstEffectiveSubstatementOfType, firstSchemaNode, firstSubstatementOfType, firstSubstatementOfType, initSubstatements, initSubstatements
get, getAll, unmaskList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getQNameModule, getSubmodules
findDataChildByName, findDataTreeChild, findDataTreeChild, findDataTreeChild, getDataChildByName
getDescription, getReference, getUnknownSchemaNodes
findNotification
findSchemaTreeNode
effectiveSubstatements, findAll, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, get, getAll, getDeclared, streamEffectiveSubstatements
argument, getStatementSource, statementDefinition
protected AbstractEffectiveModule(@NonNull StmtContext<String,D,? extends EffectiveStatement<String,?>> ctx, @NonNull String prefix)
public URI getNamespace()
Module
namespace
keyword. If you need both namespace and revision, please consider using Module.getQNameModule()
.getNamespace
in interface Module
getNamespace
in interface NamespaceRevisionAware
public String getName()
Module
module
statement.public Optional<Revision> getRevision()
Module
Module.getQNameModule()
.getRevision
in interface Module
getRevision
in interface NamespaceRevisionAware
revison
statementpublic String getPrefix()
Module
public YangVersion getYangVersion()
Module
getYangVersion
in interface Module
public Optional<String> getOrganization()
Module
getOrganization
in interface Module
organization
statementpublic Optional<String> getContact()
Module
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.
getContact
in interface Module
contact
statementpublic Set<ModuleImport> getImports()
Module
import
statement.getImports
in interface Module
import
statements.public Set<FeatureDefinition> getFeatures()
Module
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.
getFeatures
in interface Module
feature
statements.public Set<NotificationDefinition> getNotifications()
NotificationNodeContainer
AugmentationSchemaNode
s, GroupingDefinition
s, ListSchemaNode
s and
ContainerSchemaNode
s can also contain NotificationDefinition
s.getNotifications
in interface NotificationNodeContainer
public Set<AugmentationSchemaNode> getAugmentations()
Module
AugmentationSchemaNode
instances which contain data from augment
statements defined
in the module.getAugmentations
in interface Module
augment
statement and are lexicographically orderedpublic Set<RpcDefinition> getRpcs()
Module
RpcDefinition
instances which contain data from rpc
statements defined in the module.public Set<Deviation> getDeviations()
Module
Deviation
instances which contain data from deviation
statements defined in the module.getDeviations
in interface Module
public List<ExtensionDefinition> getExtensionSchemaNodes()
Module
ExtensionDefinition
instances which contain data from extension
statements defined in
the module.getExtensionSchemaNodes
in interface Module
extension
statements and are lexicographically orderedpublic Set<IdentitySchemaNode> getIdentities()
Module
IdentitySchemaNode
instances which contain data from identity
statements defined in the
module.getIdentities
in interface Module
identity
statements and are lexicographically orderedpublic final Set<TypeDefinition<?>> getTypeDefinitions()
DataNodeContainer
getTypeDefinitions
in interface DataNodeContainer
public final Set<DataSchemaNode> getChildNodes()
DataNodeContainer
Note that the nodes returned are NOT data nodes
, but rather DataSchemaNode
s,
hence ChoiceSchemaNode
and CaseSchemaNode
are present instead of their children. This
is consistent with schema tree
.
getChildNodes
in interface DataNodeContainer
public final Set<GroupingDefinition> getGroupings()
DataNodeContainer
getGroupings
in interface DataNodeContainer
public final Optional<DataSchemaNode> findDataChildByName(QName name)
DataNodeContainer
Note that the nodes searched are NOT data nodes
, but rather DataSchemaNode
s,
hence ChoiceSchemaNode
and CaseSchemaNode
are returned instead of their matching children.
findDataChildByName
in interface DataNodeContainer
name
- QName of childpublic Set<UsesNode> getUses()
DataNodeContainer
getUses
in interface DataNodeContainer
public Optional<SemVer> getSemanticVersion()
Module
getSemanticVersion
in interface Module
(urn:opendaylight:yang:extension:semantic-version?revision=2016-02-02)semantic-version
statementprotected static final @NonNull String findPrefix(@NonNull StmtContext<?,?,?> ctx, String type, String name)
protected final void appendPrefixes(StmtContext<?,?,?> ctx, ImmutableMap.Builder<String,ModuleEffectiveStatement> builder)
protected static final @NonNull Object maskList(ImmutableList<?> list)
list
- list to maskNullPointerException
- if list is nullprotected static final <T> @NonNull ImmutableList<T> unmaskList(@NonNull Object masked, @NonNull Class<T> type)
maskList(ImmutableList)
.masked
- list to unmaskNullPointerException
- if any argument is nullClassCastException
- if masked object does not match expected classCopyright © 2020 OpenDaylight. All rights reserved.