public class Place extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Place() |
| Modifier and Type | Method and Description |
|---|---|
protected Place |
addAddressComponents(Collection<AddressComponent> c)
Adds a collection of address components to this place.
|
protected Place |
addAltIds(Collection<AltId> altIds)
Adds a collection of
AltIds. |
protected Place |
addPhotos(Collection<Photo> photos)
Adds a collection of photos to this place.
|
protected Place |
addReviews(Collection<Review> reviews)
Adds a collection of reviews to this place.
|
protected Place |
addTypes(Collection<String> types)
Adds a collection of string "types".
|
Place |
downloadIcon()
Downloads the icon to this place.
|
boolean |
equals(Object obj) |
int |
getAccuracy()
Returns the accuracy of the location, expressed in meters.
|
String |
getAddress()
Returns the address of this place.
|
List<AddressComponent> |
getAddressComponents()
Returns the address components for this place.
|
List<AltId> |
getAltIds()
Returns all of this place's alt-ids in an unmodifiable list.
|
GooglePlaces |
getClient()
Returns the client associated with this Place object.
|
Place |
getDetails(Param... params)
Returns an updated Place object with more details than the Place object returned in an initial query.
|
String |
getGoogleUrl()
Returns the Google PLus page for this place.
|
Hours |
getHours()
Returns the
Hours for this place. |
BufferedImage |
getIconImage()
Returns the icon image.
|
InputStream |
getIconInputStream()
Returns the input stream of this place.
|
String |
getIconUrl()
Returns the url of the icon to represent this place.
|
String |
getInternationalPhoneNumber()
Returns the place's phone number with a country code.
|
org.json.JSONObject |
getJson()
Returns the JSON representation of this place.
|
String |
getLanguage()
Returns the language of the place.
|
double |
getLatitude()
Returns the latitude of the place.
|
double |
getLongitude()
Returns the longitude of this place.
|
String |
getName()
Returns the name of this place.
|
String |
getPhoneNumber()
Returns this Place's phone number.
|
List<Photo> |
getPhotos()
Returns the photo references for this place.
|
String |
getPlaceId()
Returns the unique identifier for this place.
|
Price |
getPrice()
Returns the
Price of this place. |
double |
getRating()
Returns the rating of this place.
|
List<Review> |
getReviews()
Returns this place's reviews in an unmodifiable list.
|
Scope |
getScope()
Returns the scope of this place.
|
Status |
getStatus()
Returns the
Status of this place. |
List<String> |
getTypes()
Returns all of this place's types in an unmodifiable list.
|
int |
getUtcOffset()
Returns the amount of seconds this place is off from the UTC timezone.
|
String |
getVicinity()
Returns the "vicinity" the place is in.
|
String |
getWebsite()
Returns the website of this place.
|
boolean |
isAlwaysOpened()
Returns true if this place is always opened.
|
static Place |
parseDetails(GooglePlaces client,
String rawJson)
Parses a detailed Place object.
|
protected Place |
setAccuracy(int accuracy)
Sets the accuracy of the location, expressed in meters.
|
protected Place |
setAddress(String addr)
Sets the address of this place.
|
protected Place |
setClient(GooglePlaces client)
Sets the
GooglePlaces client associated with this Place object. |
protected Place |
setGoogleUrl(String googleUrl)
Sets the Google Plus page for this place.
|
protected Place |
setHours(Hours hours)
Sets the
Hours of this place. |
protected Place |
setIconUrl(String iconUrl)
Sets the url of the icon to represent this place.
|
protected Place |
setInternationalPhoneNumber(String internationalPhone)
Sets the phone number with an international country code.
|
protected Place |
setJson(org.json.JSONObject json)
Sets the JSON representation of this Place.
|
protected Place |
setLanguage(String lang)
Sets the language of the location.
|
protected Place |
setLatitude(double lat)
Sets the latitude of the place.
|
protected Place |
setLongitude(double lon)
Sets the longitude of this place.
|
protected Place |
setName(String name)
Sets the name of this place.
|
protected Place |
setPhoneNumber(String phone)
Sets this Place's phone number.
|
protected Place |
setPlaceId(String placeId)
Sets the unique, stable, identifier for this place.
|
protected Place |
setPrice(Price price)
Sets the
Price of this place. |
protected Place |
setRating(double rating)
Sets the rating of this place.
|
protected Place |
setScope(Scope scope)
Sets the scope of the location.
|
protected Place |
setStatus(Status status)
Sets the
Status of this place. |
protected Place |
setUtcOffset(int utcOffset)
Sets the amount of seconds this place is off from the UTC timezone.
|
protected Place |
setVicinity(String vicinity)
Sets the "vicinity" the place is in.
|
protected Place |
setWebsite(String website)
Sets the website url associated with this place.
|
String |
toString() |
public static Place parseDetails(GooglePlaces client, String rawJson)
client - api clientrawJson - json to parsepublic GooglePlaces getClient()
protected Place setClient(GooglePlaces client)
GooglePlaces client associated with this Place object.client - to setpublic String getPlaceId()
protected Place setPlaceId(String placeId)
placeId - to usepublic double getLatitude()
protected Place setLatitude(double lat)
lat - latitudepublic double getLongitude()
protected Place setLongitude(double lon)
lon - longitudepublic int getUtcOffset()
protected Place setUtcOffset(int utcOffset)
utcOffset - in secondsprotected Place setHours(Hours hours)
Hours of this place.hours - of operationpublic boolean isAlwaysOpened()
public String getPhoneNumber()
protected Place setPhoneNumber(String phone)
phone - numberpublic String getInternationalPhoneNumber()
protected Place setInternationalPhoneNumber(String internationalPhone)
internationalPhone - phone numberpublic String getGoogleUrl()
protected Place setGoogleUrl(String googleUrl)
googleUrl - google plus pagepublic String getWebsite()
protected Place setWebsite(String website)
website - of placepublic String getVicinity()
protected Place setVicinity(String vicinity)
vicinity - of placepublic String getIconUrl()
protected Place setIconUrl(String iconUrl)
iconUrl - to represent place.public Place downloadIcon()
public InputStream getIconInputStream()
downloadIcon() must be called previous to call this.public BufferedImage getIconImage()
downloadIcon() must be called previous to this.public String getName()
protected Place setName(String name)
name - of placepublic String getAddress()
protected Place setAddress(String addr)
addr - addressprotected Place addAddressComponents(Collection<AddressComponent> c)
c - components to addpublic List<AddressComponent> getAddressComponents()
protected Place addPhotos(Collection<Photo> photos)
photos - to addpublic List<Photo> getPhotos()
protected Place addReviews(Collection<Review> reviews)
reviews - to addpublic List<Review> getReviews()
protected Place addTypes(Collection<String> types)
types - to addpublic List<String> getTypes()
protected Place addAltIds(Collection<AltId> altIds)
AltIds.altIds - to addpublic List<AltId> getAltIds()
public double getRating()
protected Place setRating(double rating)
rating - of placeprotected Place setStatus(Status status)
Status of this place.status - to setprotected Place setPrice(Price price)
Price of this place.price - to setpublic org.json.JSONObject getJson()
protected Place setJson(org.json.JSONObject json)
json - representationpublic int getAccuracy()
protected Place setAccuracy(int accuracy)
accuracy - of locationpublic String getLanguage()
protected Place setLanguage(String lang)
lang - place languageprotected Place setScope(Scope scope)
scope - to setScopepublic Place getDetails(Param... params)
params - extra params to include in the request urlCopyright © 2014–2015. All rights reserved.