Package org.deckfour.xes.extension.std
Class XTimeExtension
- java.lang.Object
-
- org.deckfour.xes.extension.XExtension
-
- org.deckfour.xes.extension.std.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 Summary
Fields Modifier and Type Field Description static XAttributeTimestampATTR_TIMESTAMPTimestamp attribute prototype.static java.net.URIEXTENSION_URIUnique URI of this extension.static java.lang.StringKEY_TIMESTAMPKey for the timestamp attribute.-
Fields inherited from class org.deckfour.xes.extension.XExtension
allAttributes, eventAttributes, logAttributes, metaAttributes, name, prefix, traceAttributes, uri
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignTimestamp(XEvent event, long time)Assigns to a given event its timestamp.voidassignTimestamp(XEvent event, java.util.Date timestamp)Assigns to a given event its timestamp.java.util.DateextractTimestamp(XEvent event)Extracts from a given event the timestamp.static XTimeExtensioninstance()Provides access to the singleton instance of this extension.-
Methods inherited from class org.deckfour.xes.extension.XExtension
accept, equals, getDefinedAttributes, getEventAttributes, getLogAttributes, getMetaAttributes, getName, getPrefix, getTraceAttributes, getUri, hashCode, toString
-
-
-
-
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
nullif 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.
-
-