|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.geo.impl.W3CPoint
public class W3CPoint
Extension for a W3C geo:Point element. It contains the getter/setter for specifying the longitude and latitude of a geo-coordinate. Please see the W3C document http://www.w3.org/2003/01/geo for more information.
Nested Class Summary | |
---|---|
protected class |
W3CPoint.Handler
Simple delegating handler implementation that uses (only) ExtensionProfile linkages for child element lookup. |
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 | |
---|---|
W3CPoint()
Constructs an empty geo:Point element. |
|
W3CPoint(java.lang.Double lat,
java.lang.Double lon)
Constructs a geo:Point element with child geo:lat and geo:long elements based on the parameters passed in. |
|
W3CPoint(Point copyFrom)
Constructs a geo:Point element copying the lat and lon values from the given point. |
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 GeoPoint. |
static ExtensionDescription |
getDefaultDescription()
Returns the suggested extension description and is repeatable. |
static ExtensionDescription |
getDefaultDescription(boolean repeatable)
Returns the suggested extension description with configurable repeatability. |
XmlParser.ElementHandler |
getHandler(ExtensionProfile extProfile,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
The default implementation uses the AbstractExtension.AttributesHandler to handle
parsing the extension. |
java.lang.Double |
getLatitude()
|
java.lang.Double |
getLongitude()
|
void |
setGeoLocation(java.lang.Double lat,
java.lang.Double lon)
Sets the geo location based on the passed in lat and lon values. |
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 |
Constructor Detail |
---|
public W3CPoint()
public W3CPoint(java.lang.Double lat, java.lang.Double lon)
lat
- The latitude coordinate of this point.lon
- The longitude coordinate of this point.public W3CPoint(Point copyFrom)
Method Detail |
---|
public static ExtensionDescription getDefaultDescription(boolean repeatable)
public static ExtensionDescription getDefaultDescription()
public void declareExtensions(ExtensionProfile extProfile)
ExtensionPoint
declareExtensions
in class ExtensionPoint
extProfile
- the ExtensionProfile to initialize.public java.lang.Double getLatitude()
getLatitude
in interface Point
public java.lang.Double getLongitude()
getLongitude
in interface Point
public void setGeoLocation(java.lang.Double lat, java.lang.Double lon)
setGeoLocation
in interface Point
lat
- The latitude in degrees, from -90 to 90.lon
- The longitude in degrees, from -180 to 180.public void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
generate
in interface Extension
generate
in class AbstractExtension
w
- XML writerextProfile
- extension profile
java.io.IOException
public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
AbstractExtension
AbstractExtension.AttributesHandler
to handle
parsing the extension.
getHandler
in interface Extension
getHandler
in class ExtensionPoint
extProfile
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |