opyenxes.info package¶
Submodules¶
opyenxes.info.XAttributeInfo module¶
-
class
opyenxes.info.XAttributeInfo.
XAttributeInfo
[source]¶ Bases:
object
This class provides aggregate information about attributes within one container in the log type hierarchy. For example, it may store information about all event attributes in a log.
-
get_attribute_keys
()[source]¶ Provides access to prototypes of all registered attributes’ keys.
Returns: A tuple of attribute keys. Return type: tuple
-
get_attributes
()[source]¶ Provides access to prototypes of all registered attributes.
Returns: A tuple of attribute prototypes. Return type: tuple
-
get_attributes_for_extension
(extension)[source]¶ For a given extension, returns prototypes of all registered attributes defined by that extension.
Parameters: extension (XExtension) – Requested attribute extension. Returns: A tuple of attribute prototypes registered for that extension. Return type: tuple
-
get_attributes_for_type
(type_argument)[source]¶ For a given type, returns prototypes of all registered attributes with that type.
Parameters: type_argument (type) – Requested attribute type. Returns: A tuple of attribute prototypes registered for that type. Return type: tuple
-
get_attributes_without_extension
()[source]¶ Returns prototypes of all registered attributes defined by no extension.
Returns: A tuple of attribute prototypes registered for no extension. Return type: tuple
-
get_frequency
(element)[source]¶ Returns the total frequency, i.e. number of occurrences, for the requested attribute.
Parameters: element (str or XAttribute) – Key of an attribute or an attribute. Returns: Total frequency of that attribute as registered. Return type: int
-
get_keys_for_extension
(extension)[source]¶ For a given extension, returns the keys of all registered attributes defined by that extension.
Parameters: extension (XExtension) – Requested attribute extension. Returns: A tuple of attribute keys registered for that extension. Return type: tuple
-
get_keys_for_type
(type_argument)[source]¶ For a given type, returns the keys of all registered attributes with that type.
Parameters: type_argument (type) – Requested attribute type. Returns: A tuple of attribute keys registered for that type. Return type: tuple
-
get_keys_without_extension
()[source]¶ Returns keys of all registered attributes defined by no extension.
Returns: A tuple of attribute keys registered for no extension. Return type: tuple
-
opyenxes.info.XAttributeNameMap module¶
-
class
opyenxes.info.XAttributeNameMap.
XAttributeNameMap
(name)[source]¶ Bases:
object
Implements an attribute name mapping.
Parameters: name (str) – Name of the mapping. -
get_mapping_name
()[source]¶ Returns the name of this mapping.
Returns: The name of this mapping. Return type: str
-
map
(attribute)[source]¶ Returns the name mapped onto the provided attribute by this mapping. If no mapping for the given attribute is provided by this map, null is returned.
Parameters: attribute (XAttribute or Str) – Attribute or Attribute key to retrieve mapping for. Returns: The mapping for the given attribute key, or null, if no such mapping exists. Return type: str
-
opyenxes.info.XGlobalAttributeNameMap module¶
-
class
opyenxes.info.XGlobalAttributeNameMap.
XGlobalAttributeNameMap
[source]¶ Bases:
object
This singleton class implements a global attribute name mapping facility and can manage a number of attribute name mappings. Further, this class also acts as a proxy to the standard mapping, i.e. it can be used directly as a attribute name mapping instance.
-
MAPPING_DUTCH
= 'NL'¶
-
MAPPING_ENGLISH
= 'EN'¶
-
MAPPING_FRENCH
= 'FR'¶
-
MAPPING_GERMAN
= 'DE'¶
-
MAPPING_ITALIAN
= 'IT'¶
-
MAPPING_PORTUGUESE
= 'PT'¶
-
MAPPING_SPANISH
= 'ES'¶
-
MAPPING_STANDARD
= 'EN'¶
-
get_available_mapping_names
()[source]¶ Returns the names of all available mappings. Note that referenced mappings may be empty.
Returns: A tuple of names of all available mappings. Return type: tuple
-
get_available_mappings
()[source]¶ Returns all available mappings. Note that returned mappings may be empty.
Returns: A tuple of all available mappings. Return type: tuple
-
get_mapping
(name)[source]¶ Provides access to a specific attribute name mapping by its name. If the requested mapping does not exist yet, a new mapping will be created, added to the set of managed mappings, and returned. This means, this method will always return a mapping, but this could be empty.
Parameters: name (str) – Name of the requested mapping. Returns: The requested mapping, as stored in this facility (or newly created). Return type: XAttributeNameMap
-
static
get_mapping_name
()[source]¶ Returns the name of this mapping.
Returns: The name of this mapping. Return type: str
-
get_standard_mapping
()[source]¶ Retrieves the standard attribute name mapping, i.e. the EN english language mapping.
Returns: The standard mapping. Return type: XAttributeNameMap
-
map
(attribute)[source]¶ Returns the name mapped onto the provided attribute by this mapping. If no mapping for the given attribute is provided by this map, null is returned.
Parameters: attribute (str or XAttribute) – Attribute or attribute key to retrieve mapping for. Returns: The mapping for the given attribute, or null, if no such mapping exists. Return type: str
-
map_safely
(attribute, mapping)[source]¶ Maps an attribute safely, using the given attribute mapping. Safe mapping attempts to map the attribute using the given mapping first. If this does not succeed, the standard mapping (EN) will be used for mapping. If no mapping is available in the standard mapping, the original attribute key is returned unchanged. This way, it is always ensured that this method returns a valid string for naming attributes.
Parameters: - attribute (XAttribute or str) – Attribute to map or key of the attribute to map.
- mapping (str or XAttributeNameMap) – Name of the mapping to be used preferably or attribute name map to be used preferably.
Returns: The safe mapping for the given attribute.
Return type: str
-
register_mapping
(mapping_name, attribute_key, alias)[source]¶ Registers a known attribute for mapping in a given attribute name map. IMPORTANT: This method should only be called when one intends to create, or add to, the global attribute name mapping.
Parameters: - mapping_name (str) – Name of the mapping to register with.
- attribute_key (str) – Attribute key to be mapped.
- alias (str) – Alias to map the given attribute to.
-
opyenxes.info.XLogInfo module¶
-
class
opyenxes.info.XLogInfo.
XLogInfo
(log, default_classifier, classifiers)[source]¶ Bases:
object
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.
Parameters: - log (XLog) – The event log to create an info summary for.
- default_classifier (XEventAttributeClassifier) – The default event classifier to be used
- classifiers (list[XEventAttributeClassifier]) – A collection of additional event classifiers to be covered by the created log info instance.
-
LIFECYCLE_TRANSITION_CLASSIFIER
= <opyenxes.classification.XEventLifeTransClassifier.XEventLifeTransClassifier object>¶
-
NAME_CLASSIFIER
= <opyenxes.classification.XEventNameClassifier.XEventNameClassifier object>¶
-
RESOURCE_CLASSIFIER
= <opyenxes.classification.XEventResourceClassifier.XEventResourceClassifier object>¶
-
STANDARD_CLASSIFIER
= <opyenxes.classification.XEventAttributeClassifier.XEventAttributeClassifier object>¶
-
static
create
(log, default_classifier=None, classifiers=None)[source]¶ Creates a new log info summary with the standard event classifier.
Parameters: - log (XLog) – The event log to create an info summary for.
- default_classifier (XEventAttributeClassifier) – The default event classifier to be used
- classifiers (list[XEventAttributeClassifier]) – A collection of additional event classifiers to be covered by the created log info instance.
Returns: The log info summary for this log.
Return type: XLogInfo
-
get_event_attribute_info
()[source]¶ Retrieves attribute information about all attributes this log contains on the event level.
Returns: Attribute information on the event level. Return type: XAttributeInfo
-
get_event_classes
(classifier=None)[source]¶ 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().
Parameters: classifier (XEventAttributeClassifier or None) – 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. Return type: XEventClasses
-
get_event_classifiers
()[source]¶ Retrieves the set of event classifiers covered by this log info, i.e., for which event classes are registered in this log info instance.
Returns: The tuple of event classifiers covered by this log info instance. Return type: tuple
-
get_log
()[source]¶ Retrieves the log used for this summary.
Returns: The event log which this summary describes. Return type: XLog
-
get_log_attribute_info
()[source]¶ Retrieves attribute information about all attributes this log contains on the log level.
Returns: Attribute information on the log level. Return type: XAttributeInfo
-
get_log_time_boundaries
()[source]¶ Retrieves the global timestamp boundaries of this log.
Returns: Timestamp boundaries for the complete log. :rtype XTimeBounds
-
get_meta_attribute_info
()[source]¶ Retrieves attribute information about all attributes this log contains on the meta (i.e., attribute) level.
Returns: Attribute information on the meta level. Return type: XAttributeInfo
-
get_name_classes
()[source]¶ Retrieves the event name classes of the summarized log.
Returns: The event name classes of the summarized log. Return type: XEventClasses
-
get_number_of_event
()[source]¶ Retrieves the total number of events in this log.
Returns: Total number of events. Return type: int
-
get_number_of_traces
()[source]¶ Retrieves the number of traces in this log.
Returns: Number of traces available in this log. Return type: int
-
get_resource_classes
()[source]¶ Retrieves the resource classes of the summarized log.
Returns: The resource classes of the summarized log. Return type: XEventClasses
-
get_trace_attribute_info
()[source]¶ Retrieves attribute information about all attributes this log contains on the trace level.
Returns: Attribute information on the trace level. Return type: XAttributeInfo
-
get_trace_time_boundaries
(trace)[source]¶ Retrieves the timestamp boundaries for a specified trace.
Parameters: trace – Trace to be queried for. Returns: Timestamp boundaries for the indicated trace. Return type: XTimeBounds
-
get_transition_classes
()[source]¶ Retrieves the lifecycle transition classes of the summarized log.
Returns: The lifecycle transition classes of the summarized log. Return type: XEventClasses
-
register_attributes
(attribute_info, attributable)[source]¶ Registers all attributes of a given attributable, i.e. model type hierarchy element, in the given attribute info registry.
Parameters: - attribute_info (XAttributeInfo) – Attribute info registry to use for registration.
- attributable (XAttributable) – Attributable whose attributes to register.
opyenxes.info.XLogInfoFactory module¶
-
class
opyenxes.info.XLogInfoFactory.
XLogInfoFactory
[source]¶ Bases:
object
Factory for deriving log info summaries from logs.
-
static
create_log_info
(log, classifier=None)[source]¶ Creates a new log info summary with a custom or standard event classifier.
Parameters: - log (XLog) – The event log to create an info summary for.
- classifier (XEventAttributeClassifier) – The event classifier to be used.
Returns: The log info summary for this log.
Return type: XLogInfo
-
static
opyenxes.info.XTimeBounds module¶
-
class
opyenxes.info.XTimeBounds.
XTimeBounds
[source]¶ Bases:
object
This class implements timestamp boundaries, which can be used to describe the temporal extent of a log, or of a contained trace.
-
get_end_date
()[source]¶ Returns the latest timestamp of these boundaries (right bound).
Returns: The latest timestamp of these boundaries. Return type: datetime
-
get_start_date
()[source]¶ Returns the earliest timestamp of these boundaries (left bound).
Returns: The earliest timestamp of these boundaries. Return type: datetime
-