public class RootStatementContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>> extends StatementContextBase<A,D,E>
StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
Modifier and Type | Field and Description |
---|---|
static YangVersion |
DEFAULT_VERSION |
Modifier and Type | Method and Description |
---|---|
<K,N extends StatementNamespace<K,?,?>> |
addContextToNamespace(Class<N> type,
K key,
StmtContext<?,?,?> value)
Associate a context with a key within a namespace.
|
void |
addMutableStmtToSeal(MutableStatement mutableStatement)
Add mutable statement to seal.
|
void |
addRequiredSource(SourceIdentifier dependency)
Add required module.
|
<K,V,T extends K,U extends V,N extends IdentifierNamespace<K,V>> |
addToNs(Class<N> type,
T key,
U value)
Associate a value with a key within a namespace.
|
<K,V,N extends IdentifierNamespace<K,V>> |
getAllFromCurrentStmtCtxNamespace(Class<N> type) |
<K,V,N extends IdentifierNamespace<K,V>> |
getAllFromLocalStorage(Class<N> type) |
<K,V,N extends IdentifierNamespace<K,V>> |
getAllFromNamespace(Class<N> type) |
NamespaceBehaviour.Registry |
getBehaviourRegistry()
Return the registry of a source context.
|
<K,V,N extends IdentifierNamespace<K,V>> |
getFromLocalStorage(Class<N> type,
K key) |
<K,V,N extends IdentifierNamespace<K,V>> |
getFromNamespace(Class<N> type,
NamespaceKeyCriterion<K> criterion) |
<K,V,T extends K,N extends IdentifierNamespace<K,V>> |
getFromNamespace(Class<N> type,
T key)
Return a value associated with specified key within a namespace.
|
StatementContextBase<?,?,?> |
getParentContext()
Return the parent statement context, or null if this is the root statement.
|
NamespaceBehaviour.NamespaceStorageNode |
getParentNamespaceStorage() |
RootStatementContext<?,?,?> |
getRoot()
Returns the model root for this statement.
|
YangVersion |
getRootVersion()
Return version of root statement context.
|
Optional<SchemaPath> |
getSchemaPath()
Return the
SchemaPath of this statement. |
A |
getStatementArgument()
Return the statement argument.
|
NamespaceBehaviour.StorageNodeType |
getStorageNodeType()
Return local namespace behaviour type.
|
boolean |
isConfiguration() |
boolean |
isEnabledSemanticVersioning() |
protected boolean |
isIgnoringConfig() |
protected boolean |
isIgnoringIfFeatures() |
protected boolean |
isParentSupportedByFeatures() |
<K,V,N extends IdentifierNamespace<K,V>> |
putToLocalStorage(Class<N> type,
K key,
V value)
Populate specified namespace with a key/value pair, overwriting previous contents.
|
<K,V,N extends IdentifierNamespace<K,V>> |
putToLocalStorageIfAbsent(Class<N> type,
K key,
V value)
Populate specified namespace with a key/value pair unless the key is already associated with a value.
|
void |
setRootIdentifier(SourceIdentifier identifier)
Set identifier of current root context.
|
void |
setRootVersion(YangVersion version)
Set version of root statement context.
|
addAsEffectOfStatement, addAsEffectOfStatement, addContext, addEffectiveSubstatement, addEffectiveSubstatements, addToStringAttributes, appendImplicitStatement, buildDeclared, buildEffective, checkLocalNamespaceAllowed, childCopyOf, createSubstatement, declaredSubstatements, definition, effectiveSubstatements, getCompletedPhase, getCopyHistory, getDefinition, getEffectOfStatement, getOriginalCtx, getPublicDefinition, getSourceReference, getStatementSource, getStatementSourceReference, isFullyDefined, isSupportedByFeatures, isSupportedToBuildEffective, mutableDeclaredSubstatements, mutableEffectiveSubstatements, newInferenceAction, onNamespaceElementAdded, rawStatementArgument, removeStatementFromEffectiveSubstatements, removeStatementFromEffectiveSubstatements, removeStatementsFromEffectiveSubstatements, setCompletedPhase, setIsSupportedToBuildEffective, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addToNs, childCopyOf, coerceParentContext
allSubstatements, allSubstatementsStream, coerceRawStatementArgument, coerceStatementArgument, getAllFromCurrentStmtCtxNamespace, getAllFromNamespace, getFromNamespace
public static final YangVersion DEFAULT_VERSION
public StatementContextBase<?,?,?> getParentContext()
StmtContext
getParentContext
in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
getParentContext
in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
getParentContext
in class StatementContextBase<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
public NamespaceBehaviour.NamespaceStorageNode getParentNamespaceStorage()
getParentNamespaceStorage
in interface NamespaceBehaviour.NamespaceStorageNode
public NamespaceBehaviour.Registry getBehaviourRegistry()
public NamespaceBehaviour.StorageNodeType getStorageNodeType()
NamespaceBehaviour.NamespaceStorageNode
NamespaceBehaviour
public RootStatementContext<?,?,?> getRoot()
StatementContextBase
getRoot
in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
getRoot
in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
getRoot
in class StatementContextBase<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
public A getStatementArgument()
StmtContext
public Optional<SchemaPath> getSchemaPath()
StmtContext
SchemaPath
of this statement. Not all statements have a SchemaPath, in which case
Optional.empty()
is returned.public boolean isConfiguration()
public boolean isEnabledSemanticVersioning()
public <K,V,N extends IdentifierNamespace<K,V>> V putToLocalStorage(Class<N> type, K key, V value)
NamespaceBehaviour.NamespaceStorageNode
Map.put(Object, Object)
.putToLocalStorage
in interface NamespaceBehaviour.NamespaceStorageNode
type
- Namespace identifierkey
- Keyvalue
- Valuepublic <K,V,N extends IdentifierNamespace<K,V>> V getFromLocalStorage(Class<N> type, K key)
getFromLocalStorage
in interface NamespaceBehaviour.NamespaceStorageNode
public <K,V,N extends IdentifierNamespace<K,V>> Map<K,V> getAllFromLocalStorage(Class<N> type)
getAllFromLocalStorage
in interface NamespaceBehaviour.NamespaceStorageNode
public YangVersion getRootVersion()
StmtContext
public void setRootVersion(YangVersion version)
StmtContext.Mutable
version
- of root statement contextpublic void addMutableStmtToSeal(MutableStatement mutableStatement)
StmtContext.Mutable
mutableStatement
- mutable statement which should be sealedpublic void addRequiredSource(SourceIdentifier dependency)
StmtContext.Mutable
dependency
- SourceIdentifier of module required by current root
contextpublic void setRootIdentifier(SourceIdentifier identifier)
StmtContext.Mutable
identifier
- of current root context, must not be nullprotected boolean isIgnoringIfFeatures()
isIgnoringIfFeatures
in class StatementContextBase<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
protected boolean isIgnoringConfig()
isIgnoringConfig
in class StatementContextBase<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
protected boolean isParentSupportedByFeatures()
isParentSupportedByFeatures
in class StatementContextBase<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
public final <K,V,T extends K,N extends IdentifierNamespace<K,V>> V getFromNamespace(Class<N> type, T key)
K
- namespace key typeV
- namespace value typeN
- namespace typeT
- key typetype
- Namespace typekey
- KeyNamespaceNotAvailableException
- when the namespace is not available.public final <K,V,N extends IdentifierNamespace<K,V>> Optional<Map.Entry<K,V>> getFromNamespace(Class<N> type, NamespaceKeyCriterion<K> criterion)
public final <K,V,N extends IdentifierNamespace<K,V>> Map<K,V> getAllFromNamespace(Class<N> type)
public final <K,V,N extends IdentifierNamespace<K,V>> Map<K,V> getAllFromCurrentStmtCtxNamespace(Class<N> type)
public final <K,V,T extends K,U extends V,N extends IdentifierNamespace<K,V>> void addToNs(Class<N> type, T key, U value)
K
- namespace key typeV
- namespace value typeN
- namespace typeT
- key typeU
- value typetype
- Namespace typekey
- Keyvalue
- valueNamespaceNotAvailableException
- when the namespace is not available.public final <K,N extends StatementNamespace<K,?,?>> void addContextToNamespace(Class<N> type, K key, StmtContext<?,?,?> value)
K
- namespace key typeN
- namespace typetype
- Namespace typekey
- Keyvalue
- Context valueNamespaceNotAvailableException
- when the namespace is not available.public <K,V,N extends IdentifierNamespace<K,V>> V putToLocalStorageIfAbsent(Class<N> type, K key, V value)
NamespaceBehaviour.NamespaceStorageNode
Map.putIfAbsent(Object, Object)
.putToLocalStorageIfAbsent
in interface NamespaceBehaviour.NamespaceStorageNode
type
- Namespace identifierkey
- Keyvalue
- ValueCopyright © 2019 OpenDaylight. All rights reserved.