// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/Place.java
// public class Place {
// 
//     private final String id;
// 
//     private final String name;
// 
//     private final String fullName;
// 
//     private final String streetAddress;
// 
//     private final String country;
// 
//     private final String countryCode;
// 
//     private final PlaceType placeType;
// 
//     public Place(String id, String name, String fullName, String streetAddress, String country, String countryCode,
//                  PlaceType placeType) {
//         this.id = id;
//         this.name = name;
//         this.fullName = fullName;
//         this.country = country;
//         this.streetAddress = streetAddress;
//         this.countryCode = countryCode;
//         this.placeType = placeType;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getFullName() {
//         return fullName;
//     }
// 
//     public String getStreetAddress() {
//         return streetAddress;
//     }
// 
//     public String getCountry() {
//         return country;
//     }
// 
//     public String getCountryCode() {
//         return countryCode;
//     }
// 
//     public PlaceType getPlaceType() {
//         return placeType;
//     }
// 
// }
// 
// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/PlacePrototype.java
// public class PlacePrototype {
// 
//     private final double latitude;
// 
//     private final double longitude;
// 
//     private final String name;
// 
//     private final String containedWithin;
// 
//     private final String createToken;
// 
//     private final String streetAddress;
// 
//     public PlacePrototype(String createToken, double latitude, double longitude, String name, String streetAddress,
//                           String containedWithin) {
//         this.createToken = createToken;
//         this.latitude = latitude;
//         this.longitude = longitude;
//         this.name = name;
//         this.streetAddress = streetAddress;
//         this.containedWithin = containedWithin;
//     }
// 
//     public double getLatitude() {
//         return latitude;
//     }
// 
//     public double getLongitude() {
//         return longitude;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getStreetAddress() {
//         return streetAddress;
//     }
// 
//     public String getContainedWithin() {
//         return containedWithin;
//     }
// 
//     public String getCreateToken() {
//         return createToken;
//     }
// }
// 
// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/PlaceType.java
// public enum PlaceType {
// 
//     POINT_OF_INTEREST, NEIGHBORHOOD, CITY, ADMIN, COUNTRY
// 
// }
// 
// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/SimilarPlaces.java
// @SuppressWarnings("serial")
// public class SimilarPlaces extends ArrayList<Place> {
// 
//     private final PlacePrototype placePrototype;
// 
//     public SimilarPlaces(List<Place> places, PlacePrototype placePrototype) {
//         super(places);
//         this.placePrototype = placePrototype;
//     }
// 
//     /**
//      * A prototype place that matches the criteria for the call to
//      * {@link TwitterGeoService#findSimilarPlaces(double, double, String)}, including a create token that can be used to create
//      * the place.
//      */
//     public PlacePrototype getPlacePrototype() {
//         return placePrototype;
//     }
// 
// }


import org.agorava.twitter.model.Place;
import org.agorava.twitter.model.PlacePrototype;
import org.agorava.twitter.model.PlaceType;
import org.agorava.twitter.model.SimilarPlaces;
import java.util.List;
/*
 * Copyright 2013 Agorava
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.agorava.twitter;



/**
 * Interface defining the Twitter operations for working with locations.
 *
 * @author Craig Walls
 * @author Antoine Sabot-Durand
 */
public interface TwitterGeoService {

    /**
     * Retrieves information about a place
     *
     * @param id the place ID
     * @return a {@link Place}
     * @throws ApiException if there is an error while communicating with Twitter.
     */
    Place getPlace(String id);

    /**
     * Retrieves up to 20 places matching the given location.
     *
     * @param latitude  the latitude
     * @param longitude the longitude
     * @return a list of {@link Place}s that the point is within
     * @throws ApiException if there is an error while communicating with Twitter.
     */
    List<Place> reverseGeoCode(double latitude, double longitude);

