Class XTimeExtension

  • All Implemented Interfaces:
    java.io.Serializable

    public class XTimeExtension
    extends XExtension
    This extension defines the Time perspective on event logs. It makes it possible to assign to each event a timestamp, describing when the event has occurred.
    Author:
    Christian W. Guenther (christian@deckfour.org)
    See Also:
    Serialized Form
    • Field Detail

      • EXTENSION_URI

        public static final java.net.URI EXTENSION_URI
        Unique URI of this extension.
      • KEY_TIMESTAMP

        public static final java.lang.String KEY_TIMESTAMP
        Key for the timestamp attribute.
        See Also:
        Constant Field Values
      • ATTR_TIMESTAMP

        public static XAttributeTimestamp ATTR_TIMESTAMP
        Timestamp attribute prototype.
    • Method Detail

      • instance

        public static XTimeExtension instance()
        Provides access to the singleton instance of this extension.
        Returns:
        The Time extension singleton.
      • extractTimestamp

        public java.util.Date extractTimestamp​(XEvent event)
        Extracts from a given event the timestamp.
        Parameters:
        event - Event to be queried.
        Returns:
        The timestamp of this event, as a Date object (may be null if not defined).
      • assignTimestamp

        public void assignTimestamp​(XEvent event,
                                    java.util.Date timestamp)
        Assigns to a given event its timestamp.
        Parameters:
        event - Event to be modified.
        timestamp - Timestamp, as a Date object.
      • assignTimestamp

        public void assignTimestamp​(XEvent event,
                                    long time)
        Assigns to a given event its timestamp.
        Parameters:
        event - Event to be modified.
        time - Timestamp, as a long of milliseconds in UNIX time.