...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
YangTextSchemaSource source = YangTextSchemaSource.forFile(new File("C:\\tmp\\yang\\CM-NOTIFY-API.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(); |
...