java.lang.Object
org.apache.jena.datatypes.BaseDatatype
org.apache.jena.datatypes.xsd.XSDDatatype
org.apache.jena.datatypes.xsd.impl.XSDDouble
- All Implemented Interfaces:
RDFDatatype
Datatype representation for xsd:float. Can't just use XSDBaseNumericType
because float, double and decimal are all disjoint in XSD. Can use plain
XSDDatatype because the equality function needs overriding.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.datatypes.xsd.XSDDatatype
XSDDatatype.XSDGenericType
Nested classes/interfaces inherited from class org.apache.jena.datatypes.BaseDatatype
BaseDatatype.TypedValue
-
Field Summary
Fields inherited from class org.apache.jena.datatypes.xsd.XSDDatatype
XSD, XSDanyURI, XSDbase64Binary, XSDboolean, XSDbyte, XSDdate, XSDdateTime, XSDdateTimeStamp, XSDdayTimeDuration, XSDdecimal, XSDdouble, XSDduration, XSDENTITY, XSDfloat, XSDgDay, XSDgMonth, XSDgMonthDay, XSDgYear, XSDgYearMonth, XSDhexBinary, XSDID, XSDIDREF, XSDint, XSDinteger, XSDlanguage, XSDlong, XSDName, XSDNCName, XSDnegativeInteger, XSDNMTOKEN, XSDnonNegativeInteger, XSDnonPositiveInteger, XSDnormalizedString, XSDNOTATION, XSDpositiveInteger, XSDQName, XSDshort, XSDstring, XSDtime, XSDtoken, XSDunsignedByte, XSDunsignedInt, XSDunsignedLong, XSDunsignedShort, XSDyearMonthDuration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isEqual
(LiteralLabel value1, LiteralLabel value2) Compares two instances of values of the given datatype.boolean
isValidValue
(Object valueForm) Test whether the given object is a legal value form of this datatype.Parse a lexical form of this datatype to a valueparseValidated
(String lex) Parse a validated lexical form.Convert a value of this datatype out to lexical form.Methods inherited from class org.apache.jena.datatypes.xsd.XSDDatatype
extendedTypeDefinition, getJavaClass, isBaseTypeCompatible, isValidLiteral, loadXSDSimpleTypes, main, trimPlus
Methods inherited from class org.apache.jena.datatypes.BaseDatatype
cannonicalise, getHashCode, getURI, isValid, langTagCompatible, normalizeSubType, toString
-
Constructor Details
-
XSDDouble
Constructor.- Parameters:
typeName
- the name of the XSD type to be instantiated, this is used to lookup a type definition from the Xerces schema factory.
-
XSDDouble
Constructor.- Parameters:
typeName
- the name of the XSD type to be instantiated, this is used to lookup a type definition from the Xerces schema factory.javaClass
- the java class for which this xsd type is to be treated as the cannonical representation
-
-
Method Details
-
isValidValue
Test whether the given object is a legal value form of this datatype. Brute force implementation.- Specified by:
isValidValue
in interfaceRDFDatatype
- Overrides:
isValidValue
in classBaseDatatype
-
parse
Parse a lexical form of this datatype to a value- Specified by:
parse
in interfaceRDFDatatype
- Overrides:
parse
in classXSDDatatype
- Throws:
DatatypeFormatException
- if the lexical form is not legal
-
unparse
Description copied from class:XSDDatatype
Convert a value of this datatype out to lexical form.- Specified by:
unparse
in interfaceRDFDatatype
- Overrides:
unparse
in classXSDDatatype
-
parseValidated
Parse a validated lexical form. Subclasses which use the default parse implementation and are not converted by the explicit convertValidatedData cases should override this.- Overrides:
parseValidated
in classXSDDatatype
-
isEqual
Compares two instances of values of the given datatype. This ignores lang tags and just uses the java.lang.Number equality.- Specified by:
isEqual
in interfaceRDFDatatype
- Overrides:
isEqual
in classXSDDatatype
-