本文整理了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
[英]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);
}
内容来源于网络,如有侵权,请联系作者删除!