org.deckfour.xes.extension.std
Class XLifecycleExtension

java.lang.Object
  extended by org.deckfour.xes.extension.XExtension
      extended by org.deckfour.xes.extension.std.XLifecycleExtension

public class XLifecycleExtension
extends XExtension

Extension defining additional attributes for the event lifecycle. Lifecycles define a set of states for activities, with an accompanying set of transitions between those states. Any event which is referring to by a lifecycle represents a certain transition of an activity within that lifecycle.

Author:
Christian W. Guenther (christian@deckfour.org)

Nested Class Summary
static class XLifecycleExtension.StandardModel
          Enumeration for the standard lifecycle model.
 
Field Summary
static XAttributeLiteral ATTR_MODEL
          Lifecycle model attribute prototype
static XAttributeLiteral ATTR_TRANSITION
          Transition attribute prototype
static URI EXTENSION_URI
          The unique URI of this extension.
static String KEY_MODEL
          Key for the lifecycle model attribute.
static String KEY_TRANSITION
          Key for the transition attribute.
static String VALUE_MODEL_STANDARD
          Value for the lifecycle model attribute referring to the standard model.
 
Fields inherited from class org.deckfour.xes.extension.XExtension
allAttributes, eventAttributes, logAttributes, metaAttributes, name, prefix, traceAttributes, uri
 
Method Summary
 void assignModel(XLog log, String model)
          Assigns a value for the lifecycle model identifier to a given log.
 void assignStandardTransition(XEvent event, XLifecycleExtension.StandardModel transition)
          Assigns a standard lifecycle transition to the given event.
 void assignTransition(XEvent event, String transition)
          Assigns a lifecycle transition string to the given event.
 String extractModel(XLog log)
          Extracts the lifecycle model identifier from a given log.
 XLifecycleExtension.StandardModel extractStandardTransition(XEvent event)
          Extracts the standard lifecycle transition object from a given event.
 String extractTransition(XEvent event)
          Extracts the lifecycle transition string from a given event.
static XLifecycleExtension instance()
          Provides static access to the singleton instance of this extension.
 boolean usesStandardModel(XLog log)
          Checks, whether a given log uses the standard model for lifecycle transitions.
 
Methods inherited from class org.deckfour.xes.extension.XExtension
equals, getDefinedAttributes, getEventAttributes, getLogAttributes, getMetaAttributes, getName, getPrefix, getTraceAttributes, getUri, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXTENSION_URI

public static final URI EXTENSION_URI
The unique URI of this extension.


KEY_MODEL

public static final String KEY_MODEL
Key for the lifecycle model attribute.

See Also:
Constant Field Values

KEY_TRANSITION

public static final String KEY_TRANSITION
Key for the transition attribute.

See Also:
Constant Field Values

VALUE_MODEL_STANDARD

public static final String VALUE_MODEL_STANDARD
Value for the lifecycle model attribute referring to the standard model.

See Also:
Constant Field Values

ATTR_MODEL

public static XAttributeLiteral ATTR_MODEL
Lifecycle model attribute prototype


ATTR_TRANSITION

public static XAttributeLiteral ATTR_TRANSITION
Transition attribute prototype

Method Detail

instance

public static XLifecycleExtension instance()
Provides static access to the singleton instance of this extension.

Returns:
Singleton instance.

extractModel

public String extractModel(XLog log)
Extracts the lifecycle model identifier from a given log.

Parameters:
log - Event log.
Returns:
Lifecycle model identifier string.

assignModel

public void assignModel(XLog log,
                        String model)
Assigns a value for the lifecycle model identifier to a given log.

Parameters:
log - Log to be tagged.
model - Lifecycle model identifier string to be used.

usesStandardModel

public boolean usesStandardModel(XLog log)
Checks, whether a given log uses the standard model for lifecycle transitions.

Parameters:
log - Log to be checked.
Returns:
Returns true, if the log indeed uses the standard lifecycle model.

extractTransition

public String extractTransition(XEvent event)
Extracts the lifecycle transition string from a given event.

Parameters:
event - An event.
Returns:
The lifecycle transition string of this event. Can be null, if not defined.

extractStandardTransition

public XLifecycleExtension.StandardModel extractStandardTransition(XEvent event)
Extracts the standard lifecycle transition object from a given event.

Parameters:
event - An event.
Returns:
The standard lifecycle transition instance of this event. Can be null, if not defined.

assignTransition

public void assignTransition(XEvent event,
                             String transition)
Assigns a lifecycle transition string to the given event.

Parameters:
event - Event to be tagged.
transition - Lifecycle transition string to be assigned.

assignStandardTransition

public void assignStandardTransition(XEvent event,
                                     XLifecycleExtension.StandardModel transition)
Assigns a standard lifecycle transition to the given event.

Parameters:
event - Event to be tagged.
transition - Standard lifecycle transition to be assigned.