/** * Build a private {@link Catalog}, that is, not the static instance that {@link CatalogManager} * returns by default. * * <p>Care must be taken to use only private {@link Catalog} instances if there will ever be * more than one OASIS Catalog used in a single class loader (i.e. a single maven test run), * otherwise {@link Catalog} contents will be an amalgam of the entries of both OASIS Catalog * files, with likely unintended or incorrect results. See GEOT-2497. * * @param catalogLocation URL of OASIS Catalog * @return a private Catalog */ static Catalog buildPrivateCatalog(URL catalogLocation) { CatalogManager catalogManager = new CatalogManager(); catalogManager.setUseStaticCatalog(false); catalogManager.setVerbosity(0); catalogManager.setIgnoreMissingProperties(true); Catalog catalog = catalogManager.getCatalog(); try { catalog.parseCatalog(catalogLocation); } catch (IOException e) { throw new RuntimeException( "Error trying to load OASIS catalog from URL " + catalogLocation.toString(), e); } return catalog; }
/** Initialize catalog */ private void initializeCatalogs(boolean privateCatalog) { catalog = catalogManager.getCatalog(); }
/** Initialize catalog */ private void initializeCatalogs(boolean privateCatalog) { catalog = catalogManager.getCatalog(); }
/** Initialize catalog */ private void initializeCatalogs(boolean privateCatalog) { catalog = catalogManager.getCatalog(); }
/** * Loads mappings from configuration file */ private void init() { if (log.isDebugEnabled()) { log.debug("init catalog file " + this.catalogFileURI); } manager.setUseStaticCatalog(false); manager.setCatalogFiles(this.catalogFileURI.toString()); manager.setIgnoreMissingProperties(true); catalog = manager.getCatalog(); }