- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.yangtools.yang.test.util.YangParserTestUtils
类的一些代码示例,展示了YangParserTestUtils
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangParserTestUtils
类的具体详情如下:
包路径:org.opendaylight.yangtools.yang.test.util.YangParserTestUtils
类名称:YangParserTestUtils
[英]Utility class which provides convenience methods for producing effective schema context based on the supplied yang/yin sources or paths to these sources.
[中]实用类,它提供了基于提供的阳/阴源或这些源的路径生成有效模式上下文的方便方法。
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG source. All YANG features are supported.
*
* @param resource relative path to the YANG file to be parsed
* @param parserMode mode of statement parser
* @return effective schema context
*/
public static SchemaContext parseYangResource(final String resource, final StatementParserMode parserMode) {
return parseYangResource(resource, parserMode, null);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. Statement parser mode is set to
* default mode and all YANG features are supported.
*
* @param files collection of YANG files to be parsed
* @return effective schema context
*/
public static SchemaContext parseYangFiles(final Collection<File> files) {
return parseYangFiles(StatementParserMode.DEFAULT_MODE, files);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. All YANG features are supported.
*
* @param yangResourceDirs relative paths to the directories containing YANG files to be parsed
* @param yangResources relative paths to the YANG files to be parsed
* @param statementParserMode mode of statement parser
* @return effective schema context
*/
public static SchemaContext parseYangResources(final List<String> yangResourceDirs,
final List<String> yangResources, final StatementParserMode statementParserMode) {
return parseYangResources(yangResourceDirs, yangResources, null, statementParserMode);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources.
*
* @param yangResourceDirs relative paths to the directories containing YANG files to be parsed
* @param yangResources relative paths to the YANG files to be parsed
* @param supportedFeatures set of supported features based on which all if-feature statements in the parsed YANG
* models are resolved
* @param statementParserMode mode of statement parser
* @return effective schema context
*/
public static SchemaContext parseYangResources(final List<String> yangResourceDirs,
final List<String> yangResources, final Set<QName> supportedFeatures,
final StatementParserMode statementParserMode) {
final List<File> allYangFiles = new ArrayList<>();
for (final String yangDir : yangResourceDirs) {
allYangFiles.addAll(getYangFiles(yangDir));
}
for (final String yangFile : yangResources) {
try {
allYangFiles.add(new File(YangParserTestUtils.class.getResource(yangFile).toURI()));
} catch (URISyntaxException e) {
throw new IllegalArgumentException("Invalid resource " + yangFile, e);
}
}
return parseYangFiles(supportedFeatures, statementParserMode, allYangFiles);
}
代码示例来源:origin: opendaylight/yangtools
public static SchemaContext parseYangSources(final StatementParserMode parserMode,
final Set<QName> supportedFeatures, final YangTextSchemaSource... sources) {
return parseSources(parserMode, supportedFeatures, Arrays.asList(sources));
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. All YANG features are supported.
*
* @param resourcePath relative path to the directory with YANG files to be parsed
* @param parserMode mode of statement parser
* @return effective schema context
*/
public static SchemaContext parseYangResourceDirectory(final String resourcePath,
final StatementParserMode parserMode) {
return parseYangResourceDirectory(resourcePath, null, parserMode);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG source.
*
* @param resource relative path to the YANG file to be parsed
* @param supportedFeatures set of supported features based on which all if-feature statements in the parsed YANG
* model are resolved
* @param parserMode mode of statement parser
* @return effective schema context
*/
public static SchemaContext parseYangResource(final String resource, final StatementParserMode parserMode,
final Set<QName> supportedFeatures) {
final YangTextSchemaSource source = YangTextSchemaSource.forResource(YangParserTestUtils.class, resource);
return parseYangSources(parserMode, supportedFeatures, source);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources.
*
* @param supportedFeatures set of supported features based on which all if-feature statements in the parsed YANG
* models are resolved
* @param parserMode mode of statement parser
* @param files YANG files to be parsed
* @return effective schema context
*/
public static SchemaContext parseYangFiles(final Set<QName> supportedFeatures,
final StatementParserMode parserMode, final Collection<File> files) {
return parseSources(parserMode, supportedFeatures,
files.stream().map(YangTextSchemaSource::forFile).collect(Collectors.toList()));
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. Statement parser mode is set to
* default mode and all YANG features are supported.
*
* @param resourcePath relative path to the directory with YANG files to be parsed
* @return effective schema context
*/
public static SchemaContext parseYangResourceDirectory(final String resourcePath) {
return parseYangResourceDirectory(resourcePath, StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG source. Statement parser mode is set to
* default mode and all YANG features are supported.
*
* @param resource relative path to the YANG file to be parsed
*
* @return effective schema context
*/
public static SchemaContext parseYangResource(final String resource) {
return parseYangResource(resource, StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. All YANG features are supported.
*
* @param parserMode mode of statement parser
* @param files collection of YANG files to be parsed
* @return effective schema context
*/
public static SchemaContext parseYangFiles(final StatementParserMode parserMode, final Collection<File> files) {
return parseYangFiles(null, parserMode, files);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. Statement parser mode is set to
* default mode.
*
* @param yangDirs relative paths to the directories containing YANG files to be parsed
* @param yangFiles relative paths to the YANG files to be parsed
* @param supportedFeatures set of supported features based on which all if-feature statements in the parsed YANG
* models are resolved
* @return effective schema context
*/
public static SchemaContext parseYangResources(final List<String> yangDirs, final List<String> yangFiles,
final Set<QName> supportedFeatures) {
return parseYangResources(yangDirs, yangFiles, supportedFeatures, StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: opendaylight/yangtools
public static SchemaContext parseYangResources(final Class<?> clazz, final Collection<String> resources) {
final List<YangTextSchemaSource> sources = new ArrayList<>(resources.size());
for (final String r : resources) {
sources.add(YangTextSchemaSource.forResource(clazz, r));
}
return parseSources(StatementParserMode.DEFAULT_MODE, null, sources);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. Statement parser mode is set to
* default mode.
*
* @param resourcePath relative path to the directory with YANG files to be parsed
* @param supportedFeatures set of supported features based on which all if-feature statements in the parsed YANG
* models are resolved
* @return effective schema context
*/
public static SchemaContext parseYangResourceDirectory(final String resourcePath,
final Set<QName> supportedFeatures) {
return parseYangResourceDirectory(resourcePath, supportedFeatures, StatementParserMode.DEFAULT_MODE);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG source. Statement parser mode is set to
* default mode.
*
* @param resource relative path to the YANG file to be parsed
* @param supportedFeatures set of supported features based on which all if-feature statements in the parsed YANG
* model are resolved
* @return effective schema context
*/
public static SchemaContext parseYangResource(final String resource, final Set<QName> supportedFeatures) {
return parseYangResource(resource, StatementParserMode.DEFAULT_MODE, supportedFeatures);
}
代码示例来源:origin: opendaylight/yangtools
public static SchemaContext parseYangFiles(final Set<QName> supportedFeatures, final Collection<File> files) {
return parseYangFiles(supportedFeatures, StatementParserMode.DEFAULT_MODE, files);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. Statement parser mode is set to
* default mode and all YANG features are supported.
*
* @param clazz Resource lookup base
* @param resources Resource names to be looked up
* @return effective schema context
*/
public static SchemaContext parseYangResources(final Class<?> clazz, final String... resources) {
return parseYangResources(clazz, Arrays.asList(resources));
}
代码示例来源:origin: opendaylight/yangtools
static SchemaContext createTestContext() {
return YangParserTestUtils.parseYangResource("/odl-datastore-test.yang");
}
}
代码示例来源:origin: opendaylight/yangtools
/**
* Creates a new effective schema context containing the specified YANG sources. Statement parser mode is set to
* default mode.
*
* @param supportedFeatures set of supported features based on which all if-feature statements in the parsed YANG
* models are resolved
* @param files YANG files to be parsed
* @return effective schema context
*/
public static SchemaContext parseYangFiles(final Set<QName> supportedFeatures, final File... files) {
return parseYangFiles(supportedFeatures, Arrays.asList(files));
}
代码示例来源:origin: opendaylight/controller
public static SchemaContext createTestContext() {
return YangParserTestUtils.parseYangResources(TestModel.class, DATASTORE_TEST_YANG, DATASTORE_AUG_YANG,
DATASTORE_TEST_NOTIFICATION_YANG);
}
本文整理了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
我是一名优秀的程序员,十分优秀!