Class Timestamp


public class Timestamp extends PrimitiveType<String>
Primitive type that represents an ISO 8601 timestamp.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    ISO 8601 date output format with milliseconds.
    static final String
    ISO 8601 date output format without milliseconds.
    static final org.joda.time.format.DateTimeFormatter
    ISO 8601 date output formatter with milliseconds.
    static final org.joda.time.format.DateTimeFormatter
    ISO 8601 date output formatter without milliseconds.
    static final org.joda.time.format.DateTimeFormatter
    ISO 8601 date input formatter.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Timestamp(org.joda.time.DateTime datetime)
     
    Timestamp(org.joda.time.Instant instant)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.joda.time.DateTime
    asDateTime(org.joda.time.DateTimeZone zone)
    Returns the timestamp as a Joda DateTime type.
    org.joda.time.Instant
    Returns the timestamp as a Joda DateTime type.
     
    static Timestamp
    valueOf(String value)
    Returns a Timestamp object holding the value of the specified string, or null if parsing failed.

    Methods inherited from class ome.xml.model.primitives.PrimitiveType

    equals, getValue

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • ISO8601_FORMAT_MS

      public static final String ISO8601_FORMAT_MS
      ISO 8601 date output format with milliseconds.
      See Also:
    • ISO8601_FORMAT_S

      public static final String ISO8601_FORMAT_S
      ISO 8601 date output format without milliseconds.
      See Also:
    • ISO8601_PARSER

      public static final org.joda.time.format.DateTimeFormatter ISO8601_PARSER
      ISO 8601 date input formatter.
    • ISO8601_FORMATTER_MS

      public static final org.joda.time.format.DateTimeFormatter ISO8601_FORMATTER_MS
      ISO 8601 date output formatter with milliseconds.
    • ISO8601_FORMATTER_S

      public static final org.joda.time.format.DateTimeFormatter ISO8601_FORMATTER_S
      ISO 8601 date output formatter without milliseconds.
  • Constructor Details

  • Method Details

    • valueOf

      public static Timestamp valueOf(String value)
      Returns a Timestamp object holding the value of the specified string, or null if parsing failed.
      Parameters:
      value - The string to be parsed.
      Returns:
      See above.
    • asInstant

      public org.joda.time.Instant asInstant()
      Returns the timestamp as a Joda DateTime type.
      Returns:
      See above.
    • asDateTime

      public org.joda.time.DateTime asDateTime(org.joda.time.DateTimeZone zone)
      Returns the timestamp as a Joda DateTime type.
      Parameters:
      zone - the DateTime instance uses the specified timezone, or the default zone if null.
      Returns:
      See above.
    • toString

      public String toString()
      Overrides:
      toString in class PrimitiveType<String>