org.opendaylight.yangtools.yang.test.util.YangParserTestUtils.parseYangResources()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(79)

本文整理了Java中org.opendaylight.yangtools.yang.test.util.YangParserTestUtils.parseYangResources()方法的一些代码示例,展示了YangParserTestUtils.parseYangResources()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangParserTestUtils.parseYangResources()方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.test.util.YangParserTestUtils
类名称:YangParserTestUtils
方法名:parseYangResources

YangParserTestUtils.parseYangResources介绍

[英]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.
[中]创建包含指定源的新有效架构上下文。语句解析器模式设置为默认模式,并且支持所有功能。

代码示例

代码示例来源: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. 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

/**
 * 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/controller

public static SchemaContext createTestContext() {
  return YangParserTestUtils.parseYangResources(TestModel.class, DATASTORE_TEST_YANG, DATASTORE_AUG_YANG,
    DATASTORE_TEST_NOTIFICATION_YANG);
}

代码示例来源:origin: opendaylight/controller

public static SchemaContext createTestContextWithoutAugmentationSchema() {
  return YangParserTestUtils.parseYangResources(TestModel.class, DATASTORE_TEST_YANG,
    DATASTORE_TEST_NOTIFICATION_YANG);
}

相关文章