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
public class XSDAbstractDateTimeType extends XSDDatatype
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
Fields Modifier and Type Field Description static short
DAY_MASK
Mask to indicate whether day is presentstatic short
FULL_MASK
Mask to indicate all date/time are presentstatic short
MONTH_MASK
Mask to indicate whether month is presentstatic short
TIME_MASK
Mask to indicate whether time is presentstatic short
YEAR_MASK
Mask to indicate whether year is present-
Fields 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 Constructor Description XSDAbstractDateTimeType(java.lang.String typename)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
appendFractionalTime(java.lang.StringBuffer buff, int fsec, int scale)
Append the fraction time part of a date/time vector to a string buffer.java.lang.String
dateToString(int[] date)
static int
getDigit(char ch)
static boolean
isDigit(char ch)
boolean
isEqual(LiteralLabel value1, LiteralLabel value2)
Compares two instances of values of the given datatype.RDFDatatype
normalizeSubType(java.lang.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 Detail
-
YEAR_MASK
public static final short YEAR_MASK
Mask to indicate whether year is present- See Also:
- Constant Field Values
-
MONTH_MASK
public static final short MONTH_MASK
Mask to indicate whether month is present- See Also:
- Constant Field Values
-
DAY_MASK
public static final short DAY_MASK
Mask to indicate whether day is present- See Also:
- Constant Field Values
-
TIME_MASK
public static final short TIME_MASK
Mask to indicate whether time is present- See Also:
- Constant Field Values
-
FULL_MASK
public static final short FULL_MASK
Mask to indicate all date/time are present- See Also:
- Constant Field Values
-
-
Method Detail
-
isEqual
public boolean isEqual(LiteralLabel value1, LiteralLabel value2)
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
public java.lang.String dateToString(int[] date)
-
appendFractionalTime
public static void appendFractionalTime(java.lang.StringBuffer buff, int fsec, int scale)
Append the fraction time part of a date/time vector to a string buffer.
-
normalizeSubType
public RDFDatatype normalizeSubType(java.lang.Object value, RDFDatatype dt)
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
-
-