org.deckfour.xes.info.impl
Class XLogInfoImpl

java.lang.Object
  extended by org.deckfour.xes.info.impl.XLogInfoImpl
All Implemented Interfaces:
XLogInfo

public class XLogInfoImpl
extends Object
implements XLogInfo

This class implements a bare-bones log info summary which can be created on demand by using applications. The log info summary is based on an event classifier, which is used to identify event class abstractions.

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

Field Summary
protected  XEventClassifier defaultClassifier
          The default event classifier for this log info instance.
protected  XAttributeInfoImpl eventAttributeInfo
          Attribute information registry on the event level.
protected  Map<XEventClassifier,XEventClasses> eventClasses
          Maps the event classifiers covered in this log info to their respectively created event classes.
static XEventClassifier LIFECYCLE_TRANSITION_CLASSIFIER
          Standard event classifier.
protected  XLog log
          The event log which is summarized.
protected  XAttributeInfoImpl logAttributeInfo
          Attribute information registry on the log level.
protected  XTimeBoundsImpl logBoundaries
          Timestamp boundaries for the complete log.
protected  XAttributeInfoImpl metaAttributeInfo
          Attribute information registry on the meta level.
static XEventClassifier NAME_CLASSIFIER
          Standard event classifier.
protected  int numberOfEvents
          The total number of events in this log.
protected  int numberOfTraces
          The number of traces in this log.
static XEventClassifier RESOURCE_CLASSIFIER
          Standard event classifier.
static XEventClassifier STANDARD_CLASSIFIER
          Default event classifier.
protected  XAttributeInfoImpl traceAttributeInfo
          Attribute information registry on the trace level.
protected  HashMap<XTrace,XTimeBoundsImpl> traceBoundaries
          Map of timestamp boundaries for each trace, indexed by reference to the respective trace.
 
Constructor Summary
XLogInfoImpl(XLog log, XEventClassifier defaultClassifier, Collection<XEventClassifier> classifiers)
          Creates a new log summary.
 
Method Summary
static XLogInfo create(XLog log)
          Creates a new log info summary with the standard event classifier.
static XLogInfo create(XLog log, XEventClassifier defaultClassifier)
          Creates a new log info summary with a custom event classifier.
static XLogInfo create(XLog log, XEventClassifier defaultClassifier, Collection<XEventClassifier> classifiers)
          Creates a new log info summary with a collection of custom event classifiers.
 XAttributeInfo getEventAttributeInfo()
          Retrieves attribute information about all attributes this log contains on the event level.
 XEventClasses getEventClasses()
          Retrieves the event classes of the summarized log, as defined by the event classifier used for this summary.
 XEventClasses getEventClasses(XEventClassifier classifier)
          Retrieves the event classes for a given classifier.
 Collection<XEventClassifier> getEventClassifiers()
          Retrieves the set of event classifiers covered by this log info, i.e., for which event classes are registered in this log info instance.
 XLog getLog()
          Retrieves the log used for this summary.
 XAttributeInfo getLogAttributeInfo()
          Retrieves attribute information about all attributes this log contains on the log level.
 XTimeBounds getLogTimeBoundaries()
          Retrieves the global timestamp boundaries of this log.
 XAttributeInfo getMetaAttributeInfo()
          Retrieves attribute information about all attributes this log contains on the meta (i.e., attribute) level.
 XEventClasses getNameClasses()
          Retrieves the event name classes of the summarized log.
 int getNumberOfEvents()
          Retrieves the total number of events in this log.
 int getNumberOfTraces()
          Retrieves the number of traces in this log.
 XEventClasses getResourceClasses()
          Retrieves the resource classes of the summarized log.
 XAttributeInfo getTraceAttributeInfo()
          Retrieves attribute information about all attributes this log contains on the trace level.
 XTimeBounds getTraceTimeBoundaries(XTrace trace)
          Retrieves the timestamp boundaries for a specified trace.
 XEventClasses getTransitionClasses()
          Retrieves the lifecycle transition classes of the summarized log.
protected  void registerAttributes(XAttributeInfoImpl attributeInfo, XAttributable attributable)
          Registers all attributes of a given attributable, i.e.
