Class SimpleSchemaContext
java.lang.Object
org.opendaylight.yangtools.yang.model.spi.AbstractSchemaContext
org.opendaylight.yangtools.yang.model.spi.SimpleSchemaContext
- All Implemented Interfaces:
Immutable,AnnotationSchemaNodeAware,AnnotationSchemaNodeAwareSchemaContext,ActionNodeContainer,AddedByUsesAware,AugmentationTarget,ContainerLike,CopyableNode,DataNodeContainer,DataSchemaNode,DocumentedNode,DocumentedNode.WithStatus,MustConstraintAware,NotificationNodeContainer,SchemaContext,SchemaNode,WhenConditionAware
@Beta
public class SimpleSchemaContext
extends AbstractSchemaContext
implements AnnotationSchemaNodeAwareSchemaContext
Simple subclass of
AbstractSchemaContext which performs some amount of indexing to speed up common
SchemaContext operations. This implementation assumes input modules are consistent and does not perform
any extensive analysis to ensure the resulting object complies to SchemaContext interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus -
Field Summary
Fields inherited from class org.opendaylight.yangtools.yang.model.spi.AbstractSchemaContext
NAME_REVISION_COMPARATOR, REVISION_COMPARATORFields inherited from interface org.opendaylight.yangtools.yang.model.api.SchemaContext
NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleSchemaContext(Collection<? extends @NonNull Module> modules) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.common.base.MoreObjects.ToStringHelperaddToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper) final Optional<AnnotationSchemaNode>findAnnotation(AnnotationName qname) static SimpleSchemaContextforModules(Collection<? extends Module> modules) Create a new instance from specified modules.protected Map<QNameModule,Module> Returns the namespace+revision-to-module mapping.protected final com.google.common.collect.SetMultimap<XMLNamespace,Module> Returns the namespace-to-module mapping.Returns the module name-to-module mapping.final StringtoString()Methods inherited from class org.opendaylight.yangtools.yang.model.spi.AbstractSchemaContext
createModuleSet, dataChildByName, findModule, findModule, findModules, findModules, getChildNodes, getDataDefinitions, getDerivedIdentities, getExtensions, getGroupings, getNotifications, getOperations, getTypeDefinitions, getUnknownSchemaNodesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opendaylight.yangtools.yang.model.api.DataNodeContainer
dataChildByName, findDataChildByName, findDataChildByName, findDataTreeChild, findDataTreeChild, getChildNodes, getDataChildByName, getGroupings, getTypeDefinitionsMethods inherited from interface org.opendaylight.yangtools.yang.model.api.DataSchemaNode
isConfigurationMethods inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
getUnknownSchemaNodesMethods inherited from interface org.opendaylight.yangtools.yang.model.api.NotificationNodeContainer
getNotificationsMethods inherited from interface org.opendaylight.yangtools.yang.model.api.SchemaContext
effectiveConfig, findAction, findDataTreeChild, findModule, findModule, findModule, findModule, findModule, findModule, findModule, findModules, findModules, findNotification, getActions, getAvailableAugmentations, getDataDefinitions, getDerivedIdentities, getDescription, getExtensions, getMustConstraints, getOperations, getQName, getReference, getStatus, getUses, getWhenCondition, isAddedByUses, isAugmenting
-
Constructor Details
-
SimpleSchemaContext
-
-
Method Details
-
forModules
Create a new instance from specified modules. Note that no module validation is done and hence the consistency of the resulting SchemaContext is completely in hands of the caller. -
getModules
- Specified by:
getModulesin interfaceSchemaContext
-
findAnnotation
- Specified by:
findAnnotationin interfaceAnnotationSchemaNodeAware
-
getModuleMap
Description copied from class:AbstractSchemaContextReturns the namespace+revision-to-module mapping.- Specified by:
getModuleMapin classAbstractSchemaContext- Returns:
- Map of modules where key is Module's QNameModule.
-
getNamespaceToModules
Description copied from class:AbstractSchemaContextReturns the namespace-to-module mapping.- Specified by:
getNamespaceToModulesin classAbstractSchemaContext- Returns:
- Map of modules where key is namespace
-
getNameToModules
Description copied from class:AbstractSchemaContextReturns the module name-to-module mapping.- Specified by:
getNameToModulesin classAbstractSchemaContext- Returns:
- Map of modules where key is name of module
-
toString
-
addToStringAttributes
protected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
-