Class ParserNamespaces
java.lang.Object
org.opendaylight.yangtools.yang.parser.spi.ParserNamespaces
Baseline
ParserNamespace
s mostly derived from YANG specification.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @NonNull ParserNamespace<String,
UnresolvedQName.Unqualified> Source-specific mapping of prefixes to namespaces.static final @NonNull ParserNamespace<String,
StmtContext<?, ?, ?>> Source-specific mapping of belongsTo prefixes to module identifiers.static final @NonNull ParserNamespace<QName,
StmtContext<QName, ExtensionStatement, ExtensionEffectiveStatement>> Extension namespace.static final @NonNull ParserNamespace<QName,
StmtContext<QName, FeatureStatement, FeatureEffectiveStatement>> Feature namespace.static final @NonNull ParserNamespace<QName,
StmtContext<QName, GroupingStatement, GroupingEffectiveStatement>> Grouping namespace.static final @NonNull ParserNamespace<QName,
StmtContext<QName, IdentityStatement, IdentityEffectiveStatement>> Identity namespace.static final @NonNull ParserNamespace<String,
XMLNamespace> Pre-linkage source-specific mapping of prefixes to module namespaces.static final @NonNull ParserNamespace<String,
StmtContext<?, ?, ?>> Source-specific mapping of prefix strings to module context.static final @NonNull ParserNamespace<SourceIdentifier,
StmtContext<?, ?, ?>> static final @NonNull ParserNamespace<SourceIdentifier,
StmtContext<?, ?, ?>> static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,
StmtContext<?, ?, ?>> Source-specific mapping of prefixes to namespaces.static final @NonNull ParserNamespace<SourceIdentifier,
StmtContext<UnresolvedQName.Unqualified, ModuleStatement, ModuleEffectiveStatement>> Module namespace.static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,
StmtContext<UnresolvedQName.Unqualified, ModuleStatement, ModuleEffectiveStatement>> Namespace similar toMODULE
for storing modules into Yang model storage but keyed by plain name.static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,
XMLNamespace> Pre-linkage global mapping of module names to namespaces.static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,
QNameModule> Source-specific mapping of prefixes to namespaces.static final @NonNull ParserNamespace<QNameModule,
UnresolvedQName.Unqualified> Source-specific mapping of prefixes to namespaces.static final @NonNull ParserNamespace<StmtContext<?,
?, ?>, QNameModule> Global mapping of modules to QNameModules.static final @NonNull ParserNamespace<StmtContext<?,
?, ?>, SourceIdentifier> Global mapping of modules to source identifier.static final @NonNull ParserNamespace<Empty,
SetMultimap<QNameModule, QNameModule>> Namespace used for storing information about modules that support deviation resolution.static final @NonNull ParserNamespace<QNameModule,
StmtContext<UnresolvedQName.Unqualified, ModuleStatement, ModuleEffectiveStatement>> A derived namespace allowing lookup of modules based on theirQNameModule
.static final @NonNull ParserNamespace<String,
QNameModule> Source-specific mapping of prefixes to namespaces.static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,
StmtContext<UnresolvedQName.Unqualified, ModuleStatement, ModuleEffectiveStatement>> Intermediate-stage namespace equivalent toMODULE
except it is keyed by module names.static final @NonNull ParserNamespace<SourceIdentifier,
StmtContext<UnresolvedQName.Unqualified, SubmoduleStatement, SubmoduleEffectiveStatement>> Submodule equivalent ofMODULE
.static final @NonNull ParserNamespace<Empty,
FeatureSet> static final @NonNull ParserNamespace<QName,
StmtContext<QName, TypedefStatement, TypedefEffectiveStatement>> Derived types namespace. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<StmtContext<?,
?, ?>> findSchemaTreeStatement
(StmtContext<?, ?, ?> root, SchemaNodeIdentifier identifier) Find statement context identified by interpreting specifiedSchemaNodeIdentifier
starting at specifiedStmtContext
.static <D extends DeclaredStatement<QName>,
E extends SchemaTreeEffectiveStatement<D>>
@NonNull ParserNamespace<QName,StmtContext<QName, D, E>> Statement local namespace, which holds direct schema node descendants.
-
Field Details
-
EXTENSION
public static final @NonNull ParserNamespace<QName,StmtContext<QName, EXTENSIONExtensionStatement, ExtensionEffectiveStatement>> Extension namespace. All extension names defined in a module and its submodules share the same extension identifier namespace, where each extension is identified by a QName formed from the defining module's QNameModule and the identifier specified in extension statement's argument. -
FEATURE
public static final @NonNull ParserNamespace<QName,StmtContext<QName, FEATUREFeatureStatement, FeatureEffectiveStatement>> Feature namespace. All feature names defined in a module and its submodules share the same feature identifier namespace. Each feature is identified by a QName formed from the defining module's QNameModule and the feature name. -
GROUPING
public static final @NonNull ParserNamespace<QName,StmtContext<QName, GROUPINGGroupingStatement, GroupingEffectiveStatement>> Grouping namespace. * All grouping names defined within a parent node or at the top level of the module or its submodules share the same grouping identifier namespace. This namespace is scoped to all descendant nodes of the parent node or module.This means that any descendant node may use that grouping, and it MUST NOT define a grouping with the same name.
-
IDENTITY
public static final @NonNull ParserNamespace<QName,StmtContext<QName, IDENTITYIdentityStatement, IdentityEffectiveStatement>> Identity namespace. All identity names defined in a module and its submodules share the same identity identifier namespace. -
MODULE
public static final @NonNull ParserNamespace<SourceIdentifier,StmtContext<UnresolvedQName.Unqualified, MODULEModuleStatement, ModuleEffectiveStatement>> Module namespace. All modules known to the reactor are populated to this namespace. Each module is identified by aSourceIdentifier
. -
SUBMODULE
public static final @NonNull ParserNamespace<SourceIdentifier,StmtContext<UnresolvedQName.Unqualified, SUBMODULESubmoduleStatement, SubmoduleEffectiveStatement>> Submodule equivalent ofMODULE
. -
TYPE
public static final @NonNull ParserNamespace<QName,StmtContext<QName, TYPETypedefStatement, TypedefEffectiveStatement>> Derived types namespace. All derived type names defined within a parent node or at the top level of the module (or its submodules) share the same type identifier namespace.This namespace is scoped to all descendant nodes of the parent node or module. This means that any descendant node may use that typedef, and it MUST NOT define a typedef with the same name.
This namespace includes all type definitions implied by the language in which the current statement resides (e.g. RFC6020/RFC7950 for YANG 1.0/1.1).
-
NAMESPACE_TO_MODULE
public static final @NonNull ParserNamespace<QNameModule,StmtContext<UnresolvedQName.Unqualified, NAMESPACE_TO_MODULEModuleStatement, ModuleEffectiveStatement>> A derived namespace allowing lookup of modules based on theirQNameModule
. -
PRELINKAGE_MODULE
public static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,StmtContext<UnresolvedQName.Unqualified, PRELINKAGE_MODULEModuleStatement, ModuleEffectiveStatement>> Intermediate-stage namespace equivalent toMODULE
except it is keyed by module names. This namespace is used to resolve inter-module references before actual linkage occurs. -
BELONGSTO_PREFIX_TO_MODULECTX
public static final @NonNull ParserNamespace<String,StmtContext<?, BELONGSTO_PREFIX_TO_MODULECTX?, ?>> Source-specific mapping of belongsTo prefixes to module identifiers. This mapping allows source-specific context to correctly populate prefixes map for actual parsing phase and eventually, resolve QName for any valid declared statement. -
BELONGSTO_PREFIX_TO_MODULE_NAME
public static final @NonNull ParserNamespace<String,UnresolvedQName.Unqualified> BELONGSTO_PREFIX_TO_MODULE_NAMESource-specific mapping of prefixes to namespaces. -
MODULE_FOR_BELONGSTO
public static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,StmtContext<UnresolvedQName.Unqualified, MODULE_FOR_BELONGSTOModuleStatement, ModuleEffectiveStatement>> Namespace similar toMODULE
for storing modules into Yang model storage but keyed by plain name. -
IMP_PREFIX_TO_NAMESPACE
Pre-linkage source-specific mapping of prefixes to module namespaces. -
IMPORT_PREFIX_TO_MODULECTX
Source-specific mapping of prefix strings to module context. -
IMPORTED_MODULE
-
INCLUDED_MODULE
-
INCLUDED_SUBMODULE_NAME_TO_MODULECTX
public static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,StmtContext<?, INCLUDED_SUBMODULE_NAME_TO_MODULECTX?, ?>> Source-specific mapping of prefixes to namespaces. -
MODULE_NAME_TO_QNAME
public static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,QNameModule> MODULE_NAME_TO_QNAMESource-specific mapping of prefixes to namespaces. -
MODULECTX_TO_QNAME
Global mapping of modules to QNameModules. -
SUPPORTED_FEATURES
-
PREFIX_TO_MODULE
Source-specific mapping of prefixes to namespaces. This namespace is populated by all statements which have impact on the XML namespace, for exampleimport
,belongs-to
and really anywhere aprefix
statement is present.- See Also:
-
MODULES_DEVIATED_BY
public static final @NonNull ParserNamespace<Empty,SetMultimap<QNameModule, MODULES_DEVIATED_BYQNameModule>> Namespace used for storing information about modules that support deviation resolution. Map key (QNameModule) denotes a module which can be deviated by the modules specified in the Map value. -
MODULE_NAMESPACE_TO_NAME
public static final @NonNull ParserNamespace<QNameModule,UnresolvedQName.Unqualified> MODULE_NAMESPACE_TO_NAMESource-specific mapping of prefixes to namespaces. -
MODULE_NAME_TO_NAMESPACE
public static final @NonNull ParserNamespace<UnresolvedQName.Unqualified,XMLNamespace> MODULE_NAME_TO_NAMESPACEPre-linkage global mapping of module names to namespaces. -
MODULECTX_TO_SOURCE
public static final @NonNull ParserNamespace<StmtContext<?,?, MODULECTX_TO_SOURCE?>, SourceIdentifier> Global mapping of modules to source identifier.
-
-
Method Details
-
schemaTree
public static <D extends DeclaredStatement<QName>,E extends SchemaTreeEffectiveStatement<D>> @NonNull ParserNamespace<QName,StmtContext<QName, schemaTree()D, E>> Statement local namespace, which holds direct schema node descendants. This corresponds to the contents of the schema tree as exposed throughSchemaTreeAwareEffectiveStatement
.Unlike all other namespaces this namespaces is polymorphic, hence it is exposed throught this method.
- Returns:
- Schema tree namespace
-
findSchemaTreeStatement
public static Optional<StmtContext<?,?, findSchemaTreeStatement?>> (StmtContext<?, ?, ?> root, SchemaNodeIdentifier identifier) Find statement context identified by interpreting specifiedSchemaNodeIdentifier
starting at specifiedStmtContext
.- Parameters:
root
- Search root contextidentifier
-SchemaNodeIdentifier
relative to search root- Returns:
- Matching statement context, if present.
- Throws:
NullPointerException
- if any of the arguments is null
-