public class

GmlEnvelope

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

Class Overview

A gml:Envelope element, this is used to describe a box using the gml version of our geographic information language. An envelope contains an upper and a lower corner.

Summary

Constants
String NAME
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
GmlEnvelope()
Constructs an empty gml:Envelope element.
GmlEnvelope(Double lowerLat, Double lowerLon, Double upperLat, Double upperLon)
Constructs a gml:Envelope with the given coordinates.
GmlEnvelope(Point lower, Point upper)
Constructs a gml:Envelope with the given lower and upper values.
GmlEnvelope(Box box)
Constructs a gml:Envelope by copying from the given box.
Public Methods
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
static ExtensionDescription getDefaultDescription(boolean repeatable)
Returns the suggested extension description with configurable repeatability.
static ExtensionDescription getDefaultDescription()
Returns the suggested extension description and is repeatable.
GmlLowerCorner getLowerLeft()
GmlUpperCorner getUpperRight()
void setGeoLocation(Point lowerLeft, Point upperRight)
Sets the coordinates of this box.
void setUpperRight(Point upperRight)
Protected Methods
void validate()
Checks the attributes to see if there are any problems.
[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

Constants

static final String NAME

Constant Value: "Envelope"

Public Constructors

public GmlEnvelope ()

Constructs an empty gml:Envelope element.

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

Constructs a gml:Envelope with the given coordinates.

Parameters
lowerLat
lowerLon
upperLat
upperLon

public GmlEnvelope (Point lower, Point upper)

Constructs a gml:Envelope with the given lower and upper values. If the given values are already a GmlLowerCorner and a GmlUpperCorner, they will be used direclty as the extensions, otherwise they will be copied. If both points are null an empty point will be created, otherwise if one of them is null then an IllegalArgumentException will be thrown.

Parameters
lower
upper

public GmlEnvelope (Box box)

Constructs a gml:Envelope by copying from the given box. This calls the GmlEnvelope(Point, Point) constructor with the points in the box, or with nulls if the box itself is null.

Parameters
box

Public Methods

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 static ExtensionDescription getDefaultDescription (boolean repeatable)

Returns the suggested extension description with configurable repeatability.

Parameters
repeatable

public static ExtensionDescription getDefaultDescription ()

Returns the suggested extension description and is repeatable.

public GmlLowerCorner getLowerLeft ()

public GmlUpperCorner getUpperRight ()

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 setUpperRight (Point upperRight)

Parameters
upperRight

Protected Methods

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.

Throws
IllegalStateException