public final class EffectiveSchemaContext extends Object
DocumentedNode.WithStatus| Modifier and Type | Field and Description |
|---|---|
protected static com.google.common.base.Supplier<NavigableSet<Module>> |
MODULE_SET_SUPPLIER |
protected static Comparator<Module> |
REVISION_COMPARATOR |
NAME| Constructor and Description |
|---|
EffectiveSchemaContext(List<DeclaredStatement<?>> rootDeclaredStatements,
List<EffectiveStatement<?,?>> rootEffectiveStatements) |
EffectiveSchemaContext(Set<Module> modules) |
| 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.
|
Module |
findModuleByNamespaceAndRevision(URI namespace,
Date revision)
Returns module instance based on given namespace and revision.
|
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 Map<ModuleIdentifier,String> |
getIdentifiersToSources() |
Set<Module> |
getModules()
Returns modules which are part of the schema context.
|
com.google.common.base.Optional<String> |
getModuleSource(ModuleIdentifier moduleIdentifier)
Get yang source code represented as string for matching
ModuleIdentifier. |
protected com.google.common.collect.SetMultimap<URI,Module> |
getNamespaceToModules() |
protected 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.
|
List<DeclaredStatement<?>> |
getRootDeclaredStatements() |
List<EffectiveStatement<?,?>> |
getRootEffectiveStatements() |
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() |
static SchemaContext |
resolveSchemaContext(Set<Module> modules) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActionsprotected static final Comparator<Module> REVISION_COMPARATOR
protected static final com.google.common.base.Supplier<NavigableSet<Module>> MODULE_SET_SUPPLIER
public EffectiveSchemaContext(List<DeclaredStatement<?>> rootDeclaredStatements, List<EffectiveStatement<?,?>> rootEffectiveStatements)
public static SchemaContext resolveSchemaContext(Set<Module> modules)
public List<DeclaredStatement<?>> getRootDeclaredStatements()
public List<EffectiveStatement<?,?>> getRootEffectiveStatements()
protected Map<ModuleIdentifier,String> getIdentifiersToSources()
public Set<Module> getModules()
SchemaContextprotected com.google.common.collect.SetMultimap<URI,Module> getNamespaceToModules()
protected com.google.common.collect.SetMultimap<String,Module> getNameToModules()
public Set<ModuleIdentifier> getAllModuleIdentifiers()
SchemaContextpublic 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 Module findModuleByNamespaceAndRevision(URI namespace, Date revision)
SchemaContextfindModuleByNamespaceAndRevision in interface SchemaContextpublic 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 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.