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.XSDGenericTypeNested 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEqual(LiteralLabel value1, LiteralLabel value2) Compares two instances of values of the given datatype.booleanisValidValue(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, trimPlusMethods inherited from class org.apache.jena.datatypes.BaseDatatype
cannonicalise, equals, getHashCode, getURI, hashCode, 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:
isValidValuein interfaceRDFDatatype- Overrides:
isValidValuein classBaseDatatype
-
parse
Parse a lexical form of this datatype to a value- Specified by:
parsein interfaceRDFDatatype- Overrides:
parsein classXSDDatatype- Throws:
DatatypeFormatException- if the lexical form is not legal
-
unparse
Description copied from class:XSDDatatypeConvert a value of this datatype out to lexical form.- Specified by:
unparsein interfaceRDFDatatype- Overrides:
unparsein 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:
parseValidatedin 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:
isEqualin interfaceRDFDatatype- Overrides:
isEqualin classXSDDatatype
-