# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.geo.impl
Class GmlEnvelope

    java.lang.Object
      com.google.gdata.data.AbstractExtension
          com.google.gdata.data.ExtensionPoint
              com.google.gdata.data.geo.impl.GmlEnvelope

All Implemented Interfaces:
  Extension, Box

    public class GmlEnvelope

extends ExtensionPoint
implements Box

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.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
`ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler`

Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
`AbstractExtension.AttributesHandler`

Field Summary

Fields inherited from class com.google.gdata.data.ExtensionPoint
`xmlBlob`

Fields inherited from class com.google.gdata.data.AbstractExtension
`localName, namespace`

Constructor Summary
`GmlEnvelope()` Constructs an empty gml:Envelope element.
`GmlEnvelope(Box box)` Constructs a gml:Envelope by copying from the given box.
`GmlEnvelope(java.lang.Double lowerLat, java.lang.Double lowerLon, java.lang.Double upperLat, java.lang.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.

Method Summary
`void` `declareExtensions(ExtensionProfile extProfile)` Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
`static ExtensionDescription` `getDefaultDescription()` Returns the suggested extension description and is repeatable.
`static ExtensionDescription` `getDefaultDescription(boolean repeatable)` Returns the suggested extension description with configurable repeatability.
`GmlLowerCorner` `getLowerLeft()`
`GmlUpperCorner` `getUpperRight()`
`void` `setGeoLocation(Point lowerLeft, Point upperRight)` Sets the coordinates of this box.
`void` `setUpperRight(Point upperRight)`
`protected void` `validate()` Checks the attributes to see if there are any problems.

Methods inherited from class com.google.gdata.data.ExtensionPoint

`addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getHandler, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildren`

Methods inherited from class com.google.gdata.data.AbstractExtension
`consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.google.gdata.data.Extension
`generate, getHandler`

Constructor Detail

### GmlEnvelope

    public GmlEnvelope()

  Constructs an empty gml:Envelope element.

### GmlEnvelope

    public GmlEnvelope(java.lang.Double lowerLat,
                       java.lang.Double lowerLon,
                       java.lang.Double upperLat,
                       java.lang.Double upperLon)

  Constructs a gml:Envelope with the given coordinates.

### GmlEnvelope

    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.

### GmlEnvelope

    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.

Method Detail

### getDefaultDescription

    public static ExtensionDescription getDefaultDescription(boolean repeatable)

  Returns the suggested extension description with configurable repeatability.

### getDefaultDescription

    public static ExtensionDescription getDefaultDescription()

  Returns the suggested extension description and is repeatable.

### declareExtensions

    public void declareExtensions(ExtensionProfile extProfile)

  Description copied from class: `ExtensionPoint`
  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.

  Overrides:
    `declareExtensions` in class `ExtensionPoint`
  Parameters:
    `extProfile` - the ExtensionProfile to initialize.

### getLowerLeft

    public GmlLowerCorner getLowerLeft()

  Specified by:
    `getLowerLeft` in interface `Box`
  Returns:
    the point that represents the lower-left coordinate of the box.

### getUpperRight

    public GmlUpperCorner getUpperRight()

  Specified by:
    `getUpperRight` in interface `Box`
  Returns:
    the point that represents the upper-right coordinate of the box.

### setGeoLocation

    public void setGeoLocation(Point lowerLeft,
                               Point upperRight)

  Description copied from interface: `Box`
  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.

  Specified by:
    `setGeoLocation` in interface `Box`
  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.

### setUpperRight

    public void setUpperRight(Point upperRight)

### validate

    protected void validate()
                     throws java.lang.IllegalStateException

  Description copied from class: `AbstractExtension`
  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.

  Overrides:
    `validate` in class `AbstractExtension`
  Throws:
    `java.lang.IllegalStateException` - if any problems are found with the attributes