/** * Gets the complete bundled database configuration set. This is * useful in building the SchemaCrawler options. */ public final Config getConfig() { if (configResource == null) { return new Config(); } return PropertiesUtility.loadConfig(configResource); }
/** * Loads a properties file. * * @param inputResource * Config resource. * @return Config */ public static Config loadConfig(final InputResource inputResource) { final Properties properties = loadProperties(inputResource); return new Config(properties); }
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }
public static DatabaseObjectColorMap initialize(final boolean noColors) { final Properties properties = new Properties(); if (noColors) { return new DatabaseObjectColorMap(properties, noColors); } // Load from classpath and also current directory, in that order try { final ClasspathInputResource classpathColorMap = new ClasspathInputResource("/" + SCHEMACRAWLER_COLORMAP_PROPERTIES); properties.putAll(loadProperties(classpathColorMap)); } catch (final IOException e) { LOGGER.log(Level.CONFIG, "Could not load color map from CLASSPATH"); } try { final FileInputResource fileColorMap = new FileInputResource(Paths .get("./" + SCHEMACRAWLER_COLORMAP_PROPERTIES)); properties.putAll(loadProperties(fileColorMap)); } catch (final IOException e) { LOGGER.log(Level.CONFIG, "Could not load color map from file"); } return new DatabaseObjectColorMap(properties, noColors); }
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }
/** * Loads a properties file. * * @param inputResource * Config resource. * @return Config */ public static Config loadConfig(final InputResource inputResource) { final Properties properties = loadProperties(inputResource); return new Config(properties); }
.loadConfig(new ClasspathInputResource("/schemacrawler.config.properties")));
/** * Loads a properties file. * * @param inputResource * Config resource. * @return Config */ public static Config loadConfig(final InputResource inputResource) { final Properties properties = loadProperties(inputResource); return new Config(properties); }
/** * Gets the complete bundled database configuration set. This is * useful in building the SchemaCrawler options. */ public final Config getConfig() { if (configResource == null) { return new Config(); } return PropertiesUtility.loadConfig(configResource); }
public static DatabaseObjectColorMap initialize(final boolean noColors) { final Properties properties = new Properties(); if (noColors) { return new DatabaseObjectColorMap(properties, noColors); } // Load from classpath and also current directory, in that order try { final ClasspathInputResource classpathColorMap = new ClasspathInputResource("/" + SCHEMACRAWLER_COLORMAP_PROPERTIES); properties.putAll(loadProperties(classpathColorMap)); } catch (final IOException e) { LOGGER.log(Level.CONFIG, "Could not load color map from CLASSPATH"); } try { final FileInputResource fileColorMap = new FileInputResource(Paths .get("./" + SCHEMACRAWLER_COLORMAP_PROPERTIES)); properties.putAll(loadProperties(fileColorMap)); } catch (final IOException e) { LOGGER.log(Level.CONFIG, "Could not load color map from file"); } return new DatabaseObjectColorMap(properties, noColors); }
.loadConfig(new ClasspathInputResource("/schemacrawler.config.properties")));
public static DatabaseObjectColorMap initialize(final boolean noColors) { final Properties properties = new Properties(); if (noColors) { return new DatabaseObjectColorMap(properties, noColors); } // Load from classpath and also current directory, in that order try { final ClasspathInputResource classpathColorMap = new ClasspathInputResource("/" + SCHEMACRAWLER_COLORMAP_PROPERTIES); properties.putAll(loadProperties(classpathColorMap)); } catch (final IOException e) { LOGGER.log(Level.CONFIG, "Could not load color map from CLASSPATH"); } try { final FileInputResource fileColorMap = new FileInputResource(Paths .get("./" + SCHEMACRAWLER_COLORMAP_PROPERTIES)); properties.putAll(loadProperties(fileColorMap)); } catch (final IOException e) { LOGGER.log(Level.CONFIG, "Could not load color map from file"); } return new DatabaseObjectColorMap(properties, noColors); }
/** * Gets the complete bundled database configuration set. This is * useful in building the SchemaCrawler options. */ public final Config getConfig() { if (configResource == null) { return new Config(); } return PropertiesUtility.loadConfig(configResource); }
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }
.loadConfig(new ClasspathInputResource("/schemacrawler.config.properties")));
.loadConfig(new ClasspathInputResource("/schemacrawler.config.properties")));