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 anXAttribute
as parameter.
- Author:
- Andrea Burattin
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BEvent(String processName, String caseId, String activityName)
Creates a newBEvent
referring to one eventBEvent(String processName, String caseId, String activityName, Date time)
Creates a newBEvent
referring to one eventBEvent(String processName, String caseId, String activityName, Date time, Collection<org.apache.commons.lang3.tuple.Pair<String,String>> eventAttributes)
Creates a newBEvent
referring to one event
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BEvent o)
boolean
equals(Object obj)
Map<String,Serializable>
getEventAttributes()
Gets all event level attributesString
getEventName()
Gets the event name (a.k.a.Date
getEventTime()
Gets the event timeMap<String,Serializable>
getProcessAttributes()
Gets all process level attributesString
getProcessName()
Gets the process nameMap<String,Serializable>
getTraceAttributes()
Gets all trace level attributesString
getTraceName()
Gets the trace name (a.k.a.int
hashCode()
void
setEventAttribute(String name, Serializable value)
Sets a event level attributevoid
setEventAttribute(String name, org.deckfour.xes.model.XAttribute value)
Sets a event level attributevoid
setEventName(String name)
Sets the event name (a.k.a.void
setProcessAttribute(String name, Serializable value)
Sets a process level attributevoid
setProcessAttribute(String name, org.deckfour.xes.model.XAttribute value)
Sets a process level attributevoid
setProcessName(String name)
Sets the process namevoid
setTimestamp(Date timestamp)
Sets the event timevoid
setTraceAttribute(String name, Serializable value)
Sets a trace level attributevoid
setTraceAttribute(String name, org.deckfour.xes.model.XAttribute value)
Sets a trace level attributevoid
setTraceName(String name)
Sets the trace name (a.k.a.String
toString()
-
-
-
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 newBEvent
referring 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 newBEvent
referring 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 newBEvent
referring 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:
compareTo
in interfaceComparable<BEvent>
-
-