- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver
类的一些代码示例,展示了YangTextSchemaContextResolver
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangTextSchemaContextResolver
类的具体详情如下:
包路径:org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver
类名称:YangTextSchemaContextResolver
暂无
代码示例来源:origin: opendaylight/yangtools
/**
* Try to parse all currently available yang files and build new schema context.
*
* @return new schema context iif there is at least 1 yang file registered and
* new schema context was successfully built.
*/
public Optional<SchemaContext> getSchemaContext() {
return getSchemaContext(StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-impl
@Beta
public SchemaContext trySchemaContext() throws SchemaResolutionException {
return trySchemaContext(StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-impl
/**
* Register a URL containing a YANG text.
*
* @param url YANG text source URL
* @return a YangTextSchemaSourceRegistration for this URL
* @throws YangSyntaxErrorException When the YANG file is syntactically invalid
* @throws IOException when the URL is not readable
* @throws SchemaSourceException When parsing encounters general error
*/
public @NonNull YangTextSchemaSourceRegistration registerSource(final @NonNull URL url)
throws SchemaSourceException, IOException, YangSyntaxErrorException {
checkArgument(url != null, "Supplied URL must not be null");
final String path = url.getPath();
final String fileName = path.substring(path.lastIndexOf('/') + 1);
final SourceIdentifier guessedId = guessSourceIdentifier(fileName);
return registerSource(new YangTextSchemaSource(guessedId) {
@Override
public InputStream openStream() throws IOException {
return url.openStream();
}
@Override
protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {
return toStringHelper.add("url", url);
}
});
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding-generator-impl
@SuppressWarnings("checkstyle:illegalCatch")
@SuppressFBWarnings("REC_CATCH_EXCEPTION")
private boolean resolveModuleInfo(final YangModuleInfo moduleInfo) {
final SourceIdentifier identifier = sourceIdentifierFrom(moduleInfo);
final YangModuleInfo previous = sourceIdentifierToModuleInfo.putIfAbsent(identifier, moduleInfo);
if (previous != null) {
return false;
}
ClassLoader moduleClassLoader = moduleInfo.getClass().getClassLoader();
try {
String modulePackageName = moduleInfo.getClass().getPackage().getName();
packageNameToClassLoader.putIfAbsent(modulePackageName, new WeakReference<>(moduleClassLoader));
ctxResolver.registerSource(toYangTextSource(identifier, moduleInfo));
for (YangModuleInfo importedInfo : moduleInfo.getImportedModules()) {
resolveModuleInfo(importedInfo);
}
} catch (Exception e) {
LOG.error("Not including {} in YANG sources because of error.", moduleInfo, e);
}
return true;
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-impl
public static YangTextSchemaContextResolver create(final String name) {
final SharedSchemaRepository sharedRepo = new SharedSchemaRepository(name);
return new YangTextSchemaContextResolver(sharedRepo, sharedRepo);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Register a URL containing a YANG text.
*
* @param url YANG text source URL
* @return a YangTextSchemaSourceRegistration for this URL
* @throws YangSyntaxErrorException When the YANG file is syntactically invalid
* @throws IOException when the URL is not readable
* @throws SchemaSourceException When parsing encounters general error
*/
public @NonNull YangTextSchemaSourceRegistration registerSource(final @NonNull URL url)
throws SchemaSourceException, IOException, YangSyntaxErrorException {
checkArgument(url != null, "Supplied URL must not be null");
final String path = url.getPath();
final String fileName = path.substring(path.lastIndexOf('/') + 1);
final SourceIdentifier guessedId = guessSourceIdentifier(fileName);
return registerSource(new YangTextSchemaSource(guessedId) {
@Override
public InputStream openStream() throws IOException {
return url.openStream();
}
@Override
protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {
return toStringHelper.add("url", url);
}
});
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding2-runtime
private boolean resolveModuleInfo(final YangModuleInfo moduleInfo) {
final SourceIdentifier identifier = sourceIdentifierFrom(moduleInfo);
final YangModuleInfo previous = sourceIdentifierToModuleInfo.putIfAbsent(identifier, moduleInfo);
final ClassLoader moduleClassLoader = moduleInfo.getClass().getClassLoader();
try {
if (previous == null) {
final String modulePackageName = moduleInfo.getClass().getPackage().getName();
packageNameToClassLoader.putIfAbsent(modulePackageName,
new WeakReference<>(moduleClassLoader));
ctxResolver.registerSource(toYangTextSource(identifier, moduleInfo));
for (final YangModuleInfo importedInfo : moduleInfo.getImportedModules()) {
resolveModuleInfo(importedInfo);
}
} else {
return false;
}
} catch (final Exception e) {
LOG.error("Not including {} in YANG sources because of error.", moduleInfo, e);
}
return true;
}
代码示例来源:origin: opendaylight/yangtools
public static YangTextSchemaContextResolver create(final String name) {
final SharedSchemaRepository sharedRepo = new SharedSchemaRepository(name);
return new YangTextSchemaContextResolver(sharedRepo, sharedRepo);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-impl
/**
* Try to parse all currently available yang files and build new schema context.
*
* @return new schema context iif there is at least 1 yang file registered and
* new schema context was successfully built.
*/
public Optional<SchemaContext> getSchemaContext() {
return getSchemaContext(StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: opendaylight/yangtools
@Beta
public SchemaContext trySchemaContext() throws SchemaResolutionException {
return trySchemaContext(StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding2-runtime
/**
* Resolving of schema context.
*
* @return optional of schema context
*/
public Optional<SchemaContext> tryToCreateSchemaContext() {
return ctxResolver.getSchemaContext();
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding-generator-impl
public Optional<SchemaContext> tryToCreateSchemaContext() {
return ctxResolver.getSchemaContext();
}
本文整理了Java中org.opendaylight.yangtools.yang.binding.YangModuleInfo类的一些代码示例,展示了YangModuleInfo类的具体用法。这些代
本文整理了Java中org.opendaylight.yangtools.yang.common.YangVersion类的一些代码示例,展示了YangVersion类的具体用法。这些代码示例主要来源
本文整理了Java中org.opendaylight.yangtools.yang.binding.YangModelBindingProvider类的一些代码示例,展示了YangModelBindi
本文整理了Java中org.opendaylight.yangtools.yang.common.YangConstants类的一些代码示例,展示了YangConstants类的具体用法。这些代码示例
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier类的一些代码示例,展示了YangInstanceIde
本文整理了Java中org.opendaylight.yangtools.yang.model.api.YangStmtMapping类的一些代码示例,展示了YangStmtMapping类的具体用法
本文整理了Java中org.opendaylight.yangtools.yang.parser.impl.YangParserImpl类的一些代码示例,展示了YangParserImpl类的具体用法
本文整理了Java中org.opendaylight.yangtools.yang.test.util.YangParserTestUtils类的一些代码示例,展示了YangParserTestUti
本文整理了Java中org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver类的一些代码示例,展示了YangT
本文整理了Java中org.opendaylight.yangtools.odlext.model.api.YangModeledAnyXmlSchemaNode类的一些代码示例,展示了YangMod
本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangQNameExpr类的一些代码示例,展示了YangQNameExpr类的具体用法。这些代
本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangFilterExpr类的一些代码示例,展示了YangFilterExpr类的具体用法。这
本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangNegateExpr类的一些代码示例,展示了YangNegateExpr类的具体用法。这
本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangFunctionCallExpr类的一些代码示例,展示了YangFunctionCall
本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangLocationPath类的一些代码示例,展示了YangLocationPath类的具体
本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangNaryExpr类的一些代码示例,展示了YangNaryExpr类的具体用法。这些代码示
本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangFunction类的一些代码示例,展示了YangFunction类的具体用法。这些代码示
本文整理了Java中org.opendaylight.yangtools.yang.data.util.YangModeledAnyXmlNodeDataWithSchema类的一些代码示例,展示了Y
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.of()方法的一些代码示例,展示了YangInsta
本文整理了Java中org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource类的一些代码示例,展示了YangTextSch
我是一名优秀的程序员,十分优秀!