public void initialize() { DataSourceService dataSourceService = dataSourceManager.getDataSourceService(); for (DataSource dataSource : dataSourceService.getDataSources()) { mapFiles.add(new MapFiles(dataSource)); } }
public synchronized void initialize() { hgtFiles.clear(); for (DataSource dataSource : dataSourceManager.getDataSourceService().getDataSources()) { if (DATASOURCE_URIS.contains(dataSource.getId())) hgtFiles.add(new HgtFiles(dataSource, dataSourceManager.getDownloadManager())); } }
private void configureRoutingServices() { DataSource brouterProfiles = getDataSourceManager().getDataSourceService().getDataSourceById("brouter-profiles"); DataSource brouterSegments = getDataSourceManager().getDataSourceService().getDataSourceById("brouter-segments-4"); if (brouterProfiles != null && brouterSegments != null) { BRouter router = getRoutingServiceFacade().getRoutingService(BRouter.class); router.setProfilesAndSegments(brouterProfiles, brouterSegments); } DataSource graphhopper = getDataSourceManager().getDataSourceService().getDataSourceById("graphhopper"); if (graphhopper != null) { GraphHopper hopper = getRoutingServiceFacade().getRoutingService(GraphHopper.class); hopper.setDataSource(graphhopper); } }
public void sendChecksums(final Download download) { final DataSource dataSource = RouteConverter.getInstance().getDataSourceManager(). getDataSourceService().getDataSourceByUrlPrefix(download.getUrl()); if (dataSource == null) { return; } final Map<FileAndChecksum, List<FileAndChecksum>> fileToFragments = new HashMap<>(); fileToFragments.put(download.getFile(), download.getFragments()); getRouteServiceOperator().executeOperation(new RouteServiceOperator.Operation() { public String getName() { return "SendChecksums"; } public void run() throws IOException { getRouteServiceOperator().getRouteFeedback().sendChecksums(dataSource, fileToFragments, download.getUrl()); } }); }