Package slash.navigation.download

Examples of slash.navigation.download.DownloadManager


    public HgtFilesService(DataSourceManager dataSourceManager) {
        this.dataSourceManager = dataSourceManager;
    }

    public void initialize() {
        DownloadManager downloadManager = dataSourceManager.getDownloadManager();
        DataSourceService dataSourceService = dataSourceManager.getDataSourceService();

        for (DataSource dataSource : dataSourceService.getDataSources()) {
            if (DATASOURCE_URIS.contains(dataSource.getId()))
                hgtFiles.add(new HgtFiles(dataSource, downloadManager));
View Full Code Here


    }

    @Test
    public void testElevationFor() throws IOException {
        HgtFiles files = new HgtFiles(createDataSource("test id", "test plain", "http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/", "test"),
                new DownloadManager(createTempFile("queueFile", ".xml")));
        files.downloadElevationDataFor(asList(new LongitudeAndLatitude(11.2, 59.0), new LongitudeAndLatitude(12.0, 60.2)));

        Double elevation1 = files.getElevationFor(11.2, 59.0);
        assertNotNull(elevation1);
        assertEquals(40, elevation1.intValue());
View Full Code Here

    }

    @Test
    public void testDownloadElevationDataInZipFile() throws IOException {
        HgtFiles files = new HgtFiles(createDataSource("test id", "test zip", "http://www.viewfinderpanoramas.org/dem3/", "test"),
                new DownloadManager(createTempFile("queueFile", ".xml")));
        files.downloadElevationDataFor(asList(new LongitudeAndLatitude(35.71, 32.51)));

        Double elevation1 = files.getElevationFor(35.71, 32.51);
        assertNotNull(elevation1);
        assertEquals(274, elevation1.intValue());
View Full Code Here

    private void initializeServices() {
        System.setProperty("rest", parseVersionFromManifest().getVersion());
        RouteFeedback routeFeedback = new RouteFeedback(System.getProperty("feedback", "http://www.routeconverter.com/feedback/"), RouteConverter.getInstance().getCredentials());
        routeServiceOperator = new RouteServiceOperator(getFrame(), routeFeedback);
        updateChecker = new UpdateChecker(routeFeedback);
        DownloadManager downloadManager = new DownloadManager(getDownloadQueueFile());
        downloadManager.addDownloadListener(new ChecksumSender());
        downloadManager.addDownloadListener(new DownloadNotifier());
        dataSourceManager = new DataSourceManager(downloadManager);
        hgtFilesService = new HgtFilesService(dataSourceManager);
        elevationServiceFacade = new ElevationServiceFacade();
    }
View Full Code Here

TOP

Related Classes of slash.navigation.download.DownloadManager

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.