com.citygrid.content.places.detail
Class CGPlacesDetail
java.lang.Object
com.citygrid.content.places.detail.CGPlacesDetail
- All Implemented Interfaces:
- Serializable, Cloneable
public class CGPlacesDetail
- extends Object
- implements Serializable, Cloneable
A builder for invoking the CityGrid Places Detail API as documented
at http://docs.citygridmedia.com/display/citygridv2/Places+API.
Once user have selected a place from results returned by CGPlacesSearch
,
we will display the full location data of this place. We will use the location ID returned from the search.
CGPlacesDetail detail = CityGrid.placesDetail();
detail.setLocationId(295889);
detail.setPlacement("search_page");
CGPlacesDetailResults results = detail.detail();
for (CGPlacesDetailLocation location : results.getLocations()) {
assertDetailLocation(location, parent);
}
Once you have the detail location, you can convenient track the location is displayed.
See CGPlacesSearch
for code sample.
- See Also:
- Serialized Form
CGPlacesDetailUri
public static final String CGPlacesDetailUri
- See Also:
- Constant Field Values
publisher
private String publisher
locationId
private int locationId
infoUsaId
private int infoUsaId
phone
private String phone
customerOnly
private boolean customerOnly
allResults
private boolean allResults
reviewCount
private int reviewCount
placement
private String placement
connectTimeout
private int connectTimeout
readTimeout
private int readTimeout
impressionId
private String impressionId
publicId
private String publicId
CGPlacesDetail
public CGPlacesDetail(String publisher)
placesDetail
public static CGPlacesDetail placesDetail()
placesDetailWithPublisher
public static CGPlacesDetail placesDetailWithPublisher(String publisher)
placesDetailWithPlacement
public static CGPlacesDetail placesDetailWithPlacement(String placement)
placesDetailWithPublisherAndPlacement
public static CGPlacesDetail placesDetailWithPublisherAndPlacement(String publisher,
String placement)
detail
public CGPlacesDetailResults detail()
throws CGException
- Throws:
CGException
validate
private List<CGError> validate()
build
private Map<String,Object> build()
processLocation
private CGPlacesDetailLocation processLocation(org.codehaus.jackson.JsonNode locationNode)
processImages
private CGPlacesDetailImage[] processImages(org.codehaus.jackson.JsonNode imagesNode)
processReviewsInfo
private CGPlacesDetailReviews processReviewsInfo(org.codehaus.jackson.JsonNode reviewsInfoNode)
processReviews
private CGBaseReview[] processReviews(org.codehaus.jackson.JsonNode parsedReviews)
processEditorials
private CGPlacesDetailEditorial[] processEditorials(org.codehaus.jackson.JsonNode editorialsNode)
processTips
private CGPlacesDetailTip[] processTips(org.codehaus.jackson.JsonNode parsedTips)
processAttributes
private CGPlacesDetailAttribute[] processAttributes(org.codehaus.jackson.JsonNode parsedAttributes)
processCategories
private CGPlacesDetailCategory[] processCategories(org.codehaus.jackson.JsonNode parsedCategories)
processGroups
private CGPlacesDetailGroup[] processGroups(org.codehaus.jackson.JsonNode parsedGroups)
processOffers
private CGPlacesDetailOffer[] processOffers(org.codehaus.jackson.JsonNode parsedOffers)
processCustomerContent
private CGPlacesDetailCustomerContent processCustomerContent(org.codehaus.jackson.JsonNode parsedCustomerContent)
processCustomerMessage
private CGPlacesDetailCustomerMessage processCustomerMessage(org.codehaus.jackson.JsonNode parsedCustomerMessage)
processUrls
private CGPlacesDetailUrls processUrls(org.codehaus.jackson.JsonNode parsedUrls,
String impressionId)
processResults
CGPlacesDetailResults processResults(org.codehaus.jackson.JsonNode rootNode)
getPublisher
public String getPublisher()
setPublisher
public void setPublisher(String publisher)
getLocationId
public int getLocationId()
setLocationId
public void setLocationId(int locationId)
getInfoUsaId
public int getInfoUsaId()
setInfoUsaId
public void setInfoUsaId(int infoUsaId)
getPublicId
public String getPublicId()
setPublicId
public void setPublicId(String publicId)
getPhone
public String getPhone()
setPhone
public void setPhone(String phone)
isCustomerOnly
public boolean isCustomerOnly()
setCustomerOnly
public void setCustomerOnly(boolean customerOnly)
isAllResults
public boolean isAllResults()
setAllResults
public void setAllResults(boolean allResults)
getReviewCount
public int getReviewCount()
setReviewCount
public void setReviewCount(int reviewCount)
getPlacement
public String getPlacement()
setPlacement
public void setPlacement(String placement)
getConnectTimeout
public int getConnectTimeout()
setConnectTimeout
public void setConnectTimeout(int connectTimeout)
getReadTimeout
public int getReadTimeout()
setReadTimeout
public void setReadTimeout(int readTimeout)
getImpressionId
public String getImpressionId()
setImpressionId
public void setImpressionId(String impressionId)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
clone
public Object clone()
throws CloneNotSupportedException
- Overrides:
clone
in class Object
- Throws:
CloneNotSupportedException
Copyright © 2011. All Rights Reserved.