...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
YangTextSchemaSource source = YangTextSchemaSource.forFile(new File("/example.yang")); StatementStreamSource yangModuleSource = YangStatementStreamSource.create(source); CrossSourceStatementReactor.BuildAction reactor = defaultReactor().newBuild(); reactor.addSource(yangModuleSource); SchemaContext schemaContext = reactor.buildEffective(); Set<Module> modules = schemaContext.getModules(); Set<DataSchemaNode> dataSchemaNodes = schemaContext.getDataDefinitions(); |
This is the kind of object (module) that gets created: