opyenxes.factory package¶
Submodules¶
opyenxes.factory.XFactory module¶
-
class
opyenxes.factory.XFactory.
XFactory
[source]¶ Bases:
object
Provide methods for creating all element classes of the XES model type hierarchy
-
static
create_attribute_boolean
(key, value, extension=None)[source]¶ Creates a new XES attribute with boolean value.
Parameters: - key (str) – The key of the attribute.
- value (bool) – The value of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new attribute with boolean value.
Return type: XAttributeBoolean
-
static
create_attribute_container
(key, extension=None)[source]¶ Creates a new XES container attribute.
Parameters: - key (str) – The key of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new container attribute.
Return type: XAttributeContainer
-
static
create_attribute_continuous
(key, value, extension=None)[source]¶ Creates a new XES attribute with float value.
Parameters: - key (str) – The key of the attribute.
- value (float) – The value of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new attribute with float value.
Return type: XAttributeContinuous
-
static
create_attribute_discrete
(key, value, extension=None)[source]¶ Creates a new XES attribute with integer value.
Parameters: - key (str) – The key of the attribute.
- value (int) – The value of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new attribute with integer value.
Return type: XAttributeDiscrete
-
static
create_attribute_id
(key, value, extension=None)[source]¶ Creates a new XES attribute with XID value.
Parameters: - key (str) – The key of the attribute.
- value (XID) – The value of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new attribute with XID value.
Return type: XAttributeID
-
static
create_attribute_list
(key, extension=None)[source]¶ Creates a new XES list attribute.
Parameters: - key (str) – The key of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new list attribute.
Return type: XAttributeList
-
static
create_attribute_literal
(key, value, extension=None)[source]¶ Creates a new XES attribute with string value.
Parameters: - key (str) – The key of the attribute.
- value (str) – The value of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new attribute with string value.
Return type: XAttributeLiteral
-
static
create_attribute_map
()[source]¶ Creates a new XES attribute map.
Returns: A new attribute map instance. Return type: XAttributeMap
-
static
create_attribute_timestamp
(key, value, extension=None)[source]¶ Creates a new XES attribute with datetime value.
Parameters: - key (str) – The key of the attribute.
- value (datetime.datetime or int) – The value of the attribute.
- extension (XExtension or None) – The extension defining the attribute (set to None, if the attribute is not associated to an extension).
Returns: A new attribute with datetime value.
Return type: XAttributeTimestamp
-
static
create_event
(attribute=None, identity=None)[source]¶ Creates a new XES event instance.
Parameters: - attribute (XAttributeMap) – A XAttributeMap with the attribute for the event.
- identity (XID) – The identity defining the attribute (set to None, if the attribute is not associated to an identity).
Returns: A new event instance.
Return type: XEvent
-
static
opyenxes.factory.XFactoryRegistry module¶
-
class
opyenxes.factory.XFactoryRegistry.
XFactoryRegistry
[source]¶ Bases:
opyenxes.utils.XRegistry.XRegistry
XModelFactoryRegistry is the most important integration point for external contributors, aside from the extension infrastructure. This singleton class serves as a system-wide registry for XES factory implementations. It provides a current, i.e. standard, factory implementation, which can be switched by applications. This factory will be used in any internal places, e.g., for creating models from reading XES serializations. Other, e.g. proprietary or domain-specific, implementations of the XES standard (and the OpenXES model hierarchy interface) are suggested to implement the XModelFactory interface, and to register their factory with this registry. This enables to transparently switch the storage implementation of the complete OpenXES system (wherever applicable), and every application making use of this registry to create new models.