public class W3CPoint extends ExtensionPoint implements Point
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within
the target extension profile.
|
void |
generate(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
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.
|
addExtension, addRepeatingExtension, generateCumulativeXmlBlob, getExtension, getExtensions, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit
disableStrictValidation, enableStrictValidation, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable
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)
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(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
generate
in interface Extension
generate
in class AbstractExtension
w
- XML writerextProfile
- extension profilejava.io.IOException
public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
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