*/
package org.opendaylight.yangtools.odlext.parser;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.odlext.model.api.AnyxmlSchemaLocationStatement;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
public interface AnyxmlSchemaLocationNamespace extends IdentifierNamespace<StatementDefinition,
Mutable<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement,
EffectiveStatement<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement>>> {
- NamespaceBehaviour<?, ?, ?> BEHAVIOR = NamespaceBehaviour.treeScoped(AnyxmlSchemaLocationNamespace.class);
+ NamespaceBehaviour<StatementDefinition, Mutable<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement,
+ EffectiveStatement<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement>>,
+ @NonNull AnyxmlSchemaLocationNamespace> BEHAVIOUR =
+ NamespaceBehaviour.treeScoped(AnyxmlSchemaLocationNamespace.class);
}
* <p>
* To access this extension, add {@link org.opendaylight.yangtools.odlext.parser.AnyxmlSchemaLocationStatementSupport},
* {@link org.opendaylight.yangtools.odlext.parser.AnyxmlStatementSupportOverride} and
- * {@link org.opendaylight.yangtools.odlext.parser.AnyxmlSchemaLocationNamespace#BEHAVIOR} to the reactor.
+ * {@link org.opendaylight.yangtools.odlext.parser.AnyxmlSchemaLocationNamespace#BEHAVIOUR} to the reactor.
*
* @author Robert Varga
*/
reactor = RFC7950Reactors.vanillaReactorBuilder()
.addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
AnyxmlSchemaLocationStatementSupport.getInstance())
- .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, AnyxmlSchemaLocationNamespace.BEHAVIOR)
+ .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, AnyxmlSchemaLocationNamespace.BEHAVIOUR)
.overrideStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
AnyxmlStatementSupportOverride.getInstance())
.build();
// AnyxmlSchemaLocation support
.addStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
AnyxmlSchemaLocationStatementSupport.getInstance())
- .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, AnyxmlSchemaLocationNamespace.BEHAVIOR)
+ .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, AnyxmlSchemaLocationNamespace.BEHAVIOUR)
.overrideStatementSupport(ModelProcessingPhase.FULL_DECLARATION,
AnyxmlStatementSupportOverride.getInstance())
package org.opendaylight.yangtools.yang.parser.rfc7950.namespace;
import com.google.common.annotations.Beta;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Implementation-internal cache for looking up URI to import prefix. URIs are taken in as Strings to save ourselves
*/
@Beta
public interface URIStringToImportPrefix extends IdentifierNamespace<String, String> {
-
+ NamespaceBehaviour<String, String, @NonNull URIStringToImportPrefix> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(URIStringToImportPrefix.class);
}
import static org.opendaylight.yangtools.yang.common.YangVersion.VERSION_1;
import static org.opendaylight.yangtools.yang.common.YangVersion.VERSION_1_1;
-import static org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.global;
-import static org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.sourceLocal;
-import static org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.treeScoped;
import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
private static final Set<YangVersion> SUPPORTED_VERSIONS = Sets.immutableEnumSet(VERSION_1, VERSION_1_1);
private static final StatementSupportBundle INIT_BUNDLE = StatementSupportBundle.builder(SUPPORTED_VERSIONS)
- .addSupport(global(ValidationBundlesNamespace.class))
- .addSupport(global(SupportedFeaturesNamespace.class))
- .addSupport(global(ModulesDeviatedByModules.class))
+ .addSupport(ValidationBundlesNamespace.BEHAVIOUR)
+ .addSupport(SupportedFeaturesNamespace.BEHAVIOUR)
+ .addSupport(ModulesDeviatedByModules.BEHAVIOUR)
.build();
private static final StatementSupportBundle PRE_LINKAGE_BUNDLE = StatementSupportBundle.derivedFrom(INIT_BUNDLE)
.addSupport(new YangVersionStatementSupport())
.addSupport(new RevisionStatementSupport())
.addSupport(new RevisionDateStatementSupport())
- .addSupport(global(ModuleNameToNamespace.class))
- .addSupport(global(PreLinkageModuleNamespace.class))
- .addSupport(sourceLocal(ImpPrefixToNamespace.class))
- .addSupport(global(ModuleCtxToModuleQName.class))
+ .addSupport(ModuleNameToNamespace.BEHAVIOUR)
+ .addSupport(PreLinkageModuleNamespace.BEHAVIOUR)
+ .addSupport(ImpPrefixToNamespace.BEHAVIOUR)
+ .addSupport(ModuleCtxToModuleQName.BEHAVIOUR)
.build();
private static final StatementSupportBundle LINKAGE_BUNDLE = StatementSupportBundle
.addSupport(new ReferenceStatementSupport())
.addSupport(new ContactStatementSupport())
.addSupport(new OrganizationStatementSupport())
- .addSupport(global(ModuleNamespace.class))
- .addSupport(global(ModuleNamespaceForBelongsTo.class))
- .addSupport(global(SubmoduleNamespace.class))
- .addSupport(global(NamespaceToModule.class))
- .addSupport(global(ModuleNameToModuleQName.class))
- .addSupport(global(ModuleCtxToSourceIdentifier.class))
- .addSupport(global(ModuleQNameToModuleName.class))
- .addSupport(global(PrefixToModule.class))
+ .addSupport(ModuleNamespace.BEHAVIOUR)
+ .addSupport(ModuleNamespaceForBelongsTo.BEHAVIOUR)
+ .addSupport(SubmoduleNamespace.BEHAVIOUR)
+ .addSupport(NamespaceToModule.BEHAVIOUR)
+ .addSupport(ModuleNameToModuleQName.BEHAVIOUR)
+ .addSupport(ModuleCtxToSourceIdentifier.BEHAVIOUR)
+ .addSupport(ModuleQNameToModuleName.BEHAVIOUR)
+ .addSupport(PrefixToModule.BEHAVIOUR)
.addSupport(QNameCacheNamespace.getInstance())
- .addSupport(sourceLocal(ImportedModuleContext.class))
- .addSupport(sourceLocal(IncludedModuleContext.class))
- .addSupport(sourceLocal(IncludedSubmoduleNameToModuleCtx.class))
- .addSupport(sourceLocal(ImportPrefixToModuleCtx.class))
- .addSupport(sourceLocal(BelongsToPrefixToModuleCtx.class))
- .addSupport(sourceLocal(URIStringToImportPrefix.class))
- .addSupport(sourceLocal(BelongsToModuleContext.class))
- .addSupport(sourceLocal(QNameToStatementDefinition.class))
- .addSupport(sourceLocal(BelongsToPrefixToModuleName.class))
+ .addSupport(ImportedModuleContext.BEHAVIOUR)
+ .addSupport(IncludedModuleContext.BEHAVIOUR)
+ .addSupport(IncludedSubmoduleNameToModuleCtx.BEHAVIOUR)
+ .addSupport(ImportPrefixToModuleCtx.BEHAVIOUR)
+ .addSupport(BelongsToPrefixToModuleCtx.BEHAVIOUR)
+ .addSupport(URIStringToImportPrefix.BEHAVIOUR)
+ .addSupport(BelongsToModuleContext.BEHAVIOUR)
+ .addSupport(QNameToStatementDefinition.BEHAVIOUR)
+ .addSupport(BelongsToPrefixToModuleName.BEHAVIOUR)
.build();
private static final StatementSupportBundle STMT_DEF_BUNDLE = StatementSupportBundle
.addSupport(new ExtensionStatementSupport())
.addSupport(new ChildSchemaNodeNamespace<>())
.addSupport(new SchemaNodeIdentifierBuildNamespace())
- .addSupport(global(ExtensionNamespace.class))
+ .addSupport(ExtensionNamespace.BEHAVIOUR)
.addSupport(new TypedefStatementSupport())
- .addSupport(treeScoped(TypeNamespace.class))
+ .addSupport(TypeNamespace.BEHAVIOUR)
.addVersionSpecificSupport(VERSION_1, new IdentityStatementRFC6020Support())
.addVersionSpecificSupport(VERSION_1_1, new IdentityStatementRFC7950Support())
- .addSupport(global(IdentityNamespace.class))
+ .addSupport(IdentityNamespace.BEHAVIOUR)
.addSupport(new DefaultStatementSupport())
.addSupport(new StatusStatementSupport())
.addVersionSpecificSupport(VERSION_1, new TypeStatementRFC6020Support())
.addVersionSpecificSupport(VERSION_1_1, new NotificationStatementRFC7950Support())
.addSupport(new FractionDigitsStatementSupport())
.addSupport(new BaseStatementSupport())
- .addSupport(global(DerivedIdentitiesNamespace.class))
- .addSupport(global(StatementDefinitionNamespace.class))
+ .addSupport(DerivedIdentitiesNamespace.BEHAVIOUR)
+ .addSupport(StatementDefinitionNamespace.BEHAVIOUR)
.build();
private static final StatementSupportBundle FULL_DECL_BUNDLE = StatementSupportBundle
.addVersionSpecificSupport(VERSION_1_1, new AnydataStatementSupport())
.addSupport(new IfFeatureStatementSupport())
.addSupport(new UsesStatementSupport())
- .addSupport(treeScoped(GroupingNamespace.class)) //treeScoped
+ .addSupport(GroupingNamespace.BEHAVIOUR)
.addSupport(new ErrorMessageStatementSupport())
.addSupport(new ErrorAppTagStatementSupport())
.addVersionSpecificSupport(VERSION_1, new LeafListStatementRFC6020Support())
.addSupport(new WhenStatementSupport())
.addVersionSpecificSupport(VERSION_1, new AugmentStatementRFC6020Support())
.addVersionSpecificSupport(VERSION_1_1, new AugmentStatementRFC7950Support())
- .addSupport(treeScoped(AugmentToChoiceNamespace.class))
+ .addSupport(AugmentToChoiceNamespace.BEHAVIOUR)
.addVersionSpecificSupport(VERSION_1, new RefineStatementRFC6020Support())
.addVersionSpecificSupport(VERSION_1_1, new RefineStatementRFC7950Support())
.addSupport(new FeatureStatementSupport())
.addSupport(new PositionStatementSupport())
.addSupport(new ValueStatementSupport())
- .addSupport(global(StmtOrderingNamespace.class))
+ .addSupport(StmtOrderingNamespace.BEHAVIOUR)
.build();
private static final Map<ModelProcessingPhase, StatementSupportBundle> RFC7950_BUNDLES =
return vanillaReactorBuilder()
// Semantic version support
.addStatementSupport(ModelProcessingPhase.SOURCE_LINKAGE, OpenConfigVersionSupport.getInstance())
- .addNamespaceSupport(ModelProcessingPhase.SOURCE_LINKAGE, global(SemanticVersionNamespace.class))
- .addNamespaceSupport(ModelProcessingPhase.SOURCE_LINKAGE, global(SemanticVersionModuleNamespace.class))
+ .addNamespaceSupport(ModelProcessingPhase.SOURCE_LINKAGE, SemanticVersionNamespace.BEHAVIOUR)
+ .addNamespaceSupport(ModelProcessingPhase.SOURCE_LINKAGE, SemanticVersionModuleNamespace.BEHAVIOUR)
.addNamespaceSupport(ModelProcessingPhase.SOURCE_LINKAGE,
- sourceLocal(ImportPrefixToSemVerSourceIdentifier.class));
+ ImportPrefixToSemVerSourceIdentifier.BEHAVIOUR);
}
/**
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.ExtensionStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Extension namespace. All extension names defined in a module and its submodules share the same
*/
public interface ExtensionNamespace
extends StatementNamespace<QName, ExtensionStatement, EffectiveStatement<QName, ExtensionStatement>> {
+ NamespaceBehaviour<QName, StmtContext<?, ExtensionStatement, EffectiveStatement<QName, ExtensionStatement>>,
+ @NonNull ExtensionNamespace> BEHAVIOUR = NamespaceBehaviour.global(ExtensionNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.GroupingStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace.TreeScoped;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Grouping namespace. * All grouping names defined within a parent node or at the top level of the module
*/
public interface GroupingNamespace
extends TreeScoped<QName, GroupingStatement, EffectiveStatement<QName, GroupingStatement>> {
+ NamespaceBehaviour<QName, StmtContext<?, GroupingStatement, EffectiveStatement<QName, GroupingStatement>>,
+ @NonNull GroupingNamespace> BEHAVIOUR = NamespaceBehaviour.treeScoped(GroupingNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.IdentityStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Identity namespace. All identity names defined in a module and its submodules share the same identity identifier
*/
public interface IdentityNamespace extends
StatementNamespace<QName, IdentityStatement, EffectiveStatement<QName, IdentityStatement>> {
+ NamespaceBehaviour<QName, StmtContext<?, IdentityStatement, EffectiveStatement<QName, IdentityStatement>>,
+ @NonNull IdentityNamespace> BEHAVIOUR = NamespaceBehaviour.global(IdentityNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Module namespace. All modules known to the reactor are populated to this namespace. Each module is identified
*/
public interface ModuleNamespace extends
StatementNamespace<SourceIdentifier, ModuleStatement, EffectiveStatement<String, ModuleStatement>> {
+ NamespaceBehaviour<SourceIdentifier, StmtContext<?, ModuleStatement, EffectiveStatement<String, ModuleStatement>>,
+ @NonNull ModuleNamespace> BEHAVIOUR = NamespaceBehaviour.global(ModuleNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* A derived namespace allowing lookup of modules based on their {@link QNameModule}.
*/
public interface NamespaceToModule
extends StatementNamespace<QNameModule, ModuleStatement, EffectiveStatement<String, ModuleStatement>> {
-
+ NamespaceBehaviour<QNameModule, StmtContext<?, ModuleStatement, EffectiveStatement<String, ModuleStatement>>,
+ @NonNull NamespaceToModule> BEHAVIOUR = NamespaceBehaviour.global(NamespaceToModule.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Intermediate-stage namespace equivalent to ModuleNamespace except it is keyed by module names. This namespace is
*/
public interface PreLinkageModuleNamespace extends
StatementNamespace<String, ModuleStatement, EffectiveStatement<String, ModuleStatement>> {
+ NamespaceBehaviour<String, StmtContext<?, ModuleStatement, EffectiveStatement<String, ModuleStatement>>,
+ @NonNull PreLinkageModuleNamespace> BEHAVIOUR = NamespaceBehaviour.global(PreLinkageModuleNamespace.class);
+
}
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.SubmoduleStatement;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Submodule equivalent of ModuleNamespace.
// FIXME: describe scoping of this namespace
public interface SubmoduleNamespace
extends StatementNamespace<SourceIdentifier, SubmoduleStatement, EffectiveStatement<String, SubmoduleStatement>> {
-
+ NamespaceBehaviour<SourceIdentifier, StmtContext<?, SubmoduleStatement,
+ EffectiveStatement<String, SubmoduleStatement>>, @NonNull SubmoduleNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(SubmoduleNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.stmt.TypedefEffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.TypedefStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace.TreeScoped;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Derived types namespace. All derived type names defined within a parent node or at the top level of the module
* (e.g. RFC6020/RFC7950 for YANG 1.0/1.1).
*/
public interface TypeNamespace extends TreeScoped<QName, TypedefStatement, TypedefEffectiveStatement> {
+ NamespaceBehaviour<QName, StmtContext<?, TypedefStatement, TypedefEffectiveStatement>, @NonNull TypeNamespace>
+ BEHAVIOUR = NamespaceBehaviour.treeScoped(TypeNamespace.class);
}
package org.opendaylight.yangtools.yang.parser.spi.meta;
import java.util.List;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
*/
// FIXME: describe scoping and value
public interface DerivedIdentitiesNamespace extends IdentifierNamespace<QName, List<StmtContext<?, ?, ?>>> {
+ NamespaceBehaviour<QName, List<StmtContext<?, ?, ?>>, @NonNull DerivedIdentitiesNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(DerivedIdentitiesNamespace.class);
}
package org.opendaylight.yangtools.yang.parser.spi.meta;
import com.google.common.annotations.Beta;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
import org.opendaylight.yangtools.yang.model.repo.api.SemVerSourceIdentifier;
@Beta
public interface SemanticVersionModuleNamespace
extends StatementNamespace<SemVerSourceIdentifier, ModuleStatement, EffectiveStatement<String, ModuleStatement>> {
+ NamespaceBehaviour<SemVerSourceIdentifier, StmtContext<?, ModuleStatement,
+ EffectiveStatement<String, ModuleStatement>>, @NonNull SemanticVersionModuleNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(SemanticVersionModuleNamespace.class);
}
package org.opendaylight.yangtools.yang.parser.spi.meta;
import com.google.common.annotations.Beta;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.concepts.SemVer;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
*/
@Beta
public interface SemanticVersionNamespace extends IdentifierNamespace<StmtContext<?, ?, ?>, SemVer> {
+ NamespaceBehaviour<StmtContext<?, ?, ?>, SemVer, @NonNull SemanticVersionNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(SemanticVersionNamespace.class);
+
}
package org.opendaylight.yangtools.yang.parser.spi.meta;
import com.google.common.annotations.Beta;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
*/
@Beta
public interface StatementDefinitionNamespace extends IdentifierNamespace<QName, StatementSupport<?, ?, ?>> {
+ NamespaceBehaviour<QName, StatementSupport<?, ?, ?>, @NonNull StatementDefinitionNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(StatementDefinitionNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* shortHand case nodes into choice node.
*/
public interface AugmentToChoiceNamespace extends IdentifierNamespace<StmtContext<?, ?, ?>, Boolean> {
+ NamespaceBehaviour<StmtContext<?, ?, ?>, Boolean, @NonNull AugmentToChoiceNamespace> BEHAVIOUR =
+ NamespaceBehaviour.treeScoped(AugmentToChoiceNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.parser.spi.meta.ImportedNamespaceContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Namespace key class for storing belongs-to statements in YANG model storage.
*/
public interface BelongsToModuleContext extends ImportedNamespaceContext<SourceIdentifier> {
-
+ NamespaceBehaviour<SourceIdentifier, StmtContext<?, ?, ?>, @NonNull BelongsToModuleContext> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(BelongsToModuleContext.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.parser.spi.meta.ImportedNamespaceContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Source-specific mapping of belongsTo prefixes to module identifiers. This mapping allows source-specific context
* statement.
*/
public interface BelongsToPrefixToModuleCtx extends ImportedNamespaceContext<String> {
-
+ NamespaceBehaviour<String, StmtContext<?, ?, ?>, @NonNull BelongsToPrefixToModuleCtx> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(BelongsToPrefixToModuleCtx.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Source-specific mapping of prefixes to namespaces.
*/
public interface BelongsToPrefixToModuleName extends IdentifierNamespace<String, String> {
-
+ NamespaceBehaviour<String, String, @NonNull BelongsToPrefixToModuleName> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(BelongsToPrefixToModuleName.class);
}
package org.opendaylight.yangtools.yang.parser.spi.source;
import java.net.URI;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Pre-linkage source-specific mapping of prefixes to module namespaces.
*/
public interface ImpPrefixToNamespace extends IdentifierNamespace<String, URI> {
-
+ NamespaceBehaviour<String, URI, @NonNull ImpPrefixToNamespace> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(ImpPrefixToNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.parser.spi.meta.ImportedNamespaceContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Source-specific mapping of prefix strings to module context.
*/
public interface ImportPrefixToModuleCtx extends ImportedNamespaceContext<String> {
-
+ NamespaceBehaviour<String, StmtContext<?, ?, ?>, @NonNull ImportPrefixToModuleCtx> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(ImportPrefixToModuleCtx.class);
}
package org.opendaylight.yangtools.yang.parser.spi.source;
import com.google.common.annotations.Beta;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
import org.opendaylight.yangtools.yang.model.repo.api.SemVerSourceIdentifier;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Source-specific mapping of prefixes to source identifier with specified semantic version.
@Beta
public interface ImportPrefixToSemVerSourceIdentifier
extends IdentifierNamespace<String, SemVerSourceIdentifier> {
+ NamespaceBehaviour<String, SemVerSourceIdentifier, @NonNull ImportPrefixToSemVerSourceIdentifier> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(ImportPrefixToSemVerSourceIdentifier.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.parser.spi.meta.ImportedNamespaceContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
public interface ImportedModuleContext extends ImportedNamespaceContext<SourceIdentifier> {
-
+ NamespaceBehaviour<SourceIdentifier, StmtContext<?, ?, ?>, @NonNull ImportedModuleContext> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(ImportedModuleContext.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.parser.spi.meta.ImportedNamespaceContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
public interface IncludedModuleContext extends ImportedNamespaceContext<SourceIdentifier> {
-
+ NamespaceBehaviour<SourceIdentifier, StmtContext<?, ?, ?>, @NonNull IncludedModuleContext> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(IncludedModuleContext.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Source-specific mapping of prefixes to namespaces.
*/
public interface IncludedSubmoduleNameToModuleCtx extends IdentifierNamespace<String, StmtContext<?, ?, ?>> {
-
+ NamespaceBehaviour<String, StmtContext<?, ?, ?>, @NonNull IncludedSubmoduleNameToModuleCtx> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(IncludedSubmoduleNameToModuleCtx.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Global mapping of modules to QNameModules.
*/
public interface ModuleCtxToModuleQName extends IdentifierNamespace<StmtContext<?,?,?>, QNameModule> {
+ NamespaceBehaviour<StmtContext<?, ?, ?>, QNameModule, @NonNull ModuleCtxToModuleQName> BEHAVIOUR =
+ NamespaceBehaviour.global(ModuleCtxToModuleQName.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* Global mapping of modules to source identifier.
*/
public interface ModuleCtxToSourceIdentifier extends IdentifierNamespace<StmtContext<?, ?, ?>, SourceIdentifier> {
-
+ NamespaceBehaviour<StmtContext<?, ?, ?>, SourceIdentifier, @NonNull ModuleCtxToSourceIdentifier> BEHAVIOUR =
+ NamespaceBehaviour.global(ModuleCtxToSourceIdentifier.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Source-specific mapping of prefixes to namespaces.
*/
public interface ModuleNameToModuleQName extends IdentifierNamespace<String, QNameModule> {
-
+ NamespaceBehaviour<String, QNameModule, @NonNull ModuleNameToModuleQName> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(ModuleNameToModuleQName.class);
}
package org.opendaylight.yangtools.yang.parser.spi.source;
import java.net.URI;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Pre-linkage global mapping of module names to namespaces.
*/
public interface ModuleNameToNamespace extends IdentifierNamespace<String, URI> {
-
+ NamespaceBehaviour<String, URI, @NonNull ModuleNameToNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(ModuleNameToNamespace.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
/**
* namespace class similar to {@link org.opendaylight.yangtools.yang.parser.spi.ModuleNamespace} for storing modules
*/
public interface ModuleNamespaceForBelongsTo extends
StatementNamespace<String, ModuleStatement, EffectiveStatement<String, ModuleStatement>> {
-
+ NamespaceBehaviour<String, StmtContext<?, ModuleStatement, EffectiveStatement<String, ModuleStatement>>,
+ @NonNull ModuleNamespaceForBelongsTo> BEHAVIOUR = NamespaceBehaviour.global(
+ ModuleNamespaceForBelongsTo.class);
}
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Source-specific mapping of prefixes to namespaces.
*/
public interface ModuleQNameToModuleName extends IdentifierNamespace<QNameModule, String> {
-
+ NamespaceBehaviour<QNameModule, String, @NonNull ModuleQNameToModuleName> BEHAVIOUR =
+ NamespaceBehaviour.global(ModuleQNameToModuleName.class);
}
import com.google.common.annotations.Beta;
import java.util.Map;
import java.util.Set;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Namespace used for storing information about modules that support deviation resolution.
@Beta
public interface ModulesDeviatedByModules
extends IdentifierNamespace<ModulesDeviatedByModules.SupportedModules, Map<QNameModule, Set<QNameModule>>> {
+ NamespaceBehaviour<SupportedModules, Map<QNameModule, Set<QNameModule>>, @NonNull ModulesDeviatedByModules>
+ BEHAVIOUR = NamespaceBehaviour.global(ModulesDeviatedByModules.class);
enum SupportedModules {
SUPPORTED_MODULES
import java.net.URISyntaxException;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Source-specific mapping of prefixes to namespaces.
*/
public interface PrefixToModule extends IdentifierNamespace<String, QNameModule> {
-
+ NamespaceBehaviour<String, QNameModule, @NonNull PrefixToModule> BEHAVIOUR =
+ NamespaceBehaviour.global(PrefixToModule.class);
String DEFAULT_PREFIX = "";
/**
import java.net.URI;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Map of fully qualified statement name to statement definition.
*/
public interface QNameToStatementDefinition extends IdentifierNamespace<QName, StatementDefinition> {
+ NamespaceBehaviour<QName, StatementDefinition, @NonNull QNameToStatementDefinition> BEHAVIOUR =
+ NamespaceBehaviour.sourceLocal(QNameToStatementDefinition.class);
+
/**
* Returns StatementDefinition with specified QName.
*
* QName of requested statement
* @return StatementDefinition
*/
+ @Override
@Nullable
StatementDefinition get(@Nonnull QName identifier);
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Map of statement order.
*/
-public interface StmtOrderingNamespace extends
- IdentifierNamespace<YangStmtMapping, Integer> {
+public interface StmtOrderingNamespace extends IdentifierNamespace<YangStmtMapping, Integer> {
+ NamespaceBehaviour<YangStmtMapping, Integer, @NonNull StmtOrderingNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(StmtOrderingNamespace.class);
+
}
\ No newline at end of file
package org.opendaylight.yangtools.yang.parser.spi.source;
import java.util.Set;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
public interface SupportedFeaturesNamespace
extends IdentifierNamespace<SupportedFeaturesNamespace.SupportedFeatures, Set<QName>> {
+ NamespaceBehaviour<SupportedFeatures, Set<QName>, @NonNull SupportedFeaturesNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(SupportedFeaturesNamespace.class);
enum SupportedFeatures {
SUPPORTED_FEATURES
package org.opendaylight.yangtools.yang.parser.spi.validation;
import java.util.Collection;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
+import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour;
/**
* Namespace used for validating whether a node is of some type, e.g. usable target for some operation or has other
*/
public interface ValidationBundlesNamespace extends
IdentifierNamespace<ValidationBundlesNamespace.ValidationBundleType, Collection<?>> {
+ NamespaceBehaviour<ValidationBundleType, Collection<?>, @NonNull ValidationBundlesNamespace> BEHAVIOUR =
+ NamespaceBehaviour.global(ValidationBundlesNamespace.class);
enum ValidationBundleType {
/**