Interface SchemaContext
- All Superinterfaces:
ActionNodeContainer
,AddedByUsesAware
,AugmentationTarget
,ContainerLike
,CopyableNode
,DataNodeContainer
,DataSchemaNode
,DocumentedNode
,DocumentedNode.WithStatus
,Immutable
,MustConstraintAware
,NotificationNodeContainer
,SchemaNode
,WhenConditionAware
- All Known Subinterfaces:
AnnotationSchemaNodeAwareSchemaContext
,EffectiveModelContext
- All Known Implementing Classes:
AbstractSchemaContext
,EffectiveSchemaContext
,FilteringSchemaContextProxy
,SimpleSchemaContext
The interface represents static view of compiled yang files,
contains the methods for obtaining all the top level context
data (data from all modules) like YANG notifications, extensions,
operations...
Instances MUST be immutable and thus usage in multi threaded
environment is safe.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.default Optional
<ActionDefinition> findAction
(QName qname) Deprecated.default Optional
<DataSchemaNode> findDataTreeChild
(QName name) Returns adata node
identified by a QName.findModule
(String name) Returns module instance (from the context) with specified name and no revision.findModule
(String name, Optional<Revision> revision) Returns module instance (from the context) with specified name and an optional revision.findModule
(String name, @Nullable Revision revision) Returns module instance (from the context) with specified name and revision.findModule
(@NonNull QNameModule qnameModule) Returns the module matching specifiedQNameModule
, if present.findModule
(@NonNull XMLNamespace namespace) Returns module instance (from the context) with specified namespace and no revision.findModule
(@NonNull XMLNamespace namespace, @NonNull Optional<Revision> revision) Returns module instance (from the context) with specified namespace and revision.findModule
(@NonNull XMLNamespace namespace, @Nullable Revision revision) Returns module instance (from the context) with specified namespace and revision.default @NonNull Collection
<? extends @NonNull Module> findModules
(String name) Returns module instances (from the context) with a concrete name.default @NonNull Collection
<? extends @NonNull Module> findModules
(XMLNamespace namespace) Returns module instance (from the context) with concrete namespace.default Optional
<NotificationDefinition> findNotification
(QName qname) Find a notification based on its QName.default Collection
<? extends ActionDefinition> Deprecated.default Collection
<? extends AugmentationSchemaNode> Deprecated.@NonNull Collection
<? extends @NonNull DataSchemaNode> Returns data schema node instances which represents direct subnodes (like leaf, leaf-list, list, container) in all YANG modules in the context.@NonNull Collection
<? extends IdentitySchemaNode> getDerivedIdentities
(IdentitySchemaNode identity) Get identities derived from a selected identity.Deprecated.@NonNull Collection
<? extends ExtensionDefinition> Returns extension definition instances which are defined as the direct subelements in all YANG modules in the context.@NonNull Collection
<? extends @NonNull Module> Returns modules which are part of the schema context.default Collection
<? extends @NonNull MustDefinition> Deprecated.@NonNull Collection
<? extends @NonNull RpcDefinition> Returns rpc definition instances which are defined as the direct subelements in all YANG modules in the context.default QName
getQName()
Deprecated.Deprecated.default Status
Deprecated.default Collection
<? extends UsesNode> getUses()
Deprecated.default Optional
<? extends YangXPathExpression.QualifiedBound> Deprecated.default boolean
Deprecated.default boolean
Deprecated.Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DataNodeContainer
dataChildByName, findDataChildByName, findDataChildByName, findDataTreeChild, findDataTreeChild, getChildNodes, getDataChildByName, getGroupings, getTypeDefinitions
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DataSchemaNode
isConfiguration
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
getUnknownSchemaNodes
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.NotificationNodeContainer
getNotifications
-
Field Details
-
NAME
QName of NETCONF top-level data node.
-
-
Method Details
-
getDataDefinitions
@NonNull Collection<? extends @NonNull DataSchemaNode> getDataDefinitions()Returns data schema node instances which represents direct subnodes (like leaf, leaf-list, list, container) in all YANG modules in the context.- Returns:
- set of
DataSchemaNode
instances which represents YANG data nodes at the module top level
-
getModules
@NonNull Collection<? extends @NonNull Module> getModules()Returns modules which are part of the schema context. Returned set is required to have its iteration ordered by module revision, so that if modules are filtered byModuleLike.getName()
orQNameModuleAware.getNamespace()
, modules having the same attribute are encountered newest revision first.- Returns:
- set of the modules which belong to the schema context
-
getOperations
@NonNull Collection<? extends @NonNull RpcDefinition> getOperations()Returns rpc definition instances which are defined as the direct subelements in all YANG modules in the context.- Returns:
- set of
RpcDefinition
instances which represents nodes defined viarpc
YANG keyword
-
getExtensions
@NonNull Collection<? extends ExtensionDefinition> getExtensions()Returns extension definition instances which are defined as the direct subelements in all YANG modules in the context.- Returns:
- set of
ExtensionDefinition
instances which represents nodes defined viaextension
YANG keyword
-
findModule
Returns the module matching specifiedQNameModule
, if present.- Parameters:
qnameModule
- requested QNameModule- Returns:
- Module, if present.
- Throws:
NullPointerException
- if qnameModule is null
-
findModule
Returns module instance (from the context) with specified namespace and no revision.- Parameters:
namespace
- module namespace- Returns:
- module instance which has name and revision the same as are the values specified in parameters
namespace
and no revision.
-
findModule
Returns module instance (from the context) with specified namespace and revision.- Parameters:
namespace
- module namespacerevision
- module revision, may be null- Returns:
- module instance which has name and revision the same as are the values specified in parameters
namespace
andrevision
.
-
findModule
default Optional<Module> findModule(@NonNull XMLNamespace namespace, @NonNull Optional<Revision> revision) Returns module instance (from the context) with specified namespace and revision.- Parameters:
namespace
- module namespacerevision
- module revision, may be null- Returns:
- module instance which has name and revision the same as are the values specified in parameters
namespace
andrevision
.
-
findModule
Returns module instance (from the context) with specified name and an optional revision.- Parameters:
name
- string with the module namerevision
- date of the module revision- Returns:
- module instance which has name and revision the same as are the values specified in parameters
name
andrevision
.
-
findModule
Returns module instance (from the context) with specified name and revision.- Parameters:
name
- string with the module namerevision
- date of the module revision, may be null- Returns:
- module instance which has name and revision the same as are the values specified in parameters
name
andrevision
.
-
findModule
Returns module instance (from the context) with specified name and no revision.- Parameters:
name
- string with the module name- Returns:
- module instance which has name and revision the same as are the values specified in
name
and no revision. - Throws:
NullPointerException
- if name is null
-
findModules
Returns module instances (from the context) with a concrete name. Returned Set is required to have its iteration order guarantee that the latest revision is encountered first.- Parameters:
name
- string with the module name- Returns:
- set of module instances with specified name.
-
findModules
Returns module instance (from the context) with concrete namespace. Returned Set is required to have its iteration order guarantee that the latest revision is encountered first.- Parameters:
namespace
- XMLNamespace instance with specified namespace- Returns:
- module instance which has namespace equal to the
namespace
ornull
in other cases
-
getActions
Deprecated.Description copied from interface:ActionNodeContainer
Return the set of actions.- Specified by:
getActions
in interfaceActionNodeContainer
- Returns:
- set of action nodes
-
findAction
Deprecated.Description copied from interface:ActionNodeContainer
Find an action based on its QName. Default implementation searches the set returned byActionNodeContainer.getActions()
.- Specified by:
findAction
in interfaceActionNodeContainer
- Parameters:
qname
- Action's QName- Returns:
- Action definition, if found
-
findNotification
Description copied from interface:NotificationNodeContainer
Find a notification based on its QName. Default implementation searches the set returned byNotificationNodeContainer.getNotifications()
.- Specified by:
findNotification
in interfaceNotificationNodeContainer
- Parameters:
qname
- Notification QName- Returns:
- Notification definition, if found
-
getDescription
Deprecated.Description copied from interface:DocumentedNode
Returns the value of the argument of YANGdescription
keyword.- Specified by:
getDescription
in interfaceDocumentedNode
- Returns:
- string with the description, or empty if description was not provided.
-
getReference
Deprecated.Description copied from interface:DocumentedNode
Returns the value of the argument of YANGreference
keyword.- Specified by:
getReference
in interfaceDocumentedNode
- Returns:
- string with reference to some other document, or empty if reference was not provided.
-
getMustConstraints
Deprecated.Description copied from interface:MustConstraintAware
Specifies the rules which the node which containsmust
YANG substatement has to match.- Specified by:
getMustConstraints
in interfaceMustConstraintAware
- Returns:
- collection of
MustDefinition
(XPath) instances which represents the concrete data constraints
-
getWhenCondition
Deprecated.Description copied from interface:WhenConditionAware
Returns when statement.If when condition is present node defined by the parent data definition statement is only valid when the returned XPath expression conceptually evaluates to "true" for a particular instance, then the node defined by the parent data definition statement is valid; otherwise, it is not.
- Specified by:
getWhenCondition
in interfaceWhenConditionAware
- Returns:
- XPath condition
-
isAugmenting
Deprecated.Description copied from interface:CopyableNode
Returnstrue
if this node was added by augmentation, otherwise returnsfalse
.- Specified by:
isAugmenting
in interfaceCopyableNode
- Returns:
true
if this node was added by augmentation, otherwise returnsfalse
-
isAddedByUses
Deprecated.Description copied from interface:AddedByUsesAware
Returnstrue
if this node was added by uses statement, otherwise returnsfalse
.- Specified by:
isAddedByUses
in interfaceAddedByUsesAware
- Returns:
true
if this node was added by uses statement, otherwise returnsfalse
-
effectiveConfig
Deprecated.Description copied from interface:DataSchemaNode
Return the effective value ofconfig
substatement, if applicable.- Specified by:
effectiveConfig
in interfaceDataSchemaNode
- Returns:
- Effective
config
value, orOptional.empty()
not applicable.
-
getQName
Deprecated.Description copied from interface:SchemaNode
Returns QName of the instance of the typeSchemaNode
.- Specified by:
getQName
in interfaceSchemaNode
- Returns:
- QName with the name of the schema node
-
getStatus
Deprecated.Description copied from interface:DocumentedNode.WithStatus
Returns status of the instance of the typeSchemaNode
.- Specified by:
getStatus
in interfaceDocumentedNode.WithStatus
- Returns:
- status of this node which represents the argument of the YANG
status
substatement
-
getUses
Deprecated.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
-
getAvailableAugmentations
Deprecated.Description copied from interface:AugmentationTarget
Returns augmentations targeting this element.- Specified by:
getAvailableAugmentations
in interfaceAugmentationTarget
- Returns:
- set of augmentations targeting this element.
-
findDataTreeChild
Description copied from interface:DataNodeContainer
Returns adata node
identified by a QName. This method is distinct fromDataNodeContainer.findDataChildByName(QName)
in that it skips overChoiceSchemaNode
s andCaseSchemaNode
s, hence mirroring layout of thedata tree
, notschema tree
.- Specified by:
findDataTreeChild
in interfaceDataNodeContainer
- Parameters:
name
- QName identifier of the data node- Returns:
- Direct or indirect child of this DataNodeContainer which is a
data node
, empty otherwise
-
getDerivedIdentities
@Beta @NonNull Collection<? extends IdentitySchemaNode> getDerivedIdentities(IdentitySchemaNode identity) Get identities derived from a selected identity.- Parameters:
identity
- base identity- Returns:
- collection of identities derived from this identity
- Throws:
NullPointerException
- if identity is nullIllegalArgumentException
- if the specified identity is not present in this context
-