Class XSDFloat

  • All Implemented Interfaces:
    RDFDatatype

    public class XSDFloat
    extends XSDDatatype
    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.
    • Constructor Detail

      • XSDFloat

        public XSDFloat​(java.lang.String typeName)
        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.
      • XSDFloat

        public XSDFloat​(java.lang.String typeName,
                        java.lang.Class<?> javaClass)
        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 Detail

      • isValidValue

        public boolean isValidValue​(java.lang.Object valueForm)
        Test whether the given object is a legal value form of this datatype. Brute force implementation.
        Specified by:
        isValidValue in interface RDFDatatype
        Overrides:
        isValidValue in class BaseDatatype
      • unparse

        public java.lang.String unparse​(java.lang.Object value)
        Description copied from class: XSDDatatype
        Convert a value of this datatype out to lexical form.
        Specified by:
        unparse in interface RDFDatatype
        Overrides:
        unparse in class XSDDatatype
      • parseValidated

        public java.lang.Object parseValidated​(java.lang.String lex)
        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 class XSDDatatype