+ return buildEffective();
+ }
+
+ /**
+ * @deprecated This method was never used and relies on deprecated module methods.
+ */
+ @Deprecated
+ public Map<File, Module> buildEffectiveMappedToSource(final List<File> yangFiles) throws SourceException,
+ ReactorException, FileNotFoundException {
+ if (yangFiles == null || yangFiles.isEmpty()) {
+ return Collections.emptyMap();
+ }
+
+ Map<String, File> pathToFile = new HashMap<>();
+ Map<File, Module> sourceFileToModule = new HashMap<>();
+
+ for (File yangFile : yangFiles) {
+ addSource(new YangStatementSourceImpl(new NamedFileInputStream(yangFile, yangFile.getPath())));
+ pathToFile.put(yangFile.getPath(), yangFile);
+ }
+
+ EffectiveSchemaContext schema = buildEffective();
+ Set<Module> modules = schema.getModules();
+ for (Module module : modules) {
+ sourceFileToModule.put(pathToFile.get(module.getModuleSourcePath()), module);
+ }
+
+ return sourceFileToModule;
+ }
+ }