-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimalcanonicalDecimal(BigDecimal decimal) Return a canonical decimal with a trailing ".0".static StringDecimal format, cast-to-string.static StringcanonicalDecimalStrWithDot(BigDecimal decimal) Integer-valued decimals have a trailing ".0".static booleanisNaN() - for xsd:double and xsd:float.static StringstringForm(double d) static StringstringForm(float f) static StringstringForm(BigDecimal decimal) Produce a lexical form forBigDecimalthat is compatible with Turtle syntax (i.e it has a decimal point).static StringThe format ofxsd:decimalused in ARQ expression evaluation.static StringStrict XSD 1.0 format forxsd:decimal.static StringStrict XSD 1.1 format forxsd:decimal.static BigDecimalxsdParseDecimal(String lexicalForm) Parse an XSD decimal.static doublexsdParseDouble(String lexicalForm) Parse an XSD double lexical form.static floatxsdParseFloat(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).INFis strictly upper case, but we accept lower case.-NaNand+NaNare not accepted. -
xsdParseFloat
Parse an XSD float lexical form. Adds in the cases not covered byFloat.parseFloat(java.lang.String).INFis strictly upper case, but we accept lower case.-NaNand+NaNare not accepted. -
isNaN
isNaN() - for xsd:double and xsd:float. The argument must be numeric; if not, this function throwsExprEvalException. -
xsdParseDecimal
Parse an XSD decimal. -
stringForm
Produce a lexical form forBigDecimalthat is compatible with Turtle syntax (i.e it has a decimal point). This is also the function used by TDB2 to turn decimal NodeId values into the lexical form of an xsd:decimal. -
stringForm
-
stringForm
-
stringFormatARQ
The format ofxsd:decimalused in ARQ expression evaluation. This is XSD 1.0 for long-term consistency (integer values forxsd:decimalhave ".0"). -
stringFormatXSD10
Strict XSD 1.0 format forxsd:decimal.Decimal canonical form where integer values has a ".0" (as in XSD 1.0).
In XSD 1.0, canonical integer-valued decimal has a trailing ".0". In XSD 1.1 and F&O v 3.1, xs:string cast of a decimal which is integer valued, does not have the trailing ".0".
-
stringFormatXSD11
Strict XSD 1.1 format forxsd:decimal.Decimal canonical form where integer values has no ".0" (as in XSD 1.1).
In XSD 1.0, canonical integer-valued decimal has a trailing ".0". In XSD 1.1 and F&O v 3.1, xs:string cast of a decimal which is integer valued, does not have the trailing ".0".
-
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".) -
canonicalDecimal
Return a canonical decimal with a trailing ".0". This is canonicalizing the value/scale.This is the
BigDecimalform used to encode into NodeIds in TDB2.It has a trailing ".0" for integer values so it is Turtle compatible, but otherwise has no trailing zeros.
For TDB2, we require a consistent, fixed value/scale form for any value to be encoded in a TDB2 NodeId and when reconstructed to get the same lexical form.
- See Also:
-