protected Neo4jGraph(final Configuration configuration) { this.configuration.copy(configuration); final String directory = this.configuration.getString(CONFIG_DIRECTORY); final Map neo4jSpecificConfig = ConfigurationConverter.getMap(this.configuration.subset(CONFIG_CONF)); this.baseGraph = Neo4jFactory.Builder.open(directory, neo4jSpecificConfig); this.initialize(this.baseGraph, configuration); }
/** * Answer if local configuration contains a value for specified property. * * @return True if local configuration has value for configProperty. */ public synchronized boolean isLocalValuePresent(ConfigProperty configProperty) { checkArgument(configProperty != null, "Config property cannot be null"); String value = baseConfig.getString(configProperty.getName()); return value != null; }
/** * Returns only the local configuration values associated with the Local Config. Used for logging/reporting. * * @return The local configuration property name/values as map. */ public synchronized Map<String, String> getLocalConfigValues() { Map<String, String> result = new HashMap<String, String>(); Iterator<String> iter = baseConfig.getKeys(); while (iter.hasNext()) { String key = iter.next(); result.put(key, baseConfig.getString(key)); } return result; }
/** * Returns a logger configuration property <b>String</b> value based off the {@link LoggerProperties} * * @param property * String The Property Name * @return The configuration property <b>String</b> values */ public static String getConfigProperty(LoggerProperties property) { return LoggerConfig.getConfig().getString(property.getName()); } }
/** * Returns a logger configuration property <b>String</b> value based off the {@link LoggerProperties} * * @param property * String The Property Name * @return The configuration property <b>String</b> values */ public static String getConfigProperty(LoggerProperties property) { return LoggerConfig.getConfig().getString(property.getName()); } }
protected Neo4jGraph(final Configuration configuration) { this.configuration.copy(configuration); final String directory = this.configuration.getString(CONFIG_DIRECTORY); final Map neo4jSpecificConfig = ConfigurationConverter.getMap(this.configuration.subset(CONFIG_CONF)); this.baseGraph = Neo4jFactory.Builder.open(directory, neo4jSpecificConfig); this.initialize(this.baseGraph, configuration); }
/** * Get the configuration property value for configProperty. * * @param configProperty * The configuration property value to get * * @return The configuration property value or null if property does not exit. */ public synchronized String getConfigProperty(Config.ConfigProperty configProperty) { SeLionLogger.getLogger().entering(configProperty); checkArgument(configProperty != null, "Config property cannot be null"); // Search locally then query SeLionConfig if not found String propValue = null; if (baseConfig.containsKey(configProperty.getName())) { propValue = baseConfig.getString(configProperty.getName()); } if (StringUtils.isBlank(propValue)) { propValue = Config.getConfigProperty(configProperty); } SeLionLogger.getLogger().exiting(propValue); return propValue; }