我在 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();
但是我在这些 jar 中找不到类 YangStatementSourceImpl 或 YinStatementSourceImpl。
所以我的问题是:
- 我在哪里可以找到这些类,YangStatementSourceImpl 或 YinStatementSourceImpl ?
- 像男爵,氧气......这样的opendaylight版本如何与这里的maven模块匹配:https ://mvnrepository.com/artifact/org.opendaylight.yangtools ?
兄弟,
//麦克风