public class PlaceRequest extends Request<Place>
Request
used to retrieve a Place
object by way of Places
search services.ExploreRequest
,
HereRequest
,
SearchRequest
BUILDING_ID_REFERENCE_NAME, PLACE_CONTENT_WIKIPEDIA, PVID_ID_REFERENCE_NAME, VENUES_CONTENT_ID_REFERENCE_NAME, VENUES_DESTINATION_ID_REFERENCE_NAME, VENUES_ID_REFERENCE_NAME, VENUES_VENUE_ID_REFERENCE_NAME
Constructor and Description |
---|
PlaceRequest(java.lang.String source,
java.lang.String id)
Creates a
PlaceRequest based on an external reference source and identifier. |
Modifier and Type | Method and Description |
---|---|
void |
addContent(java.lang.String placeContent)
Requests specific
EditorialMedia by providing one of the available place content
sources. |
void |
addImageDimensions(int width,
int height)
Request Image Media with specific dimensions.
|
PlaceRequest |
addReference(java.lang.String name)
This function adds the name of a requested reference identifiers to be returned in the
results.
|
ErrorCode |
execute(ResultListener<Place> listener)
Executes an asynchronous request.
|
java.util.Set<java.lang.String> |
getContent()
Returns the names of requested place content sources that was added
using
addContent(String) . |
java.util.List<java.lang.String> |
getReferences()
This function returns the names of requested reference identifiers to be returned in the
results.
|
RichTextFormatting |
getRichTextFormatting()
Gets the current
RichTextFormatting type being used in request responses. |
PlaceRequest |
setRichTextFormatting(RichTextFormatting value)
Sets a
RichTextFormatting to be used in request responses. |
public PlaceRequest(java.lang.String source, java.lang.String id)
PlaceRequest
based on an external reference source and identifier.source
- Name of the external reference source.id
- The identifier of the requested place in external system.addReference(String)
,
Request.PVID_ID_REFERENCE_NAME
,
Request.VENUES_ID_REFERENCE_NAME
,
Request.VENUES_CONTENT_ID_REFERENCE_NAME
,
Request.VENUES_DESTINATION_ID_REFERENCE_NAME
,
Request.VENUES_VENUE_ID_REFERENCE_NAME
,
PlaceLink.getReference(String)
,
Place.getReference(String)
public RichTextFormatting getRichTextFormatting()
RichTextFormatting
type being used in request responses.RichTextFormatting
typepublic PlaceRequest setRichTextFormatting(RichTextFormatting value)
RichTextFormatting
to be used in request responses. The default formatting is
RichTextFormatting.HTML
.value
- Desired RichTextFormatting
PlaceRequest
objectpublic PlaceRequest addReference(java.lang.String name)
BUILDING_ID_REFERENCE_NAME
.name
- Name of reference identifier to retrieve.public java.util.List<java.lang.String> getReferences()
public void addImageDimensions(int width, int height)
width
- Image width (pass 0 for any width)height
- Image height (pass 0 for any height)public void addContent(java.lang.String placeContent)
EditorialMedia
by providing one of the available place content
sources. Currently only Request.PLACE_CONTENT_WIKIPEDIA
is available.placeContent
- non-empty name for place content source.Request.PLACE_CONTENT_WIKIPEDIA
,
Place.getEditorials()
,
EditorialMedia
public java.util.Set<java.lang.String> getContent()
addContent(String)
.public ErrorCode execute(ResultListener<Place> listener)
listener
- A ResultListener
passed along with the request to monitor progressErrorCode
representing an appropriate result