/** * registers bunch of schemas located in the schemaUri folder * * @param modelsUri String; the folder containing schemas to register * @throws BagriException in case of any error */ //@Override public void registerModels(String modelsUri) throws BagriException { XSImplementation impl = (XSImplementation) new DOMXSImplementationSourceImpl().getDOMImplementation("XS-Loader LS"); XSLoader schemaLoader = impl.createXSLoader(null); java.nio.file.Path catalog = Paths.get(modelsUri); List<String> files = new ArrayList<>(); processCatalog(catalog, files); if (files.size() > 0) { StringList schemas = impl.createStringList(files.toArray(new String[files.size()])); XSModel schema = schemaLoader.loadURIList(schemas); processModel(schema); } }