opyenxes.extension.std package¶
Submodules¶
opyenxes.extension.std.XAbstractNestedAttributeSupport module¶
-
class
opyenxes.extension.std.XAbstractNestedAttributeSupport.
XAbstractNestedAttributeSupport
[source]¶ Bases:
object
This class offers generic support for extracting and assigning values to and from nested attributes.
-
assign_nested_values
(element, amounts)[source]¶ Assigns (to the given event) multiple values given their key lists. The i-th element in the key list should correspond to an i-level attribute with the prescribed key. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. For example, the call::
assignNestedValues(event, {["key.1"]: val.1, ["key.1", "key.1.1"]: val.1.1, ["key.1", "key.1.2"]: val.1.2, ["key.2"]: val.2, ["key.3"]: val.3})
should result into the following XES fragment::
<event> <string key="key.1" value=""> <float key="ext:attr" value="val.1"/> <string key="key.1.1" value=""> <float key="ext:attr" value="val.1.1"/> </string> <string key="key.1.2" value=""> <float key="ext:attr" value="val.1.2"/> </string> </string> <string key="key.2" value=""> <float key="ext:attr" value="val.2"/> </string> <string key="key.3" value=""> <float key="ext:attr" value="val.3"/> </string> </event>
Parameters: - element (XAttributable) – Element to assign the values to.
- amounts (dict(list[str]: Any)) – Dictionary with key lists to values which are to be assigned.
-
classmethod
assign_value
(element, value)[source]¶ Abstract method to assign a value to an element.
Parameters: - element (XAttribute) – The element to assign the value to.
- value (Any) – The value to be assigned.
-
assign_values
(element, values)[source]¶ Assigns (to the given element) multiple values given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. For example, the call::
assign_values(event, {"key.1": val.1, "key.2": val.2, "key.3": val.3})
should result into the following XES fragment::
<event> <string key="key.1" value=""> <float key="ext:attr" value="val.1"/> </string> <string key="key.2" value=""> <float key="ext:attr" value="val.2"/> </string> <string key="key.3" value=""> <float key="ext:attr" value="val.3"/> </string> </event>
Parameters: - element (XAttributable) – Element to assign the values to.
- values (dict(str: Any)) – dictionary with keys to values which are to be assigned.
-
extract_nested_values
(element)[source]¶ Retrieves a map containing all values for all descending attributes of an element. For example, the XES fragment::
<trace> <string key="key.1" value=""> <float key="ext:attr" value="val.1"/> <string key="key.1.1" value=""> <float key="ext:attr" value="val.1.1"/> </string> <string key="key.1.2" value=""> <float key="ext:attr" value="val.1.2"/> </string> </string> <string key="key.2" value=""> <float key="ext:attr" value="val.2"/> </string> <string key="key.3" value=""> <float key="ext:attr" value="val.3"/> </string> </trace>
should result into the following::
{["key.1"]: val.1, ["key.1", "key.1.1"]: val.1.1, ["key.1", "key.1.2"]: val.1.2, ["key.2"]: val.2, ["key.3"]: val.3}
Parameters: element (XAttributable) – Element to retrieve all values for. Returns: Dictionary with all descending keys to values. Return type: dict(list[str]: Any)
-
classmethod
extract_value
(element)[source]¶ Abstract method to extract a value from an element.
Parameters: element (XAttribute) – The element to extract the value from.
-
extract_values
(element)[source]¶ Retrieves a map containing all values for all child attributes of an element. For example, the XES fragment:
<trace> <string key="key.1" value=""> <float key="ext:attr" value="val.1"/> <string key="key.1.1" value=""> <float key="ext:attr" value="val.1.1"/> </string> <string key="key.1.2" value=""> <float key="ext:attr" value="val.1.2"/> </string> </string> <string key="key.2" value=""> <float key="ext:attr" value="val.2"/> </string> <string key="key.3" value=""> <float key="ext:attr" value="val.3"/> </string> </trace>
should result into the following::
{"key.1": val.1, "key.2": val.2, "key.3": val.3}
Parameters: element (XAttributable) – Element to retrieve all values for. Returns: Dictionary with all child keys to values. Return type: dict(str: any}
-
opyenxes.extension.std.XConceptExtension module¶
-
class
opyenxes.extension.std.XConceptExtension.
XConceptExtension
[source]¶ Bases:
opyenxes.extension.XExtension.XExtension
This extension provides naming for concepts in the event log type hierarchy. It defines two attributes:
- concept:name: Name (of any type hierarchy element)
- concept:instance: Instance identifier (of events)
Uses the singleton metaclass
-
assign_instance
(event, instance)[source]¶ Assigns any event its activity instance identifier, as defined by this extension’s instance attribute.
Parameters: - event (XEvent) – Event to assign activity instance identifier to.
- instance (str) – The activity instance identifier to be assigned.
-
assign_name
(element, name)[source]¶ Assigns any log data hierarchy element its name, as defined by this extension’s name attribute.
Parameters: - element (XAttributable) – Log hierarchy element to assign name to.
- name (str) – The name to be assigned.
opyenxes.extension.std.XCostExtension module¶
-
class
opyenxes.extension.std.XCostExtension.
XCostAmount
[source]¶ Bases:
opyenxes.extension.std.XAbstractNestedAttributeSupport.XAbstractNestedAttributeSupport
Class which value contains the cost amount for a cost driver.
Uses the singleton metaclass
-
class
opyenxes.extension.std.XCostExtension.
XCostDriver
[source]¶ Bases:
opyenxes.extension.std.XAbstractNestedAttributeSupport.XAbstractNestedAttributeSupport
Class which value contains the cost amount for a cost driver.
Uses the singleton metaclass
-
class
opyenxes.extension.std.XCostExtension.
XCostExtension
[source]¶ Bases:
opyenxes.extension.XExtension.XExtension
This extension provides costs for traces and events. It defines five attributes:
- cost total: Contains total cost incurred for a trace or an event. The value represents the sum of all the cost amounts within the element.
- cost currecny: Any valid currency format.
- cost amount: The value contains the cost amount for a cost driver.
- cost driver: The value contains the id for the cost driver used to calculate the cost.
- cost type: The value contains the cost type (e.g., Fixed, Overhead, Materials).
Uses the singleton metaclass
-
assign_amount
(attribute, amount)[source]¶ Assigns any attribute its cost amount, as defined by this extension’s amount attribute.
Parameters: - attribute (XAttribute) – Attribute to assign cost amount to
- amount (float) – The cost amount to be assigned.
-
static
assign_amounts
(element, amounts)[source]¶ Assigns (to the given trace or event) multiple amounts given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. For example, the call::
assign_amounts(trace, {"a": 10.00, "b": 15.00, "c": 25.00})
should result into the following XES fragment::
<trace> <string key="a" value=""> <float key="cost:amount" value="10.00"/> </string> <string key="b" value=""> <float key="cost:amount" value="15.00"/> </string> <string key="c" value=""> <float key="cost:amount" value="25.00"/> </string> </trace>
Parameters: - element (XEvent or XTrace) – Trace or Event to assign the amounts to.
- amounts (dict(str: float)) – Dictionary with keys to amounts which are to be assigned.
-
assign_currency
(element, currency)[source]¶ Assigns any trace or event its cost currency, as defined by this extension’s currency attribute.
Parameters: - element (XEvent or XEvent) – Trace or Event to assign cost currency to.
- currency (str) – The currency to be assigned.
-
assign_driver
(attribute, driver)[source]¶ Assigns any attribute its cost driver, as defined by this extension’s driver attribute.
Parameters: - attribute (XAttribute) – Attribute to assign cost driver to.
- driver (str) – The cost driver to be assigned.
-
static
assign_drivers
(element, drivers)[source]¶ Assigns (to the given trace or event) multiple cost drivers given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key.
Parameters: - element (XTrace or XEvent) – Trace or Event to assign the cost drivers to.
- drivers (dict(str: str)) – Dictionary with keys to cost drivers which are to be assigned.
-
static
assign_nested_amounts
(element, amounts)[source]¶ Assigns (to the given trace or event) multiple amounts given their key lists. The i-th element in the key list should correspond to an i-level attribute with the prescribed key. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. For example, the call::
assign_nested_amounts(trace, {["a"]: 10.00], ["a", "b"]: 20.00, ["a", "c"]: 30.00, ["b"]: 15.00, ["c"]: 25.00})
should result into the following XES fragment::
<trace> <string key="a" value=""> <float key="cost:amount" value="10.00"/> <string key="b" value=""> <float key="cost:amount" value="20.00"/> </string> <string key="c" value=""> <float key="cost:amount" value="30.00"/> </string> </string> <string key="b" value=""> <float key="cost:amount" value="15.00"/> </string> <string key="c" value=""> <float key="cost:amount" value="25.00"/> </string> </trace>
Parameters: - element (XEvent or XTrace) – Trace or Event to assign the amounts to.
- amounts (dict(list[str]: float)) – Dictionary with list of keys to amounts which are to be assigned.
-
static
assign_nested_drivers
(element, drivers)[source]¶ Assigns (to the given trace) multiple cost drivers given their key lists. The i-th element in the key list should correspond to an i-level attribute with the prescribed key. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key.
Parameters: - element (XTrace or XEvent) – Trace or Event to assign the cost drivers to.
- drivers (dict(list[str]: str)) – Dictionary with keys to cost drivers which are to be assigned.
-
static
assign_nested_types
(element, types)[source]¶ Assigns (to the given trace or event) multiple cost types given their key lists. The i-th element in the key list should correspond to an i-level attribute with the prescribed key. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key.
Parameters: - element (XTrace or XEvent) – Event or Trace to assign the cost types to.
- types (dict(list[str]: str)) – Dictionary with keys to cost types which are to be assigned.
-
assign_total
(element, total)[source]¶ Assigns any trace or event its total costs, as defined by this extension’s total attribute.
Parameters: - element (XTrace or XEvent) – Trace or Event to assign total costs to.
- total (float) – The total costs to be assigned.
-
assign_type
(attribute, type_)[source]¶ Assigns any attribute its cost type, as defined by this extension’s type attribute.
Parameters: - attribute (XAttribute) – Attribute to assign cost type to.
- type (str) – The cost type to be assigned.
-
static
assign_types
(element, types)[source]¶ Assigns (to the given event or trace) multiple cost types given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key.
Parameters: - element (XTrace or XEvent) – Event or Trace to assign the cost types to.
- types (dict(list[str]: str)) – Dictionary with keys to cost types which are to be assigned.
-
static
extract_amount
(attribute)[source]¶ Retrieves the cost amount for an attribute, if set by this extension’s amount attribute.
Parameters: attribute (XAttribute) – Attribute element to retrieve cost amount for. Returns: The requested cost amount. Return type: float
-
static
extract_amounts
(element)[source]¶ Retrieves a map containing all cost amounts for all child attributes of an event. For example, the XES fragment::
<trace> <string key="a" value=""> <float key="cost:amount" value="10.00"/> <string key="b" value=""> <float key="cost:amount" value="20.00"/> </string> <string key="c" value=""> <float key="cost:amount" value="30.00"/> </string> </string> <string key="b" value=""> <float key="cost:amount" value="15.00"/> </string> <string key="c" value=""> <float key="cost:amount" value="25.00"/> </string> </trace>
should result into the following::
{"a": 10.00, "b": 15.00, "c": 25.00}
Parameters: element (XTrace or XEvent) – Trace or Event to retrieve all cost amounts for. Returns: Dictionary with all child keys to cost amounts. Return type: dict(str: float)
-
static
extract_currency
(element)[source]¶ Retrieves the cost currency for an event or trace, if set by this extension’s currency attribute.
Parameters: element (XTrace or XEvent) – Event or Trace to retrieve currency for. Returns: The requested cost currency. Return type: str
-
static
extract_driver
(attribute)[source]¶ Retrieves the cost driver for an attribute, if set by this extension’s driver attribute.
Parameters: attribute (XAttribute) – Attribute element to retrieve cost driver for. Returns: The requested cost driver. Return type: str
-
static
extract_drivers
(element)[source]¶ Retrieves a map containing all cost drivers for all child attributes of a trace or event.
Parameters: element (XTrace or XEvent) – Trace or Event to retrieve all cost drivers for. Returns: Dictionary with all child keys to cost drivers. Return type: dict(str: str)
-
static
extract_nested_amounts
(element)[source]¶ Retrieves a map containing all cost amounts for all child attributes of an event. For example, the XES fragment::
<trace> <string key="a" value=""> <float key="cost:amount" value="10.00"/> <string key="b" value=""> <float key="cost:amount" value="20.00"/> </string> <string key="c" value=""> <float key="cost:amount" value="30.00"/> </string> </string> <string key="b" value=""> <float key="cost:amount" value="15.00"/> </string> <string key="c" value=""> <float key="cost:amount" value="25.00"/> </string> </trace>
should result into the following::
{["a"]: 10.00, ["a", "b"]: 20.00, ["a", "c"]: 30.00, ["b"]: 15.00, ["c"]: 25.00}
Parameters: element (XTrace or XEvent) – Trace or Event to retrieve all cost amounts for. Returns: Dictionary with all descending keys to cost amounts. Return type: dict(list[str]: float)
-
static
extract_nested_drivers
(element)[source]¶ Retrieves a map containing all cost drivers for all descending attributes of a trace or event.
Parameters: element (XTrace or XEvent) – Trace or Event to retrieve all cost drivers for. Returns: Dictionary with all descending keys to cost drivers. Return type: dict(list[str]: str)
-
static
extract_nested_types
(element)[source]¶ Retrieves a map containing all cost types for all descending attributes of a trace or event.
Parameters: element (XTrace or XEvent) – Trace or Event to retrieve all cost types for. Returns: Dictionary with all descending keys to cost types. Return type: dict(list[str]: str)
-
static
extract_total
(element)[source]¶ Retrieves the total costs of a trace or event, if set by this extension’s total attribute.
Parameters: element (XTrace or XEvent) – Trace or Event to retrieve total costs for. Returns: The requested total costs. Return type: float
-
class
opyenxes.extension.std.XCostExtension.
XCostType
[source]¶ Bases:
opyenxes.extension.std.XAbstractNestedAttributeSupport.XAbstractNestedAttributeSupport
Class which value contains the cost type (e.g., Fixed,Overhead, Materials).
Uses the singleton metaclass
opyenxes.extension.std.XExtendedEvent module¶
-
class
opyenxes.extension.std.XExtendedEvent.
XExtendedEvent
(event)[source]¶ Bases:
object
Helper class. This class can be used to dynamically wrap any event, and provides an extended set of getter and setter methods for typically-available extension attributes.
Parameters: event (XEvent) – The original event to be wrapped. -
clone
()[source]¶ Clones this event, i.e. creates a deep copy, but with a new ID, so equals does not hold between this and the clone
Returns: An identical clone. Return type: XExtendedEvent
-
get_attributes
()[source]¶ Retrieves the attributes set for this element.
Returns: A map of attributes. Return type: XAttributeMap
-
get_extensions
()[source]¶ Retrieves the extensions used by this element, i.e. the extensions used by all attributes of this element, and the element itself
Returns: A set of extensions Return type: set(XExtension)
-
get_group
()[source]¶ Returns the group of the event, as defined by the Organizational extension.
Returns: Group string. Can be null, if not defined. Return type: str
-
get_instance
()[source]¶ Retrieves the activity instance of this event, as defined by the Concept extension.
Returns: Activity instance of the event. Return type: str
-
get_model_references
()[source]¶ Returns the list of model references defined for this event, as defined in the Semantic extension.
Returns: List of model reference strings. Return type: list[str]
-
get_model_references_uris
()[source]¶ Returns the list of model reference URIs defined for this event, as defined in the Semantic extension.
Returns: List of model reference URIs. Return type: list[ParseResult]
-
get_name
()[source]¶ Retrieves the activity name of this event, as defined by the Concept extension.
Returns: Activity name of the event. Return type: str
-
get_resourse
()[source]¶ Returns the resource of the event, as defined by the Organizational extension.
Returns: Resource string. Can be null, if not defined. Return type: str
-
get_role
()[source]¶ Returns the role of the event, as defined by the Organizational extension.
Returns: Role string. Can be null, if not defined. Return type: str
-
get_standard_transition
()[source]¶ Returns the standard lifecycle transition of the event, as defined by the Lifecycle extension.
Returns: Standard lifecycle transition as string. Can be null, if not defined. Return type: str
-
get_time_stamp
()[source]¶ Retrieves the timestamp of the event, as defined by the Time extension.
Returns: Timestamp as Date object, or null if not defined. Return type: datetime.datetime
-
get_transition
()[source]¶ Returns the lifecycle transition of the event, as defined by the Lifecycle extension.
Returns: Lifecycle transition string. Can be null, if not defined. Return type: str
-
has_attributes
()[source]¶ Checks for the existence of attributes
Returns: True if this element has any attributes; False otherwise. Return type: bool
-
set_attributes
(attributes)[source]¶ Sets the map of attributes for this element.
Parameters: attributes (XAttributeMap) – A map of attributes
-
set_group
(group)[source]¶ Sets the group of the event, as defined by the Organizational extension.
Parameters: group (str) – Group string.
-
set_instance
(instance)[source]¶ Sets the activity instance of this event, as defined by the Concept extension.
Parameters: instance (str) – Activity instance of the event.
-
set_model_references
(model_references)[source]¶ Sets the list of model reference strings defined for this event, as defined in the Semantic extension.
Parameters: model_references (list[str]) – List of model reference strings.
-
set_model_references_uris
(model_references_uris)[source]¶ Sets the list of model reference URIs defined for this event, as defined in the Semantic extension.
Parameters: model_references_uris (list[ParseResult or SplitResult]) – List of model reference URIs.
-
set_name
(name)[source]¶ Sets the activity name of this event, as defined by the Concept extension.
Parameters: name (str) – Activity instance of the event.
-
set_resource
(resource)[source]¶ Sets the resource of the event, as defined by the Organizational extension.
Parameters: resource (str) – Resource string.
-
set_role
(role)[source]¶ Sets the role of the event, as defined by the Organizational extension.
Parameters: role (str) – Role string.
-
set_standard_transition
(transition)[source]¶ Sets the standard lifecycle transition of the event, as defined by the Lifecycle extension.
Parameters: transition (str) – Standard lifecycle transition object as string.
-
set_time_stamp
(time_stamp)[source]¶ Sets the timestamp of the event, as defined by the Time extension.
Parameters: time_stamp – Timestamp, as Date or as long value in milliseconds, to be set. :type time_stamp: datetime.datetime or int
-
opyenxes.extension.std.XIdentityExtension module¶
-
class
opyenxes.extension.std.XIdentityExtension.
XIdentityExtension
[source]¶ Bases:
opyenxes.extension.XExtension.XExtension
Provides unique identifiers (UUIDs) for elements.
Uses the singleton metaclass
-
assign_id
(element, identity)[source]¶ Assigns any log data hierarchy element its id, as defined by this extension’s id attribute.
Parameters: - element (XAttributable) – Log hierarchy element to assign id to.
- identity (XID) – The id to be assigned.
-
opyenxes.extension.std.XLifecycleExtension module¶
-
class
opyenxes.extension.std.XLifecycleExtension.
XLifecycleExtension
[source]¶ Bases:
opyenxes.extension.XExtension.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.
Uses the singleton metaclass
-
class
StandardModel
[source]¶ Bases:
object
Class with the standard lifecycle model.
-
ASSIGN
= 'assign'¶
-
ATE_ABORT
= 'ate_abort'¶
-
AUTOSKIP
= 'autoskip'¶
-
COMPLETE
= 'complete'¶
-
MANUALSKIP
= 'manualskip'¶
-
PI_ABORT
= 'pi_abort'¶
-
REASSIGN
= 'reassign'¶
-
RESUME
= 'resume'¶
-
SCHEDULE
= 'schedule'¶
-
START
= 'start'¶
-
SUSPEND
= 'suspend'¶
-
UNKNOWN
= 'unknown'¶
-
WITHDRAW
= 'withdraw'¶
-
-
assign_model
(log, model)[source]¶ Assigns a value for the lifecycle model identifier to a given log.
Parameters: - log (XLog) – Log to be tagged.
- model (str) – Lifecycle model identifier string to be used.
-
assign_standard_transition
(event, transition)[source]¶ Assigns a standard lifecycle transition to the given event..
Parameters: - event (XEvent) – Event to be tagged.
- transition (str) – Standard lifecycle transition to be assigned.
-
assign_transition
(event, transition)[source]¶ Assigns a lifecycle transition string to the given event.
Parameters: - event (XEvent) – Event to be tagged.
- transition (str) – Lifecycle transition string to be assigned.
-
static
extract_model
(log)[source]¶ Extracts the lifecycle model identifier from a given log.
Parameters: log (XLog) – Event log. Returns: Lifecycle model identifier string. Return type: str
-
extract_standard_transition
(event)[source]¶ Extracts the standard lifecycle transition object from a given event.
Parameters: event (XEvent) – The given event Returns: The standard lifecycle transition instance of this event. Can be null, if not defined. Return type: str
-
class
opyenxes.extension.std.XMicroExtension module¶
-
class
opyenxes.extension.std.XMicroExtension.
XMicroExtension
[source]¶ Bases:
opyenxes.extension.XExtension.XExtension
The micro event extension defines a nesting level, a nesting parent, and the number of nested children for events within a log.
Uses the singleton metaclass
-
assign_length
(event, length)[source]¶ Assigns any event its state number of children, as defined by this extension’s length attribute.
Parameters: - event (XAttributable) – Event to assign number of children to.
- length (int) – The number to be assigned. Should be a non-negative integer.
-
assign_level
(event, level)[source]¶ Assigns any event its level, as defined by this extension’s level attribute.
Parameters: - event (XAttributable) – Event to assign level to.
- level (int) – The level to be assigned. Should be a positive integer.
-
assign_parent_id
(event, parent_id)[source]¶ Assigns any event its parent Id, as defined by this extension’s parentId attribute.
Parameters: - event (XAttributable) – Event to assign parent Id to.
- parent_id (XID) – The parent Id to be assigned. May not be null.
-
static
extract_length
(event)[source]¶ Retrieves the stated number of children of an event, if set by this extension’s length attribute. Note that this simply returns the value of the “micro:legnth” attribute, and -1 if not present. This does not count the children, it simply returns the number as found in the event.
Parameters: event (XEvent) – Event to extract stated number of children from. Returns: The requested number for this event, -1 if not set. Return type: int
-
static
extract_level
(event)[source]¶ Retrieves the level of an event, if set by this extension’s level attribute.
Parameters: event (XEvent) – Event to extract level from. Returns: The requested event level, -1 if not set. Return type: int
-
static
extract_parent_id
(event)[source]¶ Retrieves the parent Id of an event, if set by this extension’s parentId attribute.
Parameters: event (XEvent) – Event to extract parent Id from. Returns: The requested event parent Id, null if not set. Return type: XID
-
static
remove_length
(event)[source]¶ Removes the stated number of children from an event.
Parameters: event (XAttributable) – The event to remove the number from.
-
opyenxes.extension.std.XOrganizationalExtension module¶
-
class
opyenxes.extension.std.XOrganizationalExtension.
XOrganizationalExtension
[source]¶ Bases:
opyenxes.extension.XExtension.XExtension
This extension adds the organizational perspective to event logs. It defines for events three attributes, referring to:
- The resource which has executed the event
- The role of this resource
- The group of this resource
Uses the singleton metaclass
-
assign_group
(event, instance)[source]¶ Assigns the group attribute value for a given event.
Parameters: - event (XEvent) – Event to be modified.
- instance (str) – Group string to be assigned.
-
assign_resource
(event, instance)[source]¶ Assigns the resource attribute value for a given event.
Parameters: - event (XEvent) – Event to be modified.
- instance (str) – Resource string to be assigned.
-
assign_role
(event, instance)[source]¶ Assigns the role attribute value for a given event.
Parameters: - event (XEvent) – Event to be modified.
- instance (str) – Role string to be assigned.
-
static
extract_group
(event)[source]¶ Extracts the group attribute string from an event.
Parameters: event (XEvent) – Event to extract instance from. Returns: The requested activity instance identifier. Return type: str
opyenxes.extension.std.XSemanticExtension module¶
-
class
opyenxes.extension.std.XSemanticExtension.
XSemanticExtension
[source]¶ Bases:
opyenxes.extension.XExtension.XExtension
This extension adds semantic attributes to event log objects. These semantic attributes reference concepts, which are represented by event log objects, as unique URIs.
Uses the singleton metaclass
-
assign_model_reference_uris
(target, model_reference)[source]¶ - Assigns to a log element (i.e., archive, log, trace, event, or
- attribute) a list of model references.
Parameters: - target (XAttributable) – Any log element (i.e., archive, log, trace, event, or attribute) to be assigned references to.
- model_reference (list[ParseResult or SplitResult]) – The list of model references, as a list of URIs, referred to by this element.
-
assign_model_references
(target, model_reference)[source]¶ - Assigns to a log element (i.e., archive, log, trace, event, or
- attribute) a list of model references.
Parameters: - target (XAttributable) – Any log element (i.e., archive, log, trace, event, or attribute) to be assigned references to.
- model_reference (list[str]) – The list of model references, as a list of strings, referred to by this element.
-
extract_model_reference_uris
(target)[source]¶ Retrieves the list of model reference URIs which describe a log element (archive, log, trace, event, attribute).
Parameters: target (XAttributable) – Any log element (i.e., archive, log, trace, event, or attribute) to be queried. Returns: The list of model references, as a list of URIs, referred to by this element. Return type: list[ParseResult]
-
static
extract_model_references
(target)[source]¶ Retrieves the list of model references which describe a log element (archive, log, trace, event, attribute).
Parameters: target (XAttributable) – Any log element (i.e., archive, log, trace, event, or attribute) to be queried. Returns: The list of model references, as a list of strings, referred to by this element. Return type: list[str]
-
opyenxes.extension.std.XTimeExtension module¶
-
class
opyenxes.extension.std.XTimeExtension.
XTimeExtension
[source]¶ Bases:
opyenxes.extension.XExtension.XExtension
This extension defines the Time perspective on event logs. It makes it possible to assign to each event a timestamp, describing when the event has occurred.
Uses the singleton metaclass