gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 10:53:31 27 4
gpt4 key购买 nike

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

YangParserTestUtils.parseYangResource介绍

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

代码示例

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

static SchemaContext createTestContext() {
    return YangParserTestUtils.parseYangResource("/odl-datastore-test.yang");
  }
}

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

public static SchemaContext createTestContextWithoutTestSchema() {
  return YangParserTestUtils.parseYangResource(DATASTORE_TEST_NOTIFICATION_YANG);
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com