001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.osm;
003
004import org.openstreetmap.josm.data.Bounds;
005import org.openstreetmap.josm.tools.CheckParameterUtil;
006
007/**
008 * A data source, defined by bounds and textual description for the origin.
009 * @since 247
010 */
011public class DataSource {
012    /**
013     * The bounds of this data source
014     */
015    public final Bounds bounds;
016    /**
017     * The textual description of the origin (example: "OpenStreetMap Server")
018     */
019    public final String origin;
020
021    /**
022     * Constructs a new {@code DataSource}.
023     * @param bounds The bounds of this data source
024     * @param origin The textual description of the origin (example: "OpenStreetMap Server")
025     * @throws IllegalArgumentException if bounds is {@code null}
026     */
027    public DataSource(Bounds bounds, String origin) {
028        CheckParameterUtil.ensureParameterNotNull(bounds, "bounds");
029        this.bounds = bounds;
030        this.origin = origin;
031    }
032}