protected  void setup()
          Creates the internal data structures of this summary on setup from the log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deckfour.xes.info.XLogInfo
toString
 

Field Detail

STANDARD_CLASSIFIER

public static final XEventClassifier STANDARD_CLASSIFIER
Default event classifier. This classifier considers two events as belonging to the same class, if they have both the same event name and the same lifecycle transition (if available).


NAME_CLASSIFIER

public static final XEventClassifier NAME_CLASSIFIER
Standard event classifier. This classifier considers two events as belonging to the same class, if they have the same value for the event name attribute.


RESOURCE_CLASSIFIER

public static final XEventClassifier RESOURCE_CLASSIFIER
Standard event classifier. This classifier considers two events as belonging to the same class, if they have the same value for the resource attribute.


LIFECYCLE_TRANSITION_CLASSIFIER

public static final XEventClassifier LIFECYCLE_TRANSITION_CLASSIFIER
Standard event classifier. This classifier considers two events as belonging to the same class, if they have the same value for the lifecycle transition attribute.


log

protected XLog log
The event log which is summarized.


numberOfEvents

protected int numberOfEvents
The total number of events in this log.


numberOfTraces

protected int numberOfTraces
The number of traces in this log.


eventClasses

protected Map<XEventClassifier,XEventClasses> eventClasses
Maps the event classifiers covered in this log info to their respectively created event classes.


defaultClassifier

protected XEventClassifier defaultClassifier
The default event classifier for this log info instance.


logBoundaries

protected XTimeBoundsImpl logBoundaries
Timestamp boundaries for the complete log.


traceBoundaries

protected HashMap<XTrace,XTimeBoundsImpl> traceBoundaries
Map of timestamp boundaries for each trace, indexed by reference to the respective trace.


logAttributeInfo

protected XAttributeInfoImpl logAttributeInfo
Attribute information registry on the log level.


traceAttributeInfo

protected XAttributeInfoImpl traceAttributeInfo
Attribute information registry on the trace level.


eventAttributeInfo

protected XAttributeInfoImpl eventAttributeInfo
Attribute information registry on the event level.


metaAttributeInfo

protected XAttributeInfoImpl metaAttributeInfo
Attribute information registry on the meta level.

Constructor Detail

XLogInfoImpl

public XLogInfoImpl(XLog log,
                    XEventClassifier defaultClassifier,
                    Collection<XEventClassifier> classifiers)
Creates a new log summary.

Parameters:
log - The log to create a summary of.
classifier - The event classifier to be used.
Method Detail

create

public static XLogInfo create(XLog log)
Creates a new log info summary with the standard event classifier.

Parameters:
log - The event log to create an info summary for.
Returns:
The log info for this log.

create

public static XLogInfo create(XLog log,
                              XEventClassifier defaultClassifier)
Creates a new log info summary with a custom event classifier.

Parameters:
log - The event log to create an info summary for.
defaultClassifier - The default event classifier to be used.
Returns:
The log info summary for this log.

create

public static XLogInfo create(XLog log,
                              XEventClassifier defaultClassifier,
                              Collection<XEventClassifier> classifiers)
Creates a new log info summary with a collection of custom event classifiers.

Parameters:
log - The event log to create an info summary for.
defaultClassifier - The default event classifier to be used.
classifiers - A collection of additional event classifiers to be covered by the created log info instance.
Returns:
The log info summary for this log.

setup

protected void setup()
Creates the internal data structures of this summary on setup from the log.


registerAttributes

protected void registerAttributes(XAttributeInfoImpl attributeInfo,
                                  XAttributable attributable)
Registers all attributes of a given attributable, i.e. model type hierarchy element, in the given attribute info registry.

Parameters:
attributeInfo - Attribute info registry to use for registration.
attributable - Attributable whose attributes to register.

getLog

public XLog getLog()
Description copied from interface: XLogInfo
Retrieves the log used for this summary.

Specified by:
getLog in interface XLogInfo
Returns:
The event log which this summary describes.

getNumberOfEvents

public int getNumberOfEvents()
Description copied from interface: XLogInfo
Retrieves the total number of events in this log.

