I added the following dependency in my 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>
Then I tried to find documentation on how to parse the .yang/.yi files to build Schema.
I found the following example here:
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();
However I cannot find the class YangStatementSourceImpl or YinStatementSourceImpl in these jars.
So my question is:
- Where can I find these classes, YangStatementSourceImpl or YinStatementSourceImpl ?
- How is opendaylight versions like baron, oxygen ... matched to the maven module here: https://mvnrepository.com/artifact/org.opendaylight.yangtools ?
br,
//mike