-
- public static SchemaContext loadSchemaContext(String resourceDirectory)
- throws SourceException, ReactorException, FileNotFoundException,
- URISyntaxException {
- return parseYangSources(loadFiles(resourceDirectory));
- }
-
- public static SchemaContext parseYangSources(Collection<File> testFiles)
- throws SourceException, ReactorException, FileNotFoundException {
- CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR
- .newBuild();
- for (File testFile : testFiles) {
- reactor.addSource(new YangStatementSourceImpl(
- new NamedFileInputStream(testFile, testFile.getPath())));
- }
-
- return reactor.buildEffective();
- }