Specified by:
getNumberOfEvents in interface XLogInfo
Returns:
Total number of events.

getNumberOfTraces

public int getNumberOfTraces()
Description copied from interface: XLogInfo
Retrieves the number of traces in this log.

Specified by:
getNumberOfTraces in interface XLogInfo
Returns:
Number of traces available in this log.

getEventClasses

public XEventClasses getEventClasses(XEventClassifier classifier)
Description copied from interface: XLogInfo
Retrieves the event classes for a given classifier.

Note:The given event classifier must be covered by this log info, i.e., the log info must have been created with this classifier. Otherwise, this method will return null. You can retrieve the collection of event classifiers covered by this log info instance by calling the method getEventClassifiers().

Specified by:
getEventClasses in interface XLogInfo
Parameters:
classifier - The classifier for which to retrieve the event classes.
Returns:
The requested event classes, or null if the given event classifier is not covered by this log info instance.

getEventClassifiers

public Collection<XEventClassifier> getEventClassifiers()
Description copied from interface: XLogInfo
Retrieves the set of event classifiers covered by this log info, i.e., for which event classes are registered in this log info instance.

Specified by:
getEventClassifiers in interface XLogInfo
Returns:
The collection of event classifiers covered by this log info instance.

getEventClasses

public XEventClasses getEventClasses()
Description copied from interface: XLogInfo
Retrieves the event classes of the summarized log, as defined by the event classifier used for this summary.

Specified by:
getEventClasses in interface XLogInfo
Returns:
The event classes of the summarized log.

getResourceClasses

public XEventClasses getResourceClasses()
Description copied from interface: XLogInfo
Retrieves the resource classes of the summarized log.

Specified by:
getResourceClasses in interface XLogInfo
Returns:
The resource classes of the summarized log.

getNameClasses

public XEventClasses getNameClasses()
Description copied from interface: XLogInfo
Retrieves the event name classes of the summarized log.

Specified by:
getNameClasses in interface XLogInfo
Returns:
The event name classes of the summarized log.

getTransitionClasses

public XEventClasses getTransitionClasses()
Description copied from interface: XLogInfo
Retrieves the lifecycle transition classes of the summarized log.

Specified by:
getTransitionClasses in interface XLogInfo
Returns:
The lifecycle transition classes of the summarized log.

getLogTimeBoundaries

public XTimeBounds getLogTimeBoundaries()
Description copied from interface: XLogInfo
Retrieves the global timestamp boundaries of this log.

Specified by:
getLogTimeBoundaries in interface XLogInfo
Returns:
Timestamp boundaries for the complete log.

getTraceTimeBoundaries

public XTimeBounds getTraceTimeBoundaries(XTrace trace)
Description copied from interface: XLogInfo
Retrieves the timestamp boundaries for a specified trace.

Specified by:
getTraceTimeBoundaries in interface XLogInfo
Parameters:
trace - Trace to be queried for.
Returns:
Timestamp boundaries for the indicated trace.

getLogAttributeInfo

public XAttributeInfo getLogAttributeInfo()
Description copied from interface: XLogInfo
Retrieves attribute information about all attributes this log contains on the log level.

Specified by:
getLogAttributeInfo in interface XLogInfo
Returns:
Attribute information on the log level.

getTraceAttributeInfo

public XAttributeInfo getTraceAttributeInfo()
Description copied from interface: XLogInfo
Retrieves attribute information about all attributes this log contains on the trace level.

Specified by:
getTraceAttributeInfo in interface XLogInfo
Returns:
Attribute information on the trace level.

getEventAttributeInfo

public XAttributeInfo getEventAttributeInfo()
Description copied from interface: XLogInfo
Retrieves attribute information about all attributes this log contains on the event level.

Specified by:
getEventAttributeInfo in interface XLogInfo
Returns:
Attribute information on the event level.

getMetaAttributeInfo

public XAttributeInfo getMetaAttributeInfo()
Description copied from interface: XLogInfo
Retrieves attribute information about all attributes this log contains on the meta (i.e., attribute) level.

Specified by:
getMetaAttributeInfo in interface XLogInfo
Returns:
Attribute information on the meta level.