public class

BoxDataImpl

extends Object
implements BoxData
java.lang.Object
   ↳ com.google.gdata.data.geo.impl.BoxDataImpl

Class Overview

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

Summary

Fields
private final ExtensionPoint extPoint
Public Constructors
BoxDataImpl(ExtensionPoint extensionPoint)
Construct a new BoxData with the given extension point as the backing storage of the data.
Public Methods
static void clearBox(ExtensionPoint ext)
Removes the first Box extension found on the extension point.
void clearGeoBoundingBox()
Clears the bounding box and removes the extension point.
void declareExtensions(ExtensionProfile extProfile)
static Box getBox(ExtensionPoint ext)
Helper method to retrieve the Box extension point.
Box getGeoBoundingBox()
Gets the geo bounding box for this extension point.
static void setBox(ExtensionPoint ext, Box box)
Sets the geo bounding box of the extension passed in.
void setGeoBoundingBox(Box box)
Sets the geo bounding box to the given box.
void setGeoBoundingBox(Point lowerLeft, Point upperRight)
If there is an existing box this will set the new values on it.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gdata.data.geo.BoxData

Fields

private final ExtensionPoint extPoint

Public Constructors

public BoxDataImpl (ExtensionPoint extensionPoint)

Construct a new BoxData with the given extension point as the backing storage of the data.

Parameters
extensionPoint

Public Methods

public static void clearBox (ExtensionPoint ext)

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

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

public void clearGeoBoundingBox ()

Clears the bounding box and removes the extension point.

public void declareExtensions (ExtensionProfile extProfile)

Parameters
extProfile

public static Box getBox (ExtensionPoint ext)

Helper method to retrieve the Box extension point. Note this will return empty boxes but will only return an GeoRssWhere extension point if it contains a GmlEnvelope.

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

public Box getGeoBoundingBox ()

Gets the geo bounding box for this extension point.

Returns
  • a Box that contains the boundary for the content of this entity.

public static void setBox (ExtensionPoint ext, Box box)

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

Parameters
ext The extension point to add the Box to.
box The new box information.

public void setGeoBoundingBox (Box box)

Sets the geo bounding box to the given box. If there is an existing box it will copy the values from the given box, otherwise it will use the new box as the extension.

Parameters
box The box that bounds this entity.

public void setGeoBoundingBox (Point lowerLeft, Point upperRight)

If there is an existing box this will set the new values on it. Otherwise it will create a new GeoRssWhere element to contain them. If just one argument is null it will throw an exception.

Parameters
lowerLeft The lower left coordinate of the box.
upperRight The upper right coordinate of the box.