Class OperationAsContainer
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- org.opendaylight.yangtools.yang.data.util.OperationAsContainer
-
- All Implemented Interfaces:
ActionNodeContainer
,AddedByUsesAware
,AugmentationTarget
,ContainerLike
,CopyableNode
,DataNodeContainer
,DataSchemaNode
,DocumentedNode
,DocumentedNode.WithStatus
,MustConstraintAware
,NotificationNodeContainer
,OperationDefinition
,SchemaNode
,WhenConditionAware
@Beta public class OperationAsContainer extends ForwardingObject implements ContainerLike, OperationDefinition
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected @NonNull OperationDefinition
delegate()
Optional<ActionDefinition>
findAction(QName qname)
Find an action based on its QName.Optional<DataSchemaNode>
findDataChildByName(QName name)
Returns the child node corresponding to the specified name.Optional<NotificationDefinition>
findNotification(QName qname)
Find a notification based on its QName.Collection<? extends ActionDefinition>
getActions()
Return the set of actions.Collection<? extends AugmentationSchemaNode>
getAvailableAugmentations()
Returns augmentations targeting this element.Collection<? extends DataSchemaNode>
getChildNodes()
Returns set of all child nodes defined within this DataNodeContainer.Optional<String>
getDescription()
Returns the value of the argument of YANGdescription
keyword.Collection<? extends @NonNull GroupingDefinition>
getGroupings()
Returns set of all groupings defined within this DataNodeContainer.InputSchemaNode
getInput()
Returns definition of input parameters for this operation.Collection<? extends @NonNull MustDefinition>
getMustConstraints()
Specifies the rules which the node which containsmust
YANG substatement has to match.Collection<? extends NotificationDefinition>
getNotifications()
Return the set of notifications in this container, keyed by QName.OutputSchemaNode
getOutput()
Returns definition of output parameters for this operation.SchemaPath
getPath()
Deprecated.QName
getQName()
Returns QName of the instance of the typeSchemaNode
.Optional<String>
getReference()
Returns the value of the argument of YANGreference
keyword.Status
getStatus()
Returns status of the instance of the typeSchemaNode
.Collection<? extends @NonNull TypeDefinition<?>>
getTypeDefinitions()
Returns set of all newly defined types within this DataNodeContainer.Collection<? extends UsesNode>
getUses()
Returns grouping nodes used ny this container.Optional<? extends YangXPathExpression.QualifiedBound>
getWhenCondition()
Returns when statement.boolean
isAddedByUses()
Deprecated.boolean
isAugmenting()
Deprecated.boolean
isConfiguration()
Returnstrue
if the data represents configuration data, otherwise returnsfalse
.static @NonNull OperationAsContainer
of(OperationDefinition delegate)
-
Methods inherited from class com.google.common.collect.ForwardingObject
toString
-
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
getUnknownSchemaNodes
-
-
-
-
Method Detail
-
of
public static @NonNull OperationAsContainer of(OperationDefinition delegate)
-
delegate
protected final @NonNull OperationDefinition delegate()
- Specified by:
delegate
in classForwardingObject
-
getDescription
public final Optional<String> getDescription()
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
public final Optional<String> getReference()
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.
-
getTypeDefinitions
public final Collection<? extends @NonNull TypeDefinition<?>> getTypeDefinitions()
Description copied from interface:DataNodeContainer
Returns set of all newly defined types within this DataNodeContainer.- Specified by:
getTypeDefinitions
in interfaceDataNodeContainer
- Specified by:
getTypeDefinitions
in interfaceOperationDefinition
- Returns:
- typedef statements in lexicographical order
-
getGroupings
public final Collection<? extends @NonNull GroupingDefinition> getGroupings()
Description copied from interface:DataNodeContainer
Returns set of all groupings defined within this DataNodeContainer.- Specified by:
getGroupings
in interfaceDataNodeContainer
- Specified by:
getGroupings
in interfaceOperationDefinition
- Returns:
- grouping statements in lexicographical order
-
getStatus
public final Status getStatus()
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
-
getInput
public final InputSchemaNode getInput()
Description copied from interface:OperationDefinition
Returns definition of input parameters for this operation.- Specified by:
getInput
in interfaceOperationDefinition
- Returns:
- Definition of input parameters for this operation. The substatements of input define nodes under the operation's input node.
-
getOutput
public final OutputSchemaNode getOutput()
Description copied from interface:OperationDefinition
Returns definition of output parameters for this operation.- Specified by:
getOutput
in interfaceOperationDefinition
- Returns:
- Definition of output parameters for this operation. The substatements of output define nodes under the operation's output node.
-
getQName
public final QName getQName()
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
-
getPath
@Deprecated public final SchemaPath getPath()
Deprecated.Description copied from interface:SchemaNode
Returns the schema path of the instance of the typeSchemaNode
.- Specified by:
getPath
in interfaceSchemaNode
- Returns:
- schema path of the schema node
-
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 Collection<? extends 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
-
getAvailableAugmentations
public final Collection<? extends AugmentationSchemaNode> getAvailableAugmentations()
Description copied from interface:AugmentationTarget
Returns augmentations targeting this element.- Specified by:
getAvailableAugmentations
in interfaceAugmentationTarget
- Returns:
- set of augmentations targeting this element.
-
getChildNodes
public final Collection<? extends 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
-
isAugmenting
@Deprecated public final boolean 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 public final boolean 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
-
isConfiguration
public final boolean isConfiguration()
Description copied from interface:DataSchemaNode
Returnstrue
if the data represents configuration data, otherwise returnsfalse
.- Specified by:
isConfiguration
in interfaceDataSchemaNode
- Returns:
true
if the data represents configuration data, otherwise returnsfalse
-
getActions
public final Collection<? extends ActionDefinition> getActions()
Description copied from interface:ActionNodeContainer
Return the set of actions.- Specified by:
getActions
in interfaceActionNodeContainer
- Returns:
- set of action nodes
-
findAction
public Optional<ActionDefinition> findAction(QName qname)
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
-
getNotifications
public final Collection<? extends 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
-
findNotification
public Optional<NotificationDefinition> findNotification(QName qname)
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
-
getMustConstraints
public final Collection<? extends @NonNull MustDefinition> getMustConstraints()
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
public final Optional<? extends YangXPathExpression.QualifiedBound> getWhenCondition()
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
-
-