java.lang.Object
com.hp.hpl.jena.datatypes.BaseDatatype
com.hp.hpl.jena.datatypes.xsd.XSDDatatype
com.hp.hpl.jena.datatypes.xsd.impl.XSDBaseNumericType
- All Implemented Interfaces:
- com.hp.hpl.jena.datatypes.RDFDatatype
- Direct Known Subclasses:
- XSDByteType
- public class XSDBaseNumericType
- extends com.hp.hpl.jena.datatypes.xsd.XSDDatatype
Base implementation for all numeric datatypes derived from
xsd:decimal. The only purpose of this place holder is
to support the isValidLiteral tests across numeric types. Note
that float and double are not included in this set.
- Version:
- $Revision: 1.13 $ on $Date: 2005/02/21 12:02:20 $
| Fields inherited from class com.hp.hpl.jena.datatypes.xsd.XSDDatatype |
javaClass, typeDeclaration, XSD, XSDanyURI, XSDbase64Binary, XSDboolean, XSDbyte, XSDdate, XSDdateTime, 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 |
| Methods inherited from class com.hp.hpl.jena.datatypes.xsd.XSDDatatype |
convertValidatedDataValue, extendedTypeDefinition, getJavaClass, isBaseTypeCompatible, loadUserDefined, loadUserDefined, loadXSDSimpleTypes, main, parseValidated, trimPlus, unparse |
XSDBaseNumericType
public XSDBaseNumericType(java.lang.String typeName)
- Constructor.
XSDBaseNumericType
public XSDBaseNumericType(java.lang.String typeName,
java.lang.Class javaClass)
- Constructor.
isValidLiteral
public boolean isValidLiteral(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
- Test whether the given LiteralLabel is a valid instance
of this datatype. This takes into accound typing information
as well as lexical form - for example an xsd:string is
never considered valid as an xsd:integer (even if it is
lexically legal like "1").
isValidValue
public boolean isValidValue(java.lang.Object valueForm)
- Test whether the given object is a legal value form
of this datatype. Brute force implementation.
parse
public java.lang.Object parse(java.lang.String lexicalForm)
throws com.hp.hpl.jena.datatypes.DatatypeFormatException
- Parse a lexical form of this datatype to a value
checkWhitespace
protected void checkWhitespace(java.lang.String lexicalForm)
- Check for whitespace violations.
Turned off by default.
isEqual
public boolean isEqual(com.hp.hpl.jena.graph.impl.LiteralLabel value1,
com.hp.hpl.jena.graph.impl.LiteralLabel value2)
- Compares two instances of values of the given datatype.
This ignores lang tags and just uses the java.lang.Number
equality.