public class

GeoRssWhere

extends ExtensionPoint
implements Box Point
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.geo.impl.GeoRssWhere

Class Overview

The georss:where element. This can contain other elements, so it is extensible, but it also acts as a Point object. It can also act as a Box as well, and can be extended to support other GML object types.

Summary

Constants
String NAME
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
GeoRssWhere()
Constructs an empty georss:where element.
GeoRssWhere(Double lat, Double lon)
Constructs a georss:where element containing the given lat/lon point.
GeoRssWhere(Point point)
Constructs a georss:where element containing the given point.
GeoRssWhere(Double lowerLat, Double lowerLon, Double upperLat, Double upperLon)
Constructs a georss:where element containing the four coordinates that define a box.
GeoRssWhere(Point lower, Point upper)
Constructs a georss:where element containing the given gml:lowerCorner and gml:upperCorner elements.
GeoRssWhere(Box box)
Constructs a georss:where element containing the given box.
Public Methods
void clearBox()
Removes the GmlEnvelope element inside this GeoRssWhere.
void clearPoint()
Removes the GmlPoint element inside this GeoRssWhere.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
void generate(XmlWriter w, ExtensionProfile p)
Generates an XML representation for the extension.
static ExtensionDescription getDefaultDescription()
Returns the suggested extension description and is repeatable.
static ExtensionDescription getDefaultDescription(boolean repeatable)
Returns the default extension description for this element.
Double getLatitude()
Double getLongitude()
GmlLowerCorner getLowerLeft()
GmlUpperCorner getUpperRight()
boolean hasBox()
boolean hasPoint()
void setGeoLocation(Point lowerLeft, Point upperRight)
Sets the coordinates of this box.
void setGeoLocation(Double lat, Double lon)
Sets the latitude and longitude coordinates of this Point.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.geo.Box
From interface com.google.gdata.data.geo.Point

Constants

static final String NAME

Constant Value: "where"

Public Constructors

public GeoRssWhere ()

Constructs an empty georss:where element.

public GeoRssWhere (Double lat, Double lon)

Constructs a georss:where element containing the given lat/lon point. If the given lat and lon are null, will construct an empty gml:Point element.

Parameters
lat
lon

public GeoRssWhere (Point point)

Constructs a georss:where element containing the given point. If the point is already a gml:Point object, it will be used as the extension directly, otherwise a copy will be created. If the point is null no extensions will be added.

Parameters
point

public GeoRssWhere (Double lowerLat, Double lowerLon, Double upperLat, Double upperLon)

Constructs a georss:where element containing the four coordinates that define a box. If all of the points are null then an empty gml:envelope will be created.

Parameters
lowerLat
lowerLon
upperLat
upperLon

public GeoRssWhere (Point lower, Point upper)

Constructs a georss:where element containing the given gml:lowerCorner and gml:upperCorner elements. If both lower and upper are null then an empty gml:envelope will be created.

Parameters
lower
upper

public GeoRssWhere (Box box)

Constructs a georss:where element containing the given box. If the box is null no extension will be set.

Parameters
box

Public Methods

public void clearBox ()

Removes the GmlEnvelope element inside this GeoRssWhere.

public void clearPoint ()

Removes the GmlPoint element inside this GeoRssWhere.

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public void generate (XmlWriter w, ExtensionProfile p)

Generates an XML representation for the extension.

Parameters
w XML writer
p Extension profile
Throws
IOException

public static ExtensionDescription getDefaultDescription ()

Returns the suggested extension description and is repeatable.

public static ExtensionDescription getDefaultDescription (boolean repeatable)

Returns the default extension description for this element.

Parameters
repeatable

public Double getLatitude ()

public Double getLongitude ()

public GmlLowerCorner getLowerLeft ()

public GmlUpperCorner getUpperRight ()

public boolean hasBox ()

Returns
  • true if this GeoRssWhere element contains an envelope element.

public boolean hasPoint ()

Returns
  • true if this GeoRssWhere element contains a point element.

public void setGeoLocation (Point lowerLeft, Point upperRight)

Sets the coordinates of this box. Both lowerLeft and upperRight must be non-null or both must be null. Implementations will throw an IllegalArgumentException if one is null and the other non-null.

Parameters
lowerLeft The lower left coordinate. The latitude of this point must be below the latitude of the upper right coordinate.
upperRight The upper right coordinate. The latitude of this point must be above the latitude of the lower left coordinate.

public void setGeoLocation (Double lat, Double lon)

Sets the latitude and longitude coordinates of this Point. Either both lat and lon must be non-null, or both must be null. Implementations will throw an IllegalArgumentException if only one is null and one is not. They will also throw an IllegalArgumentException if either of the lat values is outside the valid range.

Parameters
lat The latitude in degrees, from -90 to 90.
lon The longitude in degrees, from -180 to 180.