configurableNames.add(configurableName);
// Determine the updater
Preferences prefs = config.node(configurableName);
String type = prefs.get("type", null);
GraphUpdater updater = null;
if (type != null) {
if (type.equals("bike-rental")) {
updater = new BikeRentalUpdater();
}
else if (type.equals("bike-park")) {
updater = new BikeParkUpdater();
}
else if (type.equals("stop-time-updater")) {
updater = new PollingStoptimeUpdater();
}
else if (type.equals("websocket-gtfs-rt-updater")) {
updater = new WebsocketGtfsRealtimeUpdater();
}
else if (type.equals("real-time-alerts")) {
updater = new GtfsRealtimeAlertsUpdater();
}
else if (type.equals("example-updater")) {
updater = new ExampleGraphUpdater();
}
else if (type.equals("example-polling-updater")) {
updater = new ExamplePollingGraphUpdater();
}
}
// Configure and activate the updaters
try {
// Check whether no updater type was found
if (updater == null) {
LOG.error("Unknown updater type: " + type);
}
else {
// Add manager as parent
updater.setGraphUpdaterManager(updaterManager);
// Configure updater if found and necessary
if (updater instanceof PreferencesConfigurable) {
((PreferencesConfigurable) updater).configure(graph, prefs);
}