Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
themeFadeToGreyMidnight
titleCorrected Code
linenumberstrue
collapsetrue
        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();

...