Class XSDAbstractDateTimeType
java.lang.Object
org.apache.jena.datatypes.BaseDatatype
org.apache.jena.datatypes.xsd.XSDDatatype
org.apache.jena.datatypes.xsd.impl.XSDAbstractDateTimeType
- All Implemented Interfaces:
RDFDatatype
- Direct Known Subclasses:
XSDDateTimeType
,XSDDateType
,XSDDayTimeDurationType
,XSDDayType
,XSDDurationType
,XSDMonthDayType
,XSDMonthType
,XSDTimeType
,XSDYearMonthDurationType
,XSDYearMonthType
,XSDYearType
Base class for all date/time/duration type representations.
Includes support functions for parsing and comparing dates.
-
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
Modifier and TypeFieldDescriptionstatic final short
Mask to indicate whether day is presentstatic final short
Mask to indicate all date/time are presentstatic final short
Mask to indicate whether month is presentstatic final short
Mask to indicate whether time is presentstatic final short
Mask to indicate whether year is presentFields 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 TypeMethodDescriptionstatic void
appendFractionalTime
(StringBuffer buff, int fsec, int scale) Append the fraction time part of a date/time vector to a string buffer.dateToString
(int[] date) static final int
getDigit
(char ch) static final boolean
isDigit
(char ch) boolean
isEqual
(LiteralLabel value1, LiteralLabel value2) Compares two instances of values of the given datatype.normalizeSubType
(Object value, RDFDatatype dt) Normalization.Methods inherited from class org.apache.jena.datatypes.xsd.XSDDatatype
extendedTypeDefinition, getJavaClass, isBaseTypeCompatible, isValidLiteral, loadXSDSimpleTypes, main, parse, parseValidated, trimPlus, unparse
Methods inherited from class org.apache.jena.datatypes.BaseDatatype
cannonicalise, getHashCode, getURI, isValid, isValidValue, langTagCompatible, toString
-
Field Details
-
YEAR_MASK
public static final short YEAR_MASKMask to indicate whether year is present- See Also:
-
MONTH_MASK
public static final short MONTH_MASKMask to indicate whether month is present- See Also:
-
DAY_MASK
public static final short DAY_MASKMask to indicate whether day is present- See Also:
-
TIME_MASK
public static final short TIME_MASKMask to indicate whether time is present- See Also:
-
FULL_MASK
public static final short FULL_MASKMask to indicate all date/time are present- See Also:
-
-
Constructor Details
-
XSDAbstractDateTimeType
Constructor
-
-
Method Details
-
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
-
isDigit
public static final boolean isDigit(char ch) -
getDigit
public static final int getDigit(char ch) -
dateToString
-
appendFractionalTime
Append the fraction time part of a date/time vector to a string buffer. -
normalizeSubType
Normalization. If the value is narrower than the current data type (e.g. value is xsd:date but the time is xsd:datetime) returns the narrower type for the literal. If the type is narrower than the value then it may normalize the value (e.g. set the mask of an XSDDateTime) Currently only used to narrow gener XSDDateTime objects to the minimal XSD date/time type.- Specified by:
normalizeSubType
in interfaceRDFDatatype
- Overrides:
normalizeSubType
in classBaseDatatype
- Parameters:
value
- the current object valuedt
- the currently set data type- Returns:
- a narrower version of the datatype based on the actual value range
-