我在我的pom.xml中添加了以下依赖项
<dependencies>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-parser-impl</artifactId>
<version>2.1.8</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-parser-api</artifactId>
<version>2.1.8</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-model-api</artifactId>
<version>2.1.8</version>
<type>jar</type>
</dependency>
</dependencies>然后,我试图找到关于如何解析..yang/..yi文件以构建Schema的文档。
我在这里找到了以下示例:
https://docs.opendaylight.org/en/stable-boron/developer-guide/yang-tools.html
StatementStreamSource yangModuleSource == new YangStatementSourceImpl("/example.yang", false);
StatementStreamSource yangModuleSource2 == new YangStatementSourceImpl("/example2.yang", false);
CrossSourceStatementReactor.BuildAction reactor == YangInferencePipeline.RFC6020_REACTOR.newBuild();
reactor.addSources(yangModuleSource, yangModuleSource2);
SchemaContext schemaContext == reactor.buildEffective();但是,我在这些jars中找不到类YangStatementSourceImpl或YinStatementSourceImpl。
所以我的问题是:
比尔,
//迈克
发布于 2019-03-08 08:34:54
YangStatementStreamSource和YinStatementStreamSource。要初始化示例中的第一个流,现在应该编写
YangTextSchemaSource yangTextSchemaSource =YangTextSchemaSource.forFile(新文件(“/example.yang”));StatementStreamSource yangModuleSource =https://stackoverflow.com/questions/55039195
复制相似问题