Class AbstractSchemaContext
java.lang.Object
org.opendaylight.yangtools.yang.model.spi.AbstractSchemaContext
- All Implemented Interfaces:
Immutable,ActionNodeContainer,AddedByUsesAware,AugmentationTarget,ContainerLike,CopyableNode,DataNodeContainer,DataSchemaNode,DocumentedNode,DocumentedNode.WithStatus,MustConstraintAware,NotificationNodeContainer,SchemaContext,SchemaNode,WhenConditionAware
- Direct Known Subclasses:
SimpleSchemaContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Module>AModulecomparator based onModuleLike.getName()andQNameModuleAware.getRevision(), ordering modules lexicographically by their name and then in order of descending revision.static final Comparator<Module>AModulecomparator based onQNameModuleAware.getRevision(), placing latest revision first.Fields inherited from interface org.opendaylight.yangtools.yang.model.api.SchemaContext
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a TreeSet for containing Modules with the same name, such that the set is ordered byREVISION_COMPARATOR.dataChildByName(QName name) findModule(String name, Optional<Revision> revision) findModule(QNameModule qnameModule) Collection<? extends Module>findModules(String name) Collection<? extends Module>findModules(XMLNamespace namespace) Collection<? extends DataSchemaNode>Collection<? extends DataSchemaNode>Collection<? extends IdentitySchemaNode>getDerivedIdentities(IdentitySchemaNode identity) Collection<? extends ExtensionDefinition>Collection<? extends GroupingDefinition>protected abstract Map<QNameModule,Module> Returns the namespace+revision-to-module mapping.protected abstract com.google.common.collect.SetMultimap<XMLNamespace,Module> Returns the namespace-to-module mapping.Returns the module name-to-module mapping.Collection<? extends NotificationDefinition>Collection<? extends RpcDefinition>Collection<? extends TypeDefinition<?>>Collection<? extends UnknownSchemaNode>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opendaylight.yangtools.yang.model.api.DataNodeContainer
findDataChildByName, findDataChildByName, findDataTreeChild, findDataTreeChild, getDataChildByNameMethods inherited from interface org.opendaylight.yangtools.yang.model.api.DataSchemaNode
isConfigurationMethods inherited from interface org.opendaylight.yangtools.yang.model.api.SchemaContext
effectiveConfig, findAction, findDataTreeChild, findModule, findModule, findModule, findModule, findModule, findNotification, getActions, getAvailableAugmentations, getDescription, getModules, getMustConstraints, getQName, getReference, getStatus, getUses, getWhenCondition, isAddedByUses, isAugmenting
-
Field Details
-
REVISION_COMPARATOR
AModulecomparator based onQNameModuleAware.getRevision(), placing latest revision first. Note this comparator does not take into account module name and so two modules with different names but same revisions compare as equal. -
NAME_REVISION_COMPARATOR
AModulecomparator based onModuleLike.getName()andQNameModuleAware.getRevision(), ordering modules lexicographically by their name and then in order of descending revision. This comparator assumes that the combination of these two attributes is sufficient to be consistent with hashCode/equals.
-
-
Constructor Details
-
AbstractSchemaContext
public AbstractSchemaContext()
-
-
Method Details
-
createModuleSet
Create a TreeSet for containing Modules with the same name, such that the set is ordered byREVISION_COMPARATOR.- Returns:
- A fresh TreeSet instance.
-
getNamespaceToModules
protected abstract com.google.common.collect.SetMultimap<XMLNamespace,Module> getNamespaceToModules()Returns the namespace-to-module mapping.- Returns:
- Map of modules where key is namespace
-
getNameToModules
Returns the module name-to-module mapping.- Returns:
- Map of modules where key is name of module
-
getModuleMap
Returns the namespace+revision-to-module mapping.- Returns:
- Map of modules where key is Module's QNameModule.
-
getDataDefinitions
- Specified by:
getDataDefinitionsin interfaceSchemaContext
-
getNotifications
- Specified by:
getNotificationsin interfaceNotificationNodeContainer
-
getOperations
- Specified by:
getOperationsin interfaceSchemaContext
-
getExtensions
- Specified by:
getExtensionsin interfaceSchemaContext
-
findModule
- Specified by:
findModulein interfaceSchemaContext
-
findModule
- Specified by:
findModulein interfaceSchemaContext
-
findModules
- Specified by:
findModulesin interfaceSchemaContext
-
findModules
- Specified by:
findModulesin interfaceSchemaContext
-
getUnknownSchemaNodes
- Specified by:
getUnknownSchemaNodesin interfaceDocumentedNode
-
getTypeDefinitions
- Specified by:
getTypeDefinitionsin interfaceDataNodeContainer
-
getChildNodes
- Specified by:
getChildNodesin interfaceDataNodeContainer
-
getGroupings
- Specified by:
getGroupingsin interfaceDataNodeContainer
-
dataChildByName
- Specified by:
dataChildByNamein interfaceDataNodeContainer
-
getDerivedIdentities
- Specified by:
getDerivedIdentitiesin interfaceSchemaContext
-