Google Data APIs Client Library (1.41.1)
Class PointConstruct

  extended by
      extended by
          extended by
All Implemented Interfaces:
Extension, Point
Direct Known Subclasses:
GeoRssPoint, GmlLowerCorner, GmlPos, GmlUpperCorner

public abstract class PointConstruct
extends ValueConstruct
implements Point

A basic point construct consists of a space-separated coordinate in geo space. The namespace and name of the element are supplied by subclasses.

Nested Class Summary
Nested classes/interfaces inherited from class
Field Summary
Fields inherited from class
Fields inherited from class
localName, namespace
Constructor Summary
PointConstruct( namespace, java.lang.String name)
          Constructor to create an empty point object.
PointConstruct( namespace, java.lang.String name, java.lang.Double lat, java.lang.Double lon)
          Constructor to create a point from a given lat/lon pair.
PointConstruct( namespace, java.lang.String name, Point copyFrom)
          Copy constructor to create a point from another point.
Method Summary
 java.lang.Double getLatitude()
 java.lang.Double getLongitude()
 void setGeoLocation(java.lang.Double lat, java.lang.Double lon)
          Sets the latitude and longitude coordinates of this Point.
 void setValue(java.lang.String v)
          Sets the value.
 java.lang.String toString()
protected  void validate()
          Checks the attributes to see if there are any problems.
Methods inherited from class
consumeAttributes, equals, generate, getHandler, getValue, hashCode, hasValue, isRequired, putAttributes, setRequired
Methods inherited from class
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface
generate, getHandler

Constructor Detail


public PointConstruct( namespace,
                      java.lang.String name)
Constructor to create an empty point object.


public PointConstruct( namespace,
                      java.lang.String name,
                      java.lang.Double lat,
                      java.lang.Double lon)
Constructor to create a point from a given lat/lon pair. Will create an empy point if both values are null, if only one value is null with throw an illegal argument exception.


public PointConstruct( namespace,
                      java.lang.String name,
                      Point copyFrom)
Copy constructor to create a point from another point.

Method Detail


public java.lang.Double getLatitude()
Specified by:
getLatitude in interface Point
the value of latitude coordinate of this Point.


public java.lang.Double getLongitude()
Specified by:
getLongitude in interface Point
the value of the longitude coordinate of this Point.


public void setGeoLocation(java.lang.Double lat,
                           java.lang.Double lon)
Description copied from interface: Point
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.

Specified by:
setGeoLocation in interface Point
lat - The latitude in degrees, from -90 to 90.
lon - The longitude in degrees, from -180 to 180.


public java.lang.String toString()
toString in class java.lang.Object


public void setValue(java.lang.String v)
Description copied from class: ValueConstruct
Sets the value. Subclasses can override this method to do additional validation of the value.

setValue in class ValueConstruct
v - new value for the value construct or null to reset.


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.

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