public class

PointDataImpl

extends Object
implements PointData
java.lang.Object
   ↳ com.google.gdata.data.geo.impl.PointDataImpl

Class Overview

Implementation of the PointData interface. Currently only supports a non-repeating Point extension. This class uses an ExtensionPoint that is passed in to store the Point extension.

Summary

Fields
private ExtensionPoint extPoint
Public Constructors
PointDataImpl(ExtensionPoint extensionPoint)
Construct a new implementation of PointData with the given extension point as the backing storage for data.
Public Methods
void clearPoint()
Clears the point data and removes the extension point.
static void clearPoint(ExtensionPoint ext)
Removes the first Point extension found on the extension point.
void declareExtensions(ExtensionProfile extProfile)
Point getGeoLocation()
Gets the geo-location of the entity.
static Point getPoint(ExtensionPoint ext)
Helper method to retrieve the Box extension point.
void setGeoLocation(Double lat, Double lon)
Sets the geo-location of the entity based on the lat and long coordinates passed in.
void setGeoLocation(Point point)
Sets the geo-location of the entity based on the Point extension.
static void setPoint(ExtensionPoint ext, Point point)
Sets the geo point of the extension passed in.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gdata.data.geo.PointData

Fields

private ExtensionPoint extPoint

Public Constructors

public PointDataImpl (ExtensionPoint extensionPoint)

Construct a new implementation of PointData with the given extension point as the backing storage for data.

Parameters
extensionPoint

Public Methods

public void clearPoint ()

Clears the point data and removes the extension point.

public static void clearPoint (ExtensionPoint ext)

Removes the first Point extension found on the extension point. If the point extension is a GeoRssWhere, it will only remove the GeoRssWhere extension if it does not contain a Box/Envelope extension.

Parameters
ext The extension point from which to clear the Box extension.

public void declareExtensions (ExtensionProfile extProfile)

Parameters
extProfile

public Point getGeoLocation ()

Gets the geo-location of the entity.

Returns
  • a Point that contains the geo-coordinates (latitude and longitude).

public static Point getPoint (ExtensionPoint ext)

Helper method to retrieve the Box extension point.

Parameters
ext The containing extension point.
Returns
  • An extension point that implements the Box interface and contain box information.

public void setGeoLocation (Double lat, Double lon)

Sets the geo-location of the entity based on the lat and long coordinates passed in.

Parameters
lat The latitude coordinate, between -90 and 90 degrees.
lon The longitude coordinate, between -180 and 180 degrees.
Throws
IllegalArgumentException if the latitude and longitude coordinates are invalid.

public void setGeoLocation (Point point)

Sets the geo-location of the entity based on the Point extension.

Parameters
point A point containing the latitude and longitude coordinates.

public static void setPoint (ExtensionPoint ext, Point point)

Sets the geo point of the extension passed in. This will first try to replace any existing point information. If there is no existing point, then it will simply add the point extension.

Parameters
ext The extension point to add the Point to.
point The new point information.