...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<parent> <groupId>org.opendaylight.mdsal</groupId> <artifactId>binding-parent</artifactId> <version>3.0.8</version> <relativePath/> </parent> : <dependencies> <dependency> <properties> <maven.compiler.version>3.8.1</maven.compiler.version> <maven.compiler.release>11</maven.compiler.release> <org.opendaylight.yangtools.version>5.0.3</org.opendaylight.yangtools.version> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven.compiler.version}</version> <configuration> <release>${maven.compiler.release}</release> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.opendaylight.yangtools</groupId> <artifactId>yang-parser-api</artifactId> <version>${org.opendaylight.yangtools.version}</version> </dependency> <dependency> <groupId>org.opendaylight.yangtools</groupId> <artifactId>yang-parser-impl</artifactId> <version>${org.opendaylight.yangtools.version}</version> </dependency> <dependency> <groupId>org.opendaylight.yangtools</groupId> <version>5.0.3</version> <artifactId>yang-model-util</artifactId> <version>${org.opendaylight.yangtools.version}</version> </dependency> <dependency> <!-- SLF4J API --> <dependency> <groupId>org.opendaylight.yangtools</groupId> <artifactId>yang-data-codec-xml</artifactId> <version>${org.opendaylight.yangtools.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.1</version> </dependency> <!-- LOG4J --> <dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.6.1</version> </dependency> </dependencies> |
Documentation Code Updates
...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
YangTextSchemaSourceFile sourcefile = YangTextSchemaSource.forFile(new File("/example.yang"classLoader.getResource(fileName).getFile()); StatementStreamSourceYangTextSchemaSource yangModuleSourcesource = YangStatementStreamSourceYangTextSchemaSource.createforFile(sourcefile); CrossSourceStatementReactor.BuildAction reactor = defaultReactor().newBuild(); final YangParser yangParser = reactorPARSER_FACTORY.addSource(yangModuleSourcecreateParser(StatementParserMode.DEFAULT_MODE); SchemaContext schemaContext = reactor.buildEffective(yangParser.addSource(source); SchemaContext Set<Module> modulesschemaContext = schemaContextyangParser.getModulesbuildEffectiveModel(); Set<DataSchemaNode> dataSchemaNodes = schemaContext.getDataDefinitionsgetModules(); |
This is the kind of object (module) that gets created:
...