- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo
类的一些代码示例,展示了YangModelDependencyInfo
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangModelDependencyInfo
类的具体详情如下:
包路径:org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo
类名称:YangModelDependencyInfo
[英]Helper transfer object which holds basic and dependency information for YANG model.
There are two concrete implementations of this interface:
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
private static @NonNull YangModelDependencyInfo parseModuleContext(final StatementContext module,
final SourceIdentifier source) {
final String name = safeStringArgument(source, module, "module name");
final String latestRevision = getLatestRevision(module, source);
final Optional<SemVer> semVer = Optional.ofNullable(findSemanticVersion(module, source));
final ImmutableSet<ModuleImport> imports = parseImports(module, source);
final ImmutableSet<ModuleImport> includes = parseIncludes(module, source);
return new ModuleDependencyInfo(name, latestRevision, imports, includes, semVer);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
private static @NonNull SemVerSourceIdentifier getSemVerSourceId(final @NonNull YangModelDependencyInfo depInfo) {
return depInfo.getFormattedRevision() == null
? SemVerSourceIdentifier.create(depInfo.getName(), depInfo.getSemanticVersion().orElse(null))
: SemVerSourceIdentifier.create(depInfo.getName(), depInfo.getRevision(),
depInfo.getSemanticVersion().orElse(null));
}
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
private static @NonNull YangModelDependencyInfo parseSubmoduleContext(final StatementContext submodule,
final SourceIdentifier source) {
final String name = safeStringArgument(source, submodule, "submodule name");
final String belongsTo = parseBelongsTo(submodule, source);
final String latestRevision = getLatestRevision(submodule, source);
final ImmutableSet<ModuleImport> imports = parseImports(submodule, source);
final ImmutableSet<ModuleImport> includes = parseIncludes(submodule, source);
return new SubmoduleDependencyInfo(name, latestRevision, belongsTo, imports, includes);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
private static @NonNull SourceIdentifier getSourceId(final @NonNull YangModelDependencyInfo depInfo) {
final String name = depInfo.getName();
return depInfo.getFormattedRevision() == null ? RevisionSourceIdentifier.create(name)
: RevisionSourceIdentifier.create(name, depInfo.getRevision());
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
private static ImmutableSet<ModuleImport> parseImports(final StatementContext module,
final SourceIdentifier source) {
final Set<ModuleImport> result = new HashSet<>();
for (final StatementContext subStatementContext : module.statement()) {
if (IMPORT.equals(subStatementContext.keyword().getText())) {
final String importedModuleName = safeStringArgument(source, subStatementContext,
"imported module name");
final String revisionDateStr = getRevisionDateString(subStatementContext, source);
final Revision revisionDate = Revision.ofNullable(revisionDateStr).orElse(null);
final SemVer importSemVer = findSemanticVersion(subStatementContext, source);
result.add(new ModuleImportImpl(importedModuleName, revisionDate, importSemVer));
}
}
return ImmutableSet.copyOf(result);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
private static ImmutableSet<ModuleImport> parseIncludes(final StatementContext module,
final SourceIdentifier source) {
final Set<ModuleImport> result = new HashSet<>();
for (final StatementContext subStatementContext : module.statement()) {
if (INCLUDE.equals(subStatementContext.keyword().getText())) {
final String revisionDateStr = getRevisionDateString(subStatementContext, source);
final String IncludeModuleName = safeStringArgument(source, subStatementContext,
"included submodule name");
final Revision revisionDate = Revision.ofNullable(revisionDateStr).orElse(null);
result.add(new ModuleImportImpl(IncludeModuleName, revisionDate));
}
}
return ImmutableSet.copyOf(result);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
/**
* Create a new instance of AST representation for a abstract syntax tree, performing minimal semantic analysis
* to acquire dependency information.
*
* @param symbolicName
* Symbolic name
* @param identifier
* SourceIdentifier of YANG schema source.
* @param tree
* ANTLR abstract syntax tree
* @return A new representation instance.
* @throws YangSyntaxErrorException
* if we fail to extract dependency information.
*/
static @NonNull ASTSchemaSource create(final @NonNull SourceIdentifier identifier,
final @Nullable String symbolicName, final @NonNull ParserRuleContext tree)
throws YangSyntaxErrorException {
final YangModelDependencyInfo depInfo = YangModelDependencyInfo.fromAST(identifier, tree);
final SourceIdentifier id = getSourceId(depInfo);
final SemVerSourceIdentifier semVerId;
if (identifier instanceof SemVerSourceIdentifier && !depInfo.getSemanticVersion().isPresent()) {
semVerId = (SemVerSourceIdentifier) identifier;
} else {
semVerId = getSemVerSourceId(depInfo);
}
return new ASTSchemaSource(id, semVerId, tree, depInfo, symbolicName);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-impl
final Set<ModuleImport> dependencies = dep.getDependencies();
for (final SourceIdentifier id : pending) {
final YangModelDependencyInfo dep = depInfo.get(id);
for (final ModuleImport mi : dep.getDependencies()) {
if (!isKnown(pending, mi) && !isKnown(resolved, mi)) {
imports.put(id, mi);
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
private static String safeStringArgument(final SourceIdentifier source, final StatementContext stmt,
final String desc) {
final StatementSourceReference ref = getReference(source, stmt);
final ArgumentContext arg = stmt.argument();
checkArgument(arg != null, "Missing %s at %s", desc, ref);
return ArgumentContextUtils.stringFromStringContext(arg, YangVersion.VERSION_1, ref);
}
代码示例来源:origin: opendaylight/yangtools
final Set<ModuleImport> dependencies = dep.getDependencies();
for (final SourceIdentifier id : pending) {
final YangModelDependencyInfo dep = depInfo.get(id);
for (final ModuleImport mi : dep.getDependencies()) {
if (!isKnown(pending, mi) && !isKnown(resolved, mi)) {
imports.put(id, mi);
我在一个模型中有两个属性: 叶协议(protocol), 离开港口。 我想说明: 如果 protocol = 'ssh' 则默认端口值为 22, 如果 protocol = 'http' 则默认端口值
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
我是一名优秀的程序员,十分优秀!