Package org.deckfour.xes.info.impl
Class XLogInfoImpl
- java.lang.Object
-
- org.deckfour.xes.info.impl.XLogInfoImpl
-
- All Implemented Interfaces:
XLogInfo
public class XLogInfoImpl extends java.lang.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
Fields Modifier and Type Field Description protected XEventClassifierdefaultClassifierThe default event classifier for this log info instance.protected XAttributeInfoImpleventAttributeInfoAttribute information registry on the event level.protected java.util.Map<XEventClassifier,XEventClasses>eventClassesMaps the event classifiers covered in this log info to their respectively created event classes.static XEventClassifierLIFECYCLE_TRANSITION_CLASSIFIERStandard event classifier.protected XLoglogThe event log which is summarized.protected XAttributeInfoImpllogAttributeInfoAttribute information registry on the log level.protected XTimeBoundsImpllogBoundariesTimestamp boundaries for the complete log.protected XAttributeInfoImplmetaAttributeInfoAttribute information registry on the meta level.static XEventClassifierNAME_CLASSIFIERStandard event classifier.protected intnumberOfEventsThe total number of events in this log.protected intnumberOfTracesThe number of traces in this log.static XEventClassifierRESOURCE_CLASSIFIERStandard event classifier.static XEventClassifierSTANDARD_CLASSIFIERDefault event classifier.protected XAttributeInfoImpltraceAttributeInfoAttribute information registry on the trace level.protected java.util.HashMap<XTrace,XTimeBoundsImpl>traceBoundariesMap of timestamp boundaries for each trace, indexed by reference to the respective trace.
-
Constructor Summary
Constructors Constructor Description XLogInfoImpl(XLog log, XEventClassifier defaultClassifier, java.util.Collection<XEventClassifier> classifiers)Creates a new log summary.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XLogInfocreate(XLog log)Creates a new log info summary with the standard event classifier.static XLogInfocreate(XLog log, XEventClassifier defaultClassifier)Creates a new log info summary with a custom event classifier.static XLogInfocreate(XLog log, XEventClassifier defaultClassifier, java.util.Collection<XEventClassifier> classifiers)Creates a new log info summary with a collection of custom event classifiers.XAttributeInfogetEventAttributeInfo()Retrieves attribute information about all attributes this log contains on the event level.XEventClassesgetEventClasses()Retrieves the event classes of the summarized log, as defined by the event classifier used for this summary.XEventClassesgetEventClasses(XEventClassifier classifier)Retrieves the event classes for a given classifier.java.util.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.XLoggetLog()Retrieves the log used for this summary.XAttributeInfogetLogAttributeInfo()Retrieves attribute information about all attributes this log contains on the log level.XTimeBoundsgetLogTimeBoundaries()Retrieves the global timestamp boundaries of this log.XAttributeInfogetMetaAttributeInfo()Retrieves attribute information about all attributes this log contains on the meta (i.e., attribute) level.XEventClassesgetNameClasses()Retrieves the event name classes of the summarized log.intgetNumberOfEvents()Retrieves the total number of events in this log.intgetNumberOfTraces()Retrieves the number of traces in this log.XEventClassesgetResourceClasses()Retrieves the resource classes of the summarized log.XAttributeInfogetTraceAttributeInfo()Retrieves attribute information about all attributes this log contains on the trace level.XTimeBoundsgetTraceTimeBoundaries(XTrace trace)Retrieves the timestamp boundaries for a specified trace.XEventClassesgetTransitionClasses()Retrieves the lifecycle transition classes of the summarized log.protected voidregisterAttributes(XAttributeInfoImpl attributeInfo, XAttributable attributable)Registers all attributes of a given attributable, i.e.protected voidsetup()Creates the internal data structures of this summary on setup from the log.
-
-
-
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 java.util.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 java.util.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, java.util.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, java.util.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:XLogInfoRetrieves the log used for this summary.
-
getNumberOfEvents
public int getNumberOfEvents()
Description copied from interface:XLogInfoRetrieves the total number of events in this log.- Specified by:
getNumberOfEventsin interfaceXLogInfo- Returns:
- Total number of events.
-
getNumberOfTraces
public int getNumberOfTraces()
Description copied from interface:XLogInfoRetrieves the number of traces in this log.- Specified by:
getNumberOfTracesin interfaceXLogInfo- Returns:
- Number of traces available in this log.
-
getEventClasses
public XEventClasses getEventClasses(XEventClassifier classifier)
Description copied from interface:XLogInfoRetrieves 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 methodgetEventClassifiers().- Specified by:
getEventClassesin interfaceXLogInfo- Parameters:
classifier- The classifier for which to retrieve the event classes.- Returns:
- The requested event classes, or
nullif the given event classifier is not covered by this log info instance.
-
getEventClassifiers
public java.util.Collection<XEventClassifier> getEventClassifiers()
Description copied from interface:XLogInfoRetrieves 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:
getEventClassifiersin interfaceXLogInfo- Returns:
- The collection of event classifiers covered by this log info instance.
-
getEventClasses
public XEventClasses getEventClasses()
Description copied from interface:XLogInfoRetrieves the event classes of the summarized log, as defined by the event classifier used for this summary.- Specified by:
getEventClassesin interfaceXLogInfo- Returns:
- The event classes of the summarized log.
-
getResourceClasses
public XEventClasses getResourceClasses()
Description copied from interface:XLogInfoRetrieves the resource classes of the summarized log.- Specified by:
getResourceClassesin interfaceXLogInfo- Returns:
- The resource classes of the summarized log.
-
getNameClasses
public XEventClasses getNameClasses()
Description copied from interface:XLogInfoRetrieves the event name classes of the summarized log.- Specified by:
getNameClassesin interfaceXLogInfo- Returns:
- The event name classes of the summarized log.
-
getTransitionClasses
public XEventClasses getTransitionClasses()
Description copied from interface:XLogInfoRetrieves the lifecycle transition classes of the summarized log.- Specified by:
getTransitionClassesin interfaceXLogInfo- Returns:
- The lifecycle transition classes of the summarized log.
-
getLogTimeBoundaries
public XTimeBounds getLogTimeBoundaries()
Description copied from interface:XLogInfoRetrieves the global timestamp boundaries of this log.- Specified by:
getLogTimeBoundariesin interfaceXLogInfo- Returns:
- Timestamp boundaries for the complete log.
-
getTraceTimeBoundaries
public XTimeBounds getTraceTimeBoundaries(XTrace trace)
Description copied from interface:XLogInfoRetrieves the timestamp boundaries for a specified trace.- Specified by:
getTraceTimeBoundariesin interfaceXLogInfo- Parameters:
trace- Trace to be queried for.- Returns:
- Timestamp boundaries for the indicated trace.
-
getLogAttributeInfo
public XAttributeInfo getLogAttributeInfo()
Description copied from interface:XLogInfoRetrieves attribute information about all attributes this log contains on the log level.- Specified by:
getLogAttributeInfoin interfaceXLogInfo- Returns:
- Attribute information on the log level.
-
getTraceAttributeInfo
public XAttributeInfo getTraceAttributeInfo()
Description copied from interface:XLogInfoRetrieves attribute information about all attributes this log contains on the trace level.- Specified by:
getTraceAttributeInfoin interfaceXLogInfo- Returns:
- Attribute information on the trace level.
-
getEventAttributeInfo
public XAttributeInfo getEventAttributeInfo()
Description copied from interface:XLogInfoRetrieves attribute information about all attributes this log contains on the event level.- Specified by:
getEventAttributeInfoin interfaceXLogInfo- Returns:
- Attribute information on the event level.
-
getMetaAttributeInfo
public XAttributeInfo getMetaAttributeInfo()
Description copied from interface:XLogInfoRetrieves attribute information about all attributes this log contains on the meta (i.e., attribute) level.- Specified by:
getMetaAttributeInfoin interfaceXLogInfo- Returns:
- Attribute information on the meta level.
-
-