Class EffectiveAugmentationSchema
- java.lang.Object
-
- org.opendaylight.yangtools.yang.model.util.EffectiveAugmentationSchema
-
- All Implemented Interfaces:
ActionNodeContainer
,AugmentationSchemaNode
,DataNodeContainer
,DocumentedNode
,DocumentedNode.WithStatus
,EffectiveStatementEquivalent<AugmentEffectiveStatement>
,NotificationNodeContainer
,WhenConditionAware
public final class EffectiveAugmentationSchema extends Object implements AugmentationSchemaNode
Proxy for AugmentationSchema. Child node schemas are replaced with actual schemas from parent.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
-
Constructor Summary
Constructors Constructor Description EffectiveAugmentationSchema(AugmentationSchemaNode augmentSchema, Collection<? extends DataSchemaNode> realChildSchemas)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AugmentEffectiveStatement
asEffectiveStatement()
ReturnEffectiveStatement
representation of this object.static AugmentationSchemaNode
create(AugmentationSchemaNode schema, DataNodeContainer parent)
Returns an AugmentationSchemaNode as effective in a parent node.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 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 GroupingDefinition>
getGroupings()
Returns set of all groupings defined within this DataNodeContainer.Collection<? extends NotificationDefinition>
getNotifications()
Return the set of notifications in this container, keyed by QName.Optional<AugmentationSchemaNode>
getOriginalDefinition()
Returns Augmentation Definition from which this augmentation is derived if augmentation was added transitively via augmented uses.Optional<String>
getReference()
Returns the value of the argument of YANGreference
keyword.Status
getStatus()
Returns status of the instance of the typeSchemaNode
.Collection<? extends TypeDefinition<?>>
getTypeDefinitions()
Returns set of all newly defined types within this DataNodeContainer.Collection<? extends UnknownSchemaNode>
getUnknownSchemaNodes()
Returns unknown schema nodes which belongs to this instance.Collection<? extends UsesNode>
getUses()
Returns grouping nodes used ny this container.Optional<? extends YangXPathExpression.QualifiedBound>
getWhenCondition()
Returns when statement.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode
getTargetPath
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DataNodeContainer
findDataChildByName, findDataTreeChild, findDataTreeChild, findDataTreeChild, getDataChildByName
-
-
-
-
Constructor Detail
-
EffectiveAugmentationSchema
public EffectiveAugmentationSchema(AugmentationSchemaNode augmentSchema, Collection<? extends DataSchemaNode> realChildSchemas)
-
-
Method Detail
-
create
public static AugmentationSchemaNode create(AugmentationSchemaNode schema, DataNodeContainer parent)
Returns an AugmentationSchemaNode as effective in a parent node.- Parameters:
schema
- Augmentation schemaparent
- Parent schema- Returns:
- Adjusted Augmentation schema
- Throws:
NullPointerException
- if any of the arguments is null
-
getWhenCondition
public 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
-
getDescription
public 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 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.
-
getStatus
public 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
-
getUnknownSchemaNodes
public Collection<? extends UnknownSchemaNode> getUnknownSchemaNodes()
Description copied from interface:DocumentedNode
Returns unknown schema nodes which belongs to this instance. Default implementation returns an empty collection.- Specified by:
getUnknownSchemaNodes
in interfaceDocumentedNode
- Returns:
- collection of unknown schema nodes defined under this node.
-
getTypeDefinitions
public Collection<? extends 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 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
-
getGroupings
public Collection<? extends 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 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
-
getOriginalDefinition
public Optional<AugmentationSchemaNode> getOriginalDefinition()
Description copied from interface:AugmentationSchemaNode
Returns Augmentation Definition from which this augmentation is derived if augmentation was added transitively via augmented uses.- Specified by:
getOriginalDefinition
in interfaceAugmentationSchemaNode
- Returns:
- Augmentation Definition from which this augmentation is derived if augmentation was added transitively via augmented uses.
-
getActions
public 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 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
-
asEffectiveStatement
public AugmentEffectiveStatement asEffectiveStatement()
Description copied from interface:EffectiveStatementEquivalent
ReturnEffectiveStatement
representation of this object.- Specified by:
asEffectiveStatement
in interfaceEffectiveStatementEquivalent<AugmentEffectiveStatement>
- Returns:
EffectiveStatement
representation of this object.
-
-