Package org.opentripplanner.updater

Examples of org.opentripplanner.updater.GraphUpdater


                    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);
                            }
View Full Code Here

TOP

Related Classes of org.opentripplanner.updater.GraphUpdater

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.