Package org.vast.swe
Class SWEDataTypeUtils
java.lang.Object
org.vast.swe.SWEDataTypeUtils
Helper methods to read/write complex data types (e.g. unions)
- Since:
- Dec 14, 2014
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final String
getDoubleOrInfAsString
(double val) final String
getDoubleOrTimeAsString
(double val, boolean useIso) final String
getStringValue
(SimpleComponent component) Retrieve string representation of value of component This will convert to an ISO string for appropriate time componentsprotected final String
getStringValue
(SimpleComponent component, int valIdx) static final double
parseDoubleOrInf
(String text) Improves on Java Double.parseDouble() method to include +INF/-INF This is needed because Java Infinity is not allowed by XML schemafinal double
Allows parsing a double or ISO encoded date/time value
-
Constructor Details
-
SWEDataTypeUtils
public SWEDataTypeUtils()
-
-
Method Details
-
parseDoubleOrInf
Improves on Java Double.parseDouble() method to include +INF/-INF This is needed because Java Infinity is not allowed by XML schema- Parameters:
text
- string to decode value from- Returns:
- decoded value
- Throws:
NumberFormatException
- if argument doesn't contain a valid double string
-
getDoubleOrInfAsString
- Parameters:
val
-- Returns:
- String representation of double value as per SWE specification (i.e. actually the XML Schema standard representation for infinity)
-
parseDoubleOrInfOrIsoTime
Allows parsing a double or ISO encoded date/time value- Parameters:
text
- string to decode value from- Returns:
- decoded value
- Throws:
NumberFormatException
-
getDoubleOrTimeAsString
-
getStringValue
Retrieve string representation of value of component This will convert to an ISO string for appropriate time components- Parameters:
component
-- Returns:
- string representation of component value
-
getStringValue
-