Bookmark.java :  » App » geopaparazzi » eu » hydrologis » geopaparazzi » util » Android Open Source

Android Open Source » App » geopaparazzi 
geopaparazzi » eu » hydrologis » geopaparazzi » util » Bookmark.java
/*
 * Geopaparazzi - Digital field mapping on Android based devices
 * Copyright (C) 2010  HydroloGIS (www.hydrologis.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package eu.hydrologis.geopaparazzi.util;

/**
 * Represents a bookmark.
 * 
 * @author Andrea Antonello (www.hydrologis.com)
 */
public class Bookmark {
    private String name;
    private double lon;
    private double lat;
    private long id;
    private double zoom;
    private double north;
    private double south;
    private double west;
    private double east;

    /**
     * A wrapper for a Bookmark.
     * 
     * @param id 
     * @param name the name of the Bookmark.
     * @param lon
     * @param lat
     */
    public Bookmark( long id, String name, double lon, double lat ) {
        this.id = id;
        if (name != null) {
            this.name = name;
        } else {
            this.name = ""; //$NON-NLS-1$
        }
        this.lon = lon;
        this.lat = lat;
    }

    public Bookmark( long id, String name, double lon, double lat, double zoom, double north, double south, double west,
            double east ) {
        this.id = id;
        this.zoom = zoom;
        this.north = north;
        this.south = south;
        this.west = west;
        this.east = east;
        if (name != null) {
            this.name = name;
        } else {
            this.name = ""; //$NON-NLS-1$
        }
        this.lon = lon;
        this.lat = lat;
    }

    public long getId() {
        return id;
    }

    public double getLat() {
        return lat;
    }

    public double getLon() {
        return lon;
    }

    public String getName() {
        return name;
    }

    public double getZoom() {
        return zoom;
    }

    public double getNorth() {
        return north;
    }

    public double getSouth() {
        return south;
    }

    public double getWest() {
        return west;
    }

    public double getEast() {
        return east;
    }

    public String toString() {
        return "Bookmark [name=" + name + ", lon=" + lon + ", lat=" + lat + ", id=" + id + ", zoom=" + zoom + ", north=" + north
                + ", south=" + south + ", west=" + west + ", east=" + east + "]";
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.