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() |
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) |
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() |
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() |
protected abstract com.google.common.collect.SetMultimap<String,Module> |
getNameToModules() |
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() |
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindModuleByNamespaceAndRevision, getModulesgetActionsprotected 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()
SchemaContextgetDataDefinitions in interface SchemaContextDataSchemaNode instances which represents
YANG data nodes at the module top levelpublic Set<NotificationDefinition> getNotifications()
NotificationNodeContainergetNotifications in interface NotificationNodeContainerpublic Set<RpcDefinition> getOperations()
SchemaContextgetOperations in interface SchemaContextRpcDefinition instances which represents
nodes defined via rpc YANG keywordpublic Set<ExtensionDefinition> getExtensions()
SchemaContextgetExtensions in interface SchemaContextExtensionDefinition instances which
represents nodes defined via extension YANG keywordpublic Module findModuleByName(String name, Date revision)
SchemaContextfindModuleByName in interface SchemaContextname - 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)
SchemaContextfindModuleByNamespace in interface SchemaContextnamespace - URI instance with specified namespacenamespace or null in other casespublic boolean isAugmenting()
DataSchemaNodetrue if the data node was added by augmentation,
otherwise returns falseisAugmenting in interface DataSchemaNodetrue if the data node was added by augmentation,
otherwise returns falsepublic boolean isAddedByUses()
DataSchemaNodetrue if the data node was added by uses statement,
otherwise returns falseisAddedByUses in interface DataSchemaNodetrue if the data node was added by uses statement,
otherwise returns falsepublic boolean isConfiguration()
DataSchemaNodetrue if the data represents configuration data,
otherwise returns falseisConfiguration in interface DataSchemaNodetrue if the data represents configuration data,
otherwise returns falsepublic ConstraintDefinition getConstraints()
DataSchemaNodegetConstraints in interface DataSchemaNode@Nonnull public QName getQName()
SchemaNodeSchemaNode.getQName in interface SchemaNode@Nonnull public SchemaPath getPath()
SchemaNodeSchemaNode SchemaNode.getPath in interface SchemaNodepublic String getDescription()
DocumentedNodegetDescription in interface DocumentedNodepublic String getReference()
DocumentedNodegetReference in interface DocumentedNode@Nonnull public Status getStatus()
DocumentedNode.WithStatusSchemaNodegetStatus in interface DocumentedNode.WithStatusstatus substatement@Nonnull public List<UnknownSchemaNode> getUnknownSchemaNodes()
DocumentedNodegetUnknownSchemaNodes in interface DocumentedNodepublic Set<TypeDefinition<?>> getTypeDefinitions()
DataNodeContainergetTypeDefinitions in interface DataNodeContainerpublic Set<DataSchemaNode> getChildNodes()
DataNodeContainergetChildNodes in interface DataNodeContainerpublic Set<GroupingDefinition> getGroupings()
DataNodeContainergetGroupings in interface DataNodeContainerpublic DataSchemaNode getDataChildByName(QName name)
getDataChildByName in interface DataNodeContainername - QName of seeked childpublic Set<UsesNode> getUses()
getUses in interface DataNodeContainerpublic boolean isPresenceContainer()
isPresenceContainer in interface ContainerSchemaNodepublic Set<AugmentationSchema> getAvailableAugmentations()
getAvailableAugmentations in interface AugmentationTargetpublic Set<ModuleIdentifier> getAllModuleIdentifiers()
SchemaContextgetAllModuleIdentifiers in interface SchemaContextpublic com.google.common.base.Optional<String> getModuleSource(ModuleIdentifier moduleIdentifier)
SchemaContextModuleIdentifier.getModuleSource in interface SchemaContextmoduleIdentifier - must provide a non-null
ModuleIdentifier.getName(),
other methods might return null.Copyright © 2018 OpenDaylight. All rights reserved.