public class XmlAdapterLAT extends AXmlAdapterNumber
The geographical latitude (degrees, minutes, seconds and hemisphere N or S)
of the Point or center of the Ellipse. Same remarks for seconds and leading
zeros. enter N or S immediately following the seconds. The format is:
ddmmss.hhH
(where ".hh" is optional and H = N or S).
[XSD ERR REGEX] This data item MUST comply to the regular expression: "(((((([0-8][0-9]))([0-5][0-9]){2})(. [0-9]{1,2})?)|900000)(N|S))|X"
Developer note: This Lat
is an extension and replacement
implementation of the default Lat
using a BigDecimal value in
Decimal degrees (instead of DMS-encoded string) and relying upon the
XmlJavaTypeAdapter for DMS translation.
Constructor and Description |
---|
XmlAdapterLAT()
Construct a new adapter instance.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getLatHemisphere(Number latitude)
Get the latitude hemisphere from a latitude in decimal degrees.
|
String |
marshal(Number v)
Convert a value type to a bound type.
|
Number |
unmarshal(String v)
Convert a bound type to a value type.
|
convert, getMaxInclusive, getMinInclusive
public XmlAdapterLAT()
Latitude ranges from -90 to +90 degrees.
Allow 9 decimal places; centimeter precision.
public Number unmarshal(String v) throws Exception
This is called when converting an object to XML.
unmarshal
in class AXmlAdapterNumber
v
- The value to be convereted. Can be null.Exception
- if there's an error during the conversion. The caller is
responsible for reporting the error to the user through
ValidationEventHandler.public String marshal(Number v) throws Exception
This is called with converting XML to an object.
marshal
in class AXmlAdapterNumber
v
- The value to be converted. Can be null.Exception
- if there's an error during the conversion. The caller is
responsible for reporting the error to the user through
ValidationEventHandler.Copyright © 2016 OpenSSRF.org. All rights reserved.