public class JacksonValueTime extends JacksonValue implements TimeValue
TimeValue.JSON_VALUE_TYPE_ENTITY_ID, JSON_VALUE_TYPE_GLOBE_COORDINATES, JSON_VALUE_TYPE_MONOLINGUAL_TEXT, JSON_VALUE_TYPE_QUANTITY, JSON_VALUE_TYPE_STRING, JSON_VALUE_TYPE_TIMECM_GREGORIAN_PRO, CM_JULIAN_PRO, PREC_100KY, PREC_100MY, PREC_100Y, PREC_10KY, PREC_10MY, PREC_1GY, PREC_1KY, PREC_1MY, PREC_DAY, PREC_DECADE, PREC_HOUR, PREC_MINUTE, PREC_MONTH, PREC_SECOND, PREC_YEAR| Constructor and Description |
|---|
JacksonValueTime()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(ValueVisitor<T> valueVisitor)
Accept a ValueVisitor and return its output.
|
boolean |
equals(Object obj) |
int |
getAfterTolerance()
Get a tolerance value that specifies how much later in time the value
could at most be, measured as a multiple of
precision. |
int |
getBeforeTolerance()
Get a tolerance value that specifies how much earlier in time the value
could at most be, measured as a multiple of
precision. |
byte |
getDay()
Get the day stored for this date.
|
byte |
getHour()
Get the hour stored for this date.
|
byte |
getMinute()
Get the minute stored for this date.
|
byte |
getMonth()
Get the month stored for this date.
|
byte |
getPrecision()
Get the precision hint of this date.
|
String |
getPreferredCalendarModel()
Get the IRI of the preferred calendar model that should be used to
display this date (and that was presumably used when entering it).
|
byte |
getSecond()
Get the seconds stored for this date.
|
int |
getTimezoneOffset()
Get the offset in minutes from UTC that should be applied when displaying
this time to users.
|
JacksonInnerTime |
getValue()
Returns the inner value helper object.
|
long |
getYear()
Get the year stored for this date.
|
int |
hashCode() |
void |
setValue(JacksonInnerTime value)
Sets the inner value helper object to the given value.
|
String |
toString() |
getType, setTypepublic JacksonValueTime()
public JacksonInnerTime getValue()
public void setValue(JacksonInnerTime value)
value - new valuepublic long getYear()
TimeValuepublic byte getMonth()
TimeValuepublic byte getDay()
TimeValuepublic byte getHour()
TimeValuepublic byte getMinute()
TimeValuepublic byte getSecond()
TimeValuepublic String getPreferredCalendarModel()
TimeValueTimeValue.CM_GREGORIAN_PRO or
TimeValue.CM_JULIAN_PRO.getPreferredCalendarModel in interface TimeValuepublic byte getPrecision()
TimeValueTimeValue.PREC_DAY, ..., TimeValue.PREC_1GY.getPrecision in interface TimeValuepublic int getTimezoneOffset()
TimeValuegetTimezoneOffset in interface TimeValuepublic int getBeforeTolerance()
TimeValueprecision. The value is a non-negative integer.
For example, for the date 2007-05-12T10:45:00 with precision
TimeValue.PREC_MONTH, a before-tolerance value of 3 means that
the earliest possible time of this event could have been
2007-02-12T10:45:00. This information about the uncertainty of time
points can be taken into account in query answering, but simplified
implementations can also ignore it and work with the given (exact) time
point instead. If not set specifically by the user, the before-tolerance
value should be 0, i.e., the given time point marks the earliest possible
time.
This boundary is inclusive. For example, a date 2014-02-17T00:00:00 with
precision TimeValue.PREC_DAY and before-tolerance value 1
specifies a time that between 2014-02-17T00:00:00
getBeforeTolerance in interface TimeValueTimeValue.getAfterTolerance()public int getAfterTolerance()
TimeValueprecision. The value is a positive integer.
For example, for the date 2007-05-12T10:45:00 with precision
TimeValue.PREC_MONTH, an after-tolerance value of 2 means that
the latest possible time of this event could have been strictly before
2007-07-12T10:45:00. This information about the uncertainty of time
points can be taken into account in query answering, but simplified
implementations can also ignore it and work with the given (exact) time
point instead. If not set specifically by the user, the before-tolerance
value should be 1, i.e., the interval of uncertainty is exactly the
length given by precision.
The boundary is exclusive. For example, a date 2013-02-01T00:00:00 with
precision TimeValue.PREC_MONTH and after-tolerance value 1 and
before-tolerance value of 0 specifies a time "sometime in February 2013",
but it excludes any time in March 2013. The after-tolerance must not be 0
(which would make no sense if the bound is exclusive, and which is not
needed since precision up to a single second can be specified anyway).
getAfterTolerance in interface TimeValueTimeValue.getBeforeTolerance()public <T> T accept(ValueVisitor<T> valueVisitor)
ValueCopyright © 2014 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage