Package beamline.events
Class BEvent
- java.lang.Object
-
- beamline.events.BEvent
-
- All Implemented Interfaces:
Serializable,Comparable<BEvent>
public class BEvent extends Object implements Serializable, Comparable<BEvent>
This class describes an event for the Beamline framework. An event is the minimal observable unit in the context of streaming process mining. Each event is expected to belong to a process instance which, in turn, belongs to a process. For this reason, when an event is created (for example using theBEvent(String, String, String)constructor).Some level of compatibility with the OpenXES library is guaranteed by:
- using the same attribute names for internally storing the name of the attributes;
- having the capability of setting attributes using the
setTraceAttribute(String, XAttribute)andsetEventAttribute(String, XAttribute)which take anXAttributeas parameter.
- Author:
- Andrea Burattin
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BEvent(String processName, String caseId, String activityName)Creates a newBEventreferring to one eventBEvent(String processName, String caseId, String activityName, Date time)Creates a newBEventreferring to one eventBEvent(String processName, String caseId, String activityName, Date time, Collection<org.apache.commons.lang3.tuple.Pair<String,String>> eventAttributes)Creates a newBEventreferring to one event
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(BEvent o)booleanequals(Object obj)Map<String,Serializable>getEventAttributes()Gets all event level attributesStringgetEventName()Gets the event name (a.k.a.DategetEventTime()Gets the event timeMap<String,Serializable>getProcessAttributes()Gets all process level attributesStringgetProcessName()Gets the process nameMap<String,Serializable>getTraceAttributes()Gets all trace level attributesStringgetTraceName()Gets the trace name (a.k.a.inthashCode()voidsetEventAttribute(String name, Serializable value)Sets a event level attributevoidsetEventAttribute(String name, org.deckfour.xes.model.XAttribute value)Sets a event level attributevoidsetEventName(String name)Sets the event name (a.k.a.voidsetProcessAttribute(String name, Serializable value)Sets a process level attributevoidsetProcessAttribute(String name, org.deckfour.xes.model.XAttribute value)Sets a process level attributevoidsetProcessName(String name)Sets the process namevoidsetTimestamp(Date timestamp)Sets the event timevoidsetTraceAttribute(String name, Serializable value)Sets a trace level attributevoidsetTraceAttribute(String name, org.deckfour.xes.model.XAttribute value)Sets a trace level attributevoidsetTraceName(String name)Sets the trace name (a.k.a.StringtoString()
-
-
-
Constructor Detail
-
BEvent
public BEvent(String processName, String caseId, String activityName, Date time, Collection<org.apache.commons.lang3.tuple.Pair<String,String>> eventAttributes) throws EventException
Creates a newBEventreferring to one event- Parameters:
processName- the name of the processactivityName- the name of the activitycaseId- the identifier of the process instancetime- the time when the event has happenedeventAttributes- a collection of string attributes for the event- Throws:
EventException- this exception is thrown is incomplete information is provided
-
BEvent
public BEvent(String processName, String caseId, String activityName, Date time) throws EventException
Creates a newBEventreferring to one event- Parameters:
processName- the name of the processactivityName- the name of the activitycaseId- the identifier of the process instancetime- the time when the event has happened- Throws:
EventException- this exception is thrown is incomplete information is provided
-
BEvent
public BEvent(String processName, String caseId, String activityName) throws EventException
Creates a newBEventreferring to one event- Parameters:
processName- the name of the processactivityName- the name of the activitycaseId- the identifier of the process instance- Throws:
EventException- this exception is thrown is incomplete information is provided
-
-
Method Detail
-
setProcessName
public void setProcessName(String name)
Sets the process name- Parameters:
name- the process name
-
getProcessName
public String getProcessName()
Gets the process name- Returns:
- the process name
-
setTraceName
public void setTraceName(String name)
Sets the trace name (a.k.a. case id)- Parameters:
name- the trace name
-
getTraceName
public String getTraceName()
Gets the trace name (a.k.a. case id)- Returns:
- the trace name
-
setEventName
public void setEventName(String name)
Sets the event name (a.k.a. activity name)- Parameters:
name- the event name
-
getEventName
public String getEventName()
Gets the event name (a.k.a. activity name)- Returns:
- the event name
-
setTimestamp
public void setTimestamp(Date timestamp)
Sets the event time- Parameters:
timestamp- the event time
-
getEventTime
public Date getEventTime()
Gets the event time- Returns:
- the event time
-
getEventAttributes
public Map<String,Serializable> getEventAttributes()
Gets all event level attributes- Returns:
- the attributes
-
getTraceAttributes
public Map<String,Serializable> getTraceAttributes()
Gets all trace level attributes- Returns:
- the attributes
-
getProcessAttributes
public Map<String,Serializable> getProcessAttributes()
Gets all process level attributes- Returns:
- the attributes
-
setEventAttribute
public void setEventAttribute(String name, Serializable value)
Sets a event level attribute- Parameters:
name- the attribute namevalue- the attribute value
-
setEventAttribute
public void setEventAttribute(String name, org.deckfour.xes.model.XAttribute value)
Sets a event level attribute- Parameters:
name- the attribute namevalue- the attribute value
-
setTraceAttribute
public void setTraceAttribute(String name, Serializable value)
Sets a trace level attribute- Parameters:
name- the attribute namevalue- the attribute value
-
setTraceAttribute
public void setTraceAttribute(String name, org.deckfour.xes.model.XAttribute value)
Sets a trace level attribute- Parameters:
name- the attribute namevalue- the attribute value
-
setProcessAttribute
public void setProcessAttribute(String name, Serializable value)
Sets a process level attribute- Parameters:
name- the attribute namevalue- the attribute value
-
setProcessAttribute
public void setProcessAttribute(String name, org.deckfour.xes.model.XAttribute value)
Sets a process level attribute- Parameters:
name- the attribute namevalue- the attribute value
-
compareTo
public int compareTo(BEvent o)
- Specified by:
compareToin interfaceComparable<BEvent>
-
-