Google Data APIs Client Library (1.41.1)



com.google.gdata.data.geo.impl
Class GmlPoint

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ExtensionPoint
          extended by com.google.gdata.data.geo.impl.GmlPoint
All Implemented Interfaces:
Extension, Point

public class GmlPoint
extends ExtensionPoint
implements Point

Extension for a GML gml:Point element.


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
GmlPoint()
          Constructs an empty gml:Point element.
GmlPoint(java.lang.Double lat, java.lang.Double lon)
          Constructs a gml:Point element out of the given lat and lon values.
GmlPoint(Point point)
          Constructs a gml:Point element using the given Point coordinates for the nested gml:pos element.
 
Method Summary
 void declareExtensions(ExtensionProfile extProfile)
          Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
 void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates the XML corresponding to this gml point.
static ExtensionDescription getDefaultDescription()
          Returns the suggested extension description and is repeatable.
static ExtensionDescription getDefaultDescription(boolean repeatable)
          Returns the suggested extension description with configurable repeatability.
 java.lang.Double getLatitude()
           
 java.lang.Double getLongitude()
           
 void setGeoLocation(java.lang.Double lat, java.lang.Double lon)
          Sets the latitude and longitude of the gml:pos element of this Point to the latitude and longitude coordinates specified.
 
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, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
 
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
getHandler
 

Constructor Detail

GmlPoint

public GmlPoint()
Constructs an empty gml:Point element.


GmlPoint

public GmlPoint(java.lang.Double lat,
                java.lang.Double lon)
Constructs a gml:Point element out of the given lat and lon values. This will construct a gml:pos element to hold the actual values. If the values are null then an empty gml:pos element will be created.


GmlPoint

public GmlPoint(Point point)
Constructs a gml:Point element using the given Point coordinates for the nested gml:pos element. If the point is already a gml:pos, then it will be used directly as the extension, otherwise a gml:pos element will be created as a copy of the given point.

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.

getLatitude

public java.lang.Double getLatitude()
Specified by:
getLatitude in interface Point
Returns:
the value of the gml:pos element within this Point.

getLongitude

public java.lang.Double getLongitude()
Specified by:
getLongitude in interface Point
Returns:
the value of the gml:pos element's longitude within this Point.

setGeoLocation

public void setGeoLocation(java.lang.Double lat,
                           java.lang.Double lon)
Sets the latitude and longitude of the gml:pos element of this Point to the latitude and longitude coordinates specified.

Specified by:
setGeoLocation in interface Point
Parameters:
lat - The latitude coordinate of this point.
lon - the longitude coordinate of this point.

generate

public void generate(com.google.gdata.util.common.xml.XmlWriter w,
                     ExtensionProfile extProfile)
              throws java.io.IOException
Generates the XML corresponding to this gml point.

Specified by:
generate in interface Extension
Overrides:
generate in class AbstractExtension
Parameters:
w - XML writer
extProfile - extension profile
Throws:
java.io.IOException