public abstract class AbstractSchemaContext extends Object implements SchemaContext
DocumentedNode.WithStatus
Modifier and Type | Field and Description |
---|---|
protected static com.google.common.base.Supplier<TreeSet<Module>> |
MODULE_SET_SUPPLIER |
protected static Comparator<Module> |
REVISION_COMPARATOR |
NAME
Constructor and Description |
---|
AbstractSchemaContext() |
Modifier and Type | Method and Description |
---|---|
Module |
findModuleByName(String name,
Date revision)
Returns module instance (from the context) with concrete name and
revision date.
|
Set<Module> |
findModuleByNamespace(URI namespace)
Returns module instance (from the context) with concrete namespace.
|
Set<ModuleIdentifier> |
getAllModuleIdentifiers()
Get all module and submodule identifiers.
|
Set<AugmentationSchema> |
getAvailableAugmentations()
Returns augmentations targeting this element.
|
Set<DataSchemaNode> |
getChildNodes()
Returns set of all child nodes defined within this DataNodeContainer.
|
ConstraintDefinition |
getConstraints()
Returns the constraints associated with Data Schema Node.
|
DataSchemaNode |
getDataChildByName(QName name)
Returns the child node corresponding to the specified name.
|
Set<DataSchemaNode> |
getDataDefinitions()
Returns data schema node instances which represents direct subnodes (like
leaf, leaf-list, list, container) in all YANG modules in the context.
|
String |
getDescription()
All implementations should override this method.
|
Set<ExtensionDefinition> |
getExtensions()
Returns extencion definition instances which are defined as the direct
subelements in all YANG modules in the context.
|
Set<GroupingDefinition> |
getGroupings()
Returns set of all groupings defined within this DataNodeContainer.
|
protected abstract Map<ModuleIdentifier,String> |
getIdentifiersToSources()
Returns the ModuleIdentifier-to-YANG source mapping.
|
com.google.common.base.Optional<String> |
getModuleSource(ModuleIdentifier moduleIdentifier)
Get yang source code represented as string for matching
ModuleIdentifier . |
protected abstract com.google.common.collect.SetMultimap<URI,Module> |
getNamespaceToModules()
Returns the namespace-to-module mapping.
|
protected abstract com.google.common.collect.SetMultimap<String,Module> |
getNameToModules()
Returns the module name-to-module mapping.
|
Set<NotificationDefinition> |
getNotifications()
All implementations should override this method.
|
Set<RpcDefinition> |
getOperations()
Returns rpc definition instances which are defined as the direct
subelements in all YANG modules in the context.
|
SchemaPath |
getPath()
Returns the schema path of the instance of the type
SchemaNode SchemaNode . |
QName |
getQName()
Returns QName of the instance of the type
SchemaNode . |
String |
getReference()
All implementations should override this method.
|
Status |
getStatus()
Returns status of the instance of the type
SchemaNode . |
Set<TypeDefinition<?>> |
getTypeDefinitions()
Returns set of all newly defined types within this DataNodeContainer.
|
List<UnknownSchemaNode> |
getUnknownSchemaNodes()
Returns unknown schema nodes which belongs to this instance.
|
Set<UsesNode> |
getUses()
Returns grouping nodes used ny this container.
|
boolean |
isAddedByUses()
Returns
true if the data node was added by uses statement,
otherwise returns false . |
boolean |
isAugmenting()
Returns
true if the data node was added by augmentation,
otherwise returns false . |
boolean |
isConfiguration()
Returns
true if the data represents configuration data,
otherwise returns false . |
boolean |
isPresenceContainer()
Returns true if this container is marked as presence.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findModuleByNamespaceAndRevision, getModules
getActions
protected static final Comparator<Module> REVISION_COMPARATOR
protected abstract Map<ModuleIdentifier,String> getIdentifiersToSources()
protected abstract com.google.common.collect.SetMultimap<URI,Module> getNamespaceToModules()
protected abstract com.google.common.collect.SetMultimap<String,Module> getNameToModules()
public Set<DataSchemaNode> getDataDefinitions()
SchemaContext
getDataDefinitions
in interface SchemaContext
DataSchemaNode
instances which represents
YANG data nodes at the module top levelpublic Set<NotificationDefinition> getNotifications()
NotificationNodeContainer
The default definition is also used by implementations of ContainerSchemaNode which do not support notification statements such as InputEffectiveStatementImpl and OutputEffectiveStatementImpl.
getNotifications
in interface NotificationNodeContainer
public Set<RpcDefinition> getOperations()
SchemaContext
getOperations
in interface SchemaContext
RpcDefinition
instances which represents
nodes defined via rpc
YANG keywordpublic Set<ExtensionDefinition> getExtensions()
SchemaContext
getExtensions
in interface SchemaContext
ExtensionDefinition
instances which
represents nodes defined via extension
YANG keywordpublic Module findModuleByName(String name, Date revision)
SchemaContext
findModuleByName
in interface SchemaContext
name
- string with the module namerevision
- date of the module revisionname
and revision
. In other cases the null
value is returned.public Set<Module> findModuleByNamespace(URI namespace)
SchemaContext
findModuleByNamespace
in interface SchemaContext
namespace
- URI instance with specified namespacenamespace
or null
in other casespublic boolean isAugmenting()
DataSchemaNode
true
if the data node was added by augmentation,
otherwise returns false
.isAugmenting
in interface DataSchemaNode
true
if the data node was added by augmentation,
otherwise returns false
public boolean isAddedByUses()
DataSchemaNode
true
if the data node was added by uses statement,
otherwise returns false
.isAddedByUses
in interface DataSchemaNode
true
if the data node was added by uses statement,
otherwise returns false
public boolean isConfiguration()
DataSchemaNode
true
if the data represents configuration data,
otherwise returns false
.isConfiguration
in interface DataSchemaNode
true
if the data represents configuration data,
otherwise returns false
public ConstraintDefinition getConstraints()
DataSchemaNode
getConstraints
in interface DataSchemaNode
@Nonnull public QName getQName()
SchemaNode
SchemaNode
.getQName
in interface SchemaNode
@Nonnull public SchemaPath getPath()
SchemaNode
SchemaNode
SchemaNode
.getPath
in interface SchemaNode
public String getDescription()
DocumentedNode
getDescription
in interface DocumentedNode
public String getReference()
DocumentedNode
getReference
in interface DocumentedNode
@Nonnull public Status getStatus()
DocumentedNode.WithStatus
SchemaNode
.getStatus
in interface DocumentedNode.WithStatus
status
substatement@Nonnull public List<UnknownSchemaNode> getUnknownSchemaNodes()
DocumentedNode
getUnknownSchemaNodes
in interface DocumentedNode
public Set<TypeDefinition<?>> getTypeDefinitions()
DataNodeContainer
getTypeDefinitions
in interface DataNodeContainer
public Set<DataSchemaNode> getChildNodes()
DataNodeContainer
getChildNodes
in interface DataNodeContainer
public Set<GroupingDefinition> getGroupings()
DataNodeContainer
getGroupings
in interface DataNodeContainer
public DataSchemaNode getDataChildByName(QName name)
DataNodeContainer
getDataChildByName
in interface DataNodeContainer
name
- QName of childpublic Set<UsesNode> getUses()
DataNodeContainer
getUses
in interface DataNodeContainer
public boolean isPresenceContainer()
ContainerSchemaNode
isPresenceContainer
in interface ContainerSchemaNode
public Set<AugmentationSchema> getAvailableAugmentations()
AugmentationTarget
getAvailableAugmentations
in interface AugmentationTarget
public Set<ModuleIdentifier> getAllModuleIdentifiers()
SchemaContext
getAllModuleIdentifiers
in interface SchemaContext
public com.google.common.base.Optional<String> getModuleSource(ModuleIdentifier moduleIdentifier)
SchemaContext
ModuleIdentifier
.getModuleSource
in interface SchemaContext
moduleIdentifier
- must provide a non-null
ModuleIdentifier.getName()
, other methods might return
null.Copyright © 2018 OpenDaylight. All rights reserved.