001/*
002 *  Copyright 2018 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.cms.data;
017
018/**
019 * Class containing geographic coordinates
020 */
021public class Geocode
022{
023    /** The longitude identifier */
024    public static final String LONGITUDE_IDENTIFIER = "longitude";
025    /** The latitude identifier */
026    public static final String LATITUDE_IDENTIFIER = "latitude";
027    
028    private Double _longitude;
029    private Double _latitude;
030    
031    /**
032     * Constructs a Geocode
033     * @param longitude the longitude of the geocode
034     * @param latitude the latitude of the geocode
035     */
036    public Geocode(Double longitude, Double latitude)
037    {
038        _longitude = longitude;
039        _latitude = latitude;
040    }
041    
042    /**
043     * Retrieves the longitude
044     * @return the longitude
045     */
046    public Double getLongitude()
047    {
048        return _longitude;
049    }
050    
051    /**
052     * Retrieves the latitude
053     * @return the latitude
054     */
055    public Double getLatitude()
056    {
057        return _latitude;
058    }
059}