public class XSDBaseNumericType extends XSDDatatype
Note that float and double are not included in this set.
XSDDatatype.XSDGenericType
BaseDatatype.TypedValue
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 and Description |
---|
XSDBaseNumericType(String typeName)
Constructor.
|
XSDBaseNumericType(String typeName,
Class<?> javaClass)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
cannonicalise(Object value)
Cannonicalise a java Object value to a normal form.
|
boolean |
isEqual(LiteralLabel value1,
LiteralLabel value2)
Compares two instances of values of the given datatype.
|
boolean |
isValidLiteral(LiteralLabel lit)
Test whether the given LiteralLabel is a valid instance
of this datatype.
|
boolean |
isValidValue(Object valueForm)
Test whether the given object is a legal value form
of this datatype.
|
Object |
parse(String lexicalForm)
Parse a lexical form of this datatype to a value
|
String |
unparse(Object value)
Convert a value of this datatype to lexical form.
|
extendedTypeDefinition, getJavaClass, isBaseTypeCompatible, loadXSDSimpleTypes, main, parseValidated, trimPlus
getHashCode, getURI, isValid, langTagCompatible, normalizeSubType, toString
public XSDBaseNumericType(String typeName)
typeName
- the name of the XSD type to be instantiated, this is
used to lookup a type definition from the Xerces schema factory.public XSDBaseNumericType(String typeName, Class<?> javaClass)
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 representationpublic boolean isValidLiteral(LiteralLabel lit)
isValidLiteral
in interface RDFDatatype
isValidLiteral
in class XSDDatatype
public boolean isValidValue(Object valueForm)
isValidValue
in interface RDFDatatype
isValidValue
in class BaseDatatype
public Object cannonicalise(Object value)
cannonicalise
in interface RDFDatatype
cannonicalise
in class BaseDatatype
public Object parse(String lexicalForm) throws DatatypeFormatException
parse
in interface RDFDatatype
parse
in class XSDDatatype
DatatypeFormatException
- if the lexical form is not legalpublic String unparse(Object value)
unparse
in interface RDFDatatype
unparse
in class XSDDatatype
public boolean isEqual(LiteralLabel value1, LiteralLabel value2)
isEqual
in interface RDFDatatype
isEqual
in class XSDDatatype
Licenced under the Apache License, Version 2.0