Package org.apache.abdera.model
Class AtomDate
java.lang.Object
org.apache.abdera.model.AtomDate
- All Implemented Interfaces:
Serializable,Cloneable
@Deprecated(since="2021-07-29")
public final class AtomDate
extends Object
implements Cloneable, Serializable
Deprecated.
This API is deprecated as Apache Abdera is a retired project since 2017.
Provides an implementation of the Atom Date Construct, which is itself a specialization of the RFC3339 date-time.
Accessors on this class are not synchronized.
Per RFC4287:
3.3. Date Constructs
A Date construct is an element whose content MUST conform to the
"date-time" production in [RFC3339]. In addition, an uppercase "T"
character MUST be used to separate date and time, and an uppercase
"Z" character MUST be present in the absence of a numeric time zone
offset.
atomDateConstruct =
atomCommonAttributes,
xsd:dateTime
Such date values happen to be compatible with the following
specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and
[W3C.REC-xmlschema-2-20041028].
Example Date constructs:
<updated>2003-12-13T18:30:02Z</updated>
<updated>2003-12-13T18:30:02.25Z</updated>
<updated>2003-12-13T18:30:02+01:00</updated>
<updated>2003-12-13T18:30:02.25+01:00</updated>
Date values SHOULD be as accurate as possible. For example, it would
be generally inappropriate for a publishing system to apply the same
timestamp to several entries that were published during the course of
a single day.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAtomDate()Deprecated.Create an AtomDate using the current date and timeAtomDate(long value) Deprecated.Create an AtomDate using the number of milliseconds since January 1, 1970, 00:00:00 GMTDeprecated.Create an AtomDate using the serialized string format (e.g.Deprecated.Create an AtomDate using a java.util.Calendar.Deprecated.Create an AtomDate using a java.util.Date -
Method Summary
Modifier and TypeMethodDescriptionclone()Deprecated.booleanDeprecated.static StringDeprecated.Create the serialized string form from a java.util.DateDeprecated.Returns the value of this Atom Date as a java.util.CalendargetDate()Deprecated.Returns the value of this Atom DatelonggetTime()Deprecated.Returns the value of this Atom Date as the number of milliseconds since January 1, 1970, 00:00:00 GMTgetValue()Deprecated.Return the serialized string form of the Atom dateinthashCode()Deprecated.static DateDeprecated.Parse the serialized string form into a java.util.DatesetValue(long timestamp) Deprecated.Sets the value of the Atom date using the number of milliseconds since January 1, 1970, 00:00:00 GMTDeprecated.Sets the value of the Atom date using the serialized string formDeprecated.Sets the value of the Atom date using java.util.CalendarDeprecated.Sets the value of the Atom date using java.util.DatetoString()Deprecated.static AtomDatevalueOf(long value) Deprecated.Create a new Atom Date instance using the number of milliseconds since January 1, 1970, 00:00:00 GMTstatic AtomDateDeprecated.Create a new Atom Date instance from the serialized string formstatic AtomDateDeprecated.Create a new Atom Date instance from a java.util.Calendarstatic AtomDateDeprecated.Create a new Atom Date instance from a java.util.Date
-
Constructor Details
-
AtomDate
public AtomDate()Deprecated.Create an AtomDate using the current date and time -
AtomDate
Deprecated.Create an AtomDate using the serialized string format (e.g. 2003-12-13T18:30:02Z).- Parameters:
value- The serialized RFC3339 date/time value
-
AtomDate
Deprecated.Create an AtomDate using a java.util.Date- Parameters:
value- The java.util.Date value- Throws:
NullPointerException- ifdateisnull
-
AtomDate
Deprecated.Create an AtomDate using a java.util.Calendar.- Parameters:
value- The java.util.Calendar value- Throws:
NullPointerException- ifvalueisnull
-
AtomDate
public AtomDate(long value) Deprecated.Create an AtomDate using the number of milliseconds since January 1, 1970, 00:00:00 GMT- Parameters:
value- The number of milliseconds since January 1, 1970, 00:00:00 GMT
-
-
Method Details
-
getValue
Deprecated.Return the serialized string form of the Atom date- Returns:
- the serialized string form of the date as specified by RFC4287
-
setValue
Deprecated.Sets the value of the Atom date using the serialized string form- Parameters:
value- The serialized string form of the date
-
setValue
Deprecated.Sets the value of the Atom date using java.util.Date- Parameters:
date- A java.util.Date- Throws:
NullPointerException- ifdateisnull
-
setValue
Deprecated.Sets the value of the Atom date using java.util.Calendar- Parameters:
calendar- a java.util.Calendar
-
setValue
Deprecated.Sets the value of the Atom date using the number of milliseconds since January 1, 1970, 00:00:00 GMT- Parameters:
timestamp- The number of milliseconds since January 1, 1970, 00:00:00 GMT
-
getDate
Deprecated.Returns the value of this Atom Date- Returns:
- A java.util.Date representing this Atom Date
-
getCalendar
Deprecated.Returns the value of this Atom Date as a java.util.Calendar- Returns:
- A java.util.Calendar representing this Atom Date
-
getTime
public long getTime()Deprecated.Returns the value of this Atom Date as the number of milliseconds since January 1, 1970, 00:00:00 GMT- Returns:
- The number of milliseconds since January 1, 1970, 00:00:00 GMT
-
toString
Deprecated. -
hashCode
public int hashCode()Deprecated. -
equals
Deprecated. -
clone
Deprecated. -
parse
Deprecated.Parse the serialized string form into a java.util.Date- Parameters:
date- The serialized string form of the date- Returns:
- The created java.util.Date
-
format
Deprecated.Create the serialized string form from a java.util.Date- Parameters:
d- A java.util.Date- Returns:
- The serialized string form of the date
-
valueOf
Deprecated.Create a new Atom Date instance from the serialized string form- Parameters:
value- The serialized string form of the date- Returns:
- The created AtomDate
-
valueOf
Deprecated.Create a new Atom Date instance from a java.util.Date- Parameters:
value- a java.util.Date- Returns:
- The created AtomDate
-
valueOf
Deprecated.Create a new Atom Date instance from a java.util.Calendar- Parameters:
value- A java.util.Calendar- Returns:
- The created AtomDate
-
valueOf
Deprecated.Create a new Atom Date instance using the number of milliseconds since January 1, 1970, 00:00:00 GMT- Parameters:
value- The number of milliseconds since January 1, 1970, 00:00:00 GMT- Returns:
- The created AtomDate
-