    /**
     * Retrieves up to 20 places matching the given location and criteria
     *
     * @param latitude    the latitude
     * @param longitude   the longitude
     * @param granularity the minimal granularity of the places to return. If null, the default granularity (neighborhood) is
     *                    assumed.
     * @param accuracy    a radius of accuracy around the given point. If given a number,
     *                    the value is assumed to be in meters. The
     *                    number may be qualified with "ft" to indicate feet. If null, the default accuracy (0m) is assumed.
     * @return a list of {@link Place}s that the point is within
     * @throws ApiException if there is an error while communicating with Twitter.
     */
// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/Place.java
// public class Place {
// 
//     private final String id;
// 
//     private final String name;
// 
//     private final String fullName;
// 
//     private final String streetAddress;
// 
//     private final String country;
// 
//     private final String countryCode;
// 
//     private final PlaceType placeType;
// 
//     public Place(String id, String name, String fullName, String streetAddress, String country, String countryCode,
//                  PlaceType placeType) {
//         this.id = id;
//         this.name = name;
//         this.fullName = fullName;
//         this.country = country;
//         this.streetAddress = streetAddress;
//         this.countryCode = countryCode;
//         this.placeType = placeType;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getFullName() {
//         return fullName;
//     }
// 
//     public String getStreetAddress() {
//         return streetAddress;
//     }
// 
//     public String getCountry() {
//         return country;
//     }
// 
//     public String getCountryCode() {
//         return countryCode;
//     }
// 
//     public PlaceType getPlaceType() {
//         return placeType;
//     }
// 
// }
// 
// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/PlacePrototype.java
// public class PlacePrototype {
// 
//     private final double latitude;
// 
//     private final double longitude;
// 
//     private final String name;
// 
//     private final String containedWithin;
// 
//     private final String createToken;
// 
//     private final String streetAddress;
// 
//     public PlacePrototype(String createToken, double latitude, double longitude, String name, String streetAddress,
//                           String containedWithin) {
//         this.createToken = createToken;
//         this.latitude = latitude;
//         this.longitude = longitude;
//         this.name = name;
//         this.streetAddress = streetAddress;
//         this.containedWithin = containedWithin;
//     }
// 
//     public double getLatitude() {
//         return latitude;
//     }
// 
//     public double getLongitude() {
//         return longitude;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getStreetAddress() {
//         return streetAddress;
//     }
// 
//     public String getContainedWithin() {
//         return containedWithin;
//     }
// 
//     public String getCreateToken() {
//         return createToken;
//     }
// }
// 
// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/PlaceType.java
// public enum PlaceType {
// 
//     POINT_OF_INTEREST, NEIGHBORHOOD, CITY, ADMIN, COUNTRY
// 
// }
// 
// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/model/SimilarPlaces.java
// @SuppressWarnings("serial")
// public class SimilarPlaces extends ArrayList<Place> {
// 
//     private final PlacePrototype placePrototype;
// 
//     public SimilarPlaces(List<Place> places, PlacePrototype placePrototype) {
//         super(places);
//         this.placePrototype = placePrototype;
//     }
// 
//     /**
//      * A prototype place that matches the criteria for the call to
//      * {@link TwitterGeoService#findSimilarPlaces(double, double, String)}, including a create token that can be used to create
//      * the place.
//      */
//     public PlacePrototype getPlacePrototype() {
//         return placePrototype;
//     }
// 
// }


// Path: agorava-twitter-api/src/main/java/org/agorava/twitter/TwitterGeoService.java
import org.agorava.twitter.model.Place;
import org.agorava.twitter.model.PlacePrototype;
import org.agorava.twitter.model.PlaceType;
import org.agorava.twitter.model.SimilarPlaces;
import java.util.List;

/*
 * Copyright 2013 Agorava
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.agorava.twitter;



/**
 * Interface defining the Twitter operations for working with locations.
 *
 * @author Craig Walls
 * @author Antoine Sabot-Durand
 */
public interface TwitterGeoService {

    /**
     * Retrieves information about a place
     *
     * @param id the place ID
     * @return a {@link Place}
     * @throws ApiException if there is an error while communicating with Twitter.
     */
    Place getPlace(String id);

    /**
     * Retrieves up to 20 places matching the given location.
     *
     * @param latitude  the latitude
     * @param longitude the longitude
     * @return a list of {@link Place}s that the point is within
     * @throws ApiException if there is an error while communicating with Twitter.
     */
    List<Place> reverseGeoCode(double latitude, double longitude);

    /**
     * Retrieves up to 20 places matching the given location and criteria
     *
     * @param latitude    the latitude
     * @param longitude   the longitude
     * @param granularity the minimal granularity of the places to return. If null, the default granularity (neighborhood) is
     *                    assumed.
     * @param accuracy    a radius of accuracy around the given point. If given a number,
     *                    the value is assumed to be in meters. The
     *                    number may be qualified with "ft" to indicate feet. If null, the default accuracy (0m) is assumed.
     * @return a list of {@link Place}s that the point is within
     * @throws ApiException if there is an error while communicating with Twitter.
     */
    List<Place> reverseGeoCode(double latitude, double longitude, PlaceType granularity, String accuracy);