001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data; 003 004import java.awt.geom.Area; 005import java.util.Collection; 006import java.util.List; 007 008/** 009 * Generic data, holding data downloaded from various data sources. 010 * @since 7575 011 */ 012public interface Data { 013 014 /** 015 * Returns the collection of data sources. 016 * @return the collection of data sources. 017 */ 018 Collection<DataSource> getDataSources(); 019 020 /** 021 * Returns the total area of downloaded data (the "yellow rectangles"). 022 * @return Area object encompassing downloaded data. 023 */ 024 Area getDataSourceArea(); 025 026 /** 027 * <p>Replies the list of data source bounds.</p> 028 * 029 * <p>Dataset maintains a list of data sources which have been merged into the 030 * data set. Each of these sources can optionally declare a bounding box of the 031 * data it supplied to the dataset.</p> 032 * 033 * <p>This method replies the list of defined (non {@code null}) bounding boxes.</p> 034 * 035 * @return the list of data source bounds. An empty list, if no non-null data source 036 * bounds are defined. 037 */ 038 List<Bounds> getDataSourceBounds(); 039}