public class XLogHelper
extends java.lang.Object
XLog l = XLogHelper.generateNewXLog("Process Name"); XTrace t1 = XLogHelper.insertTrace(l, "case1"); XEvent e11 = XLogHelper.insertEvent(t1, "A", new Date()); XEvent e12 = XLogHelper.insertEvent(t1, "B", new Date()); XTrace t2 = XLogHelper.insertTrace(l, "case2"); XEvent e21 = XLogHelper.insertEvent(t2, "A", new Date()); XEvent e22 = XLogHelper.insertEvent(t2, "B", new Date());It is also possible to "decorate" all the
XAttributable
elements,
such as XLog
, XTrace
, and XEvent
:
XLogHelper.decorateElement(t1, "cost", 1000.00); // with no extension XLogHelper.decorateElement(e11, "org:group", "Department 1", "Organizational"); // with "Organizational" extensionThere are decorateElement methods that can handle different element types, such as:
Constructor and Description |
---|
XLogHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Boolean value)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a boolean
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Boolean value,
java.lang.String extensionName)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a boolean
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.util.Date value)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a date
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.util.Date value,
java.lang.String extensionName)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a date
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Double value)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a double
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Double value,
java.lang.String extensionName)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a double
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Integer value)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with an
integer value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Integer value,
java.lang.String extensionName)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with an
integer value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Long value)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a boolean
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.Long value,
java.lang.String extensionName)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a long
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.String value)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a string
value |
static void |
decorateElement(org.deckfour.xes.model.XAttributable element,
java.lang.String attributeName,
java.lang.String value,
java.lang.String extensionName)
This method can be used to decorate an
XAttributable element
(such as XLog , XTrace , and XEvent ) with a string
value |
static org.deckfour.xes.model.XLog |
generateNewXLog(java.lang.String logName)
This method generates a new
XLog and returns it. |
static java.lang.String |
getName(org.deckfour.xes.model.XAttributable element)
This method returns the value of the attribute concept:name for
the given attributable element
|
static org.deckfour.xes.model.XEvent |
insertEvent(org.deckfour.xes.model.XTrace trace,
java.lang.String activityName,
java.util.Date timestamp)
This method creates a new
XEvent referring to the given activity
name, occurred at the given time. |
static org.deckfour.xes.model.XTrace |
insertTrace(org.deckfour.xes.model.XLog log,
java.lang.String caseId)
This method creates a new
XTrace with the given case id, adds it
to the given log object, and returns the new trace |
public static org.deckfour.xes.model.XLog generateNewXLog(java.lang.String logName)
XLog
and returns it. By default,
some of the standard extensions are registered, specifically:
XConceptExtension
;XLifecycleExtension
;XOrganizationalExtension
;XTimeExtension
.logName
- the name of the new logpublic static org.deckfour.xes.model.XTrace insertTrace(org.deckfour.xes.model.XLog log, java.lang.String caseId)
XTrace
with the given case id, adds it
to the given log object, and returns the new tracelog
- the log that is going to host the new tracecaseId
- the case identifier of the new tracepublic static org.deckfour.xes.model.XEvent insertEvent(org.deckfour.xes.model.XTrace trace, java.lang.String activityName, java.util.Date timestamp)
XEvent
referring to the given activity
name, occurred at the given time. The event is added to the given trace,
and returnedtrace
- the trace that is going to host the new eventactivityName
- the name of the activity the new event is going to
refer totimestamp
- the time the new event occurredpublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.String value, java.lang.String extensionName)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a string
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valueextensionName
- the extension namepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.String value)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a string
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valuepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Double value, java.lang.String extensionName)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a double
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valueextensionName
- the extension namepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Double value)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a double
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valuepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.util.Date value, java.lang.String extensionName)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a date
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valueextensionName
- the extension namepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.util.Date value)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a date
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valuepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Boolean value, java.lang.String extensionName)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a boolean
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valueextensionName
- the extension namepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Boolean value)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a boolean
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valuepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Long value, java.lang.String extensionName)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a long
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valueextensionName
- the extension namepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Long value)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with a boolean
valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valuepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Integer value, java.lang.String extensionName)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with an
integer valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valueextensionName
- the extension namepublic static void decorateElement(org.deckfour.xes.model.XAttributable element, java.lang.String attributeName, java.lang.Integer value)
XAttributable
element
(such as XLog
, XTrace
, and XEvent
) with an
integer valueelement
- the element to decorateattributeName
- the attribute namevalue
- the attribute valuepublic static java.lang.String getName(org.deckfour.xes.model.XAttributable element)
element
- the element to analyze