java.lang.Object
org.apache.jena.sparql.util.XSDNumUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Decimal format, cast-to-string.static String
canonicalDecimalStrWithDot
(BigDecimal decimal) Integer-valued decimals have a trailing ".0".static String
stringForm
(double d) static String
stringForm
(float f) static String
stringForm
(BigDecimal decimal) Produce a lexical form forBigDecimal
that is compatible with Turtle syntax (i.e it has a decimal point).static String
The format ofxsd:decimal
used in ARQ expression evaluation.static String
Strict XSD 1.0 format forxsd:decimal
.static String
Strict XSD 1.1 format forxsd:decimal
.static BigDecimal
xsdParseDecimal
(String lexicalForm) Parse an XSD decimal.static double
xsdParseDouble
(String lexicalForm) Parse an XSD double lexical form.static float
xsdParseFloat
(String lexicalForm) Parse an XSD float lexical form.
-
Constructor Details
-
XSDNumUtils
public XSDNumUtils()
-
-
Method Details
-
xsdParseDouble
Parse an XSD double lexical form. Adds in the cases not covered byDouble.parseDouble(java.lang.String)
.INF
is strictly upper case, but we accept lower case.-NaN
and+NaN
are not accepted. -
xsdParseFloat
Parse an XSD float lexical form. Adds in the cases not covered byFloat.parseFloat(java.lang.String)
.INF
is strictly upper case, but we accept lower case.-NaN
and+NaN
are not accepted. -
xsdParseDecimal
Parse an XSD decimal. -
stringForm
Produce a lexical form forBigDecimal
that is compatible with Turtle syntax (i.e it has a decimal point). -
stringForm
-
stringForm
-
stringFormatARQ
The format ofxsd:decimal
used in ARQ expression evaluation. This is XSD 1.0 for long-term consistency (integer values forxsd:decimal
have ".0"). -
stringFormatXSD10
Strict XSD 1.0 format forxsd:decimal
. -
stringFormatXSD11
Strict XSD 1.1 format forxsd:decimal
. -
canonicalDecimalStrNoIntegerDot
Decimal format, cast-to-string.Decimal canonical form where integer values have no ".0" (as in XSD 1.1).
In XSD 1.1, canonical integer-valued decimal has a trailing ".0". In F&O v 3.1, xs:string cast of a decimal which is integer valued, does not have the trailing ".0".
-
canonicalDecimalStrWithDot
Integer-valued decimals have a trailing ".0". (In XML Schema Datatype 1.1 they did not have a ".0".)
-