Module org.apache.jena.core
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.XSDGenericTypeNested classes/interfaces inherited from class org.apache.jena.datatypes.BaseDatatype
BaseDatatype.TypedValue -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortMask to indicate whether day is presentstatic final shortMask to indicate all date/time are presentstatic final shortMask to indicate whether month is presentstatic final shortMask to indicate whether time is presentstatic final shortMask 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendFractionalTime(StringBuilder buff, int fsec, int scale) Append the fraction time part of a date/time vector to a string buffer.dateToString(int[] date) static final intgetDigit(char ch) static final booleanisDigit(char ch) booleanisEqual(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, unparseMethods inherited from class org.apache.jena.datatypes.BaseDatatype
cannonicalise, equals, getHashCode, getURI, hashCode, 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:
isEqualin interfaceRDFDatatype- Overrides:
isEqualin 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:
normalizeSubTypein interfaceRDFDatatype- Overrides:
normalizeSubTypein 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
-