opyenxes.utils package¶
Submodules¶
opyenxes.utils.CompareUtils module¶
-
opyenxes.utils.CompareUtils.
compare_to_boolean
(bool_1, bool_2)[source]¶ This function compares two boolean
Parameters: - bool_1 – The first boolean to compare.
- bool_2 – The second boolean to compare with the first
Returns: The value 0 if if bool_1 represents the same boolean value as the bool_2 a value less than 0 if bool_1 represents true and bool_2 represents false; and a value greater than 0 if bool_1 represents false and bool_2 represents true.
Return type: int
-
opyenxes.utils.CompareUtils.
compare_to_number
(number_1, number_2)[source]¶ This function compares two number, integer or float
Parameters: - number_1 – The first number to compare.
- number_2 – The second number to compare with the first
Returns: The value 0 if the number_2 is equal to number_1; a value less than 0 if number_2 is greater than number_1; and a value greater than 0 if the number_2 is less than number_1.
Return type: int
-
opyenxes.utils.CompareUtils.
compare_to_string
(string_1, string_2)[source]¶ This function compares two string
Parameters: - string_1 – The first string to compare.
- string_2 – The second string to compare with the first
Returns: The value 0 if the string_2 is lexicographically equal to string_1; a value less than 0 if string_2 is lexicographically greater than string_1; and a value greater than 0 if the string_2 is lexicographically less than string_1.
Return type: int
opyenxes.utils.SingletonClassGenerator module¶
-
class
opyenxes.utils.SingletonClassGenerator.
XConceptExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XConceptExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XCostAmountMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XCostAmount class
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XCostDriverMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XCostDriver class
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XCostExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XCostExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XCostTypeMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XCostType class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XExtensionManagerMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XExtensionManager class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XFactoryRegistryMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XFactoryRegistry class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XGlobalAttributeNameMapMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XGlobalAttributeNameMap class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XIDFactoryMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XIDFactory class
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XIdentityExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XIdentityExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XLifecycleExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XLifecycleExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XMicroExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XMicroExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XOrganizationalExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XOrganizationalExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XParserRegistryMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XOrganizationalExtension class.
-
instance
= None¶
-
-
class
opyenxes.utils.SingletonClassGenerator.
XSemanticExtensionMetaclass
[source]¶ Bases:
type
This Metaclass produce a singleton XOrganizationalExtension class.
-
instance
= None¶
-
opyenxes.utils.XAttributeUtils module¶
-
class
opyenxes.utils.XAttributeUtils.
XAttributeType
[source]¶ Bases:
enum.Enum
An enumeration.
-
BOOLEAN
= 4¶
-
CONTAINER
= 7¶
-
CONTINUOUS
= 3¶
-
DISCRETE
= 1¶
-
ID
= 5¶
-
LIST
= 6¶
-
LITERAL
= 2¶
-
TIMESTAMP
= 8¶
-
-
class
opyenxes.utils.XAttributeUtils.
XAttributeUtils
[source]¶ Bases:
object
Utilities for working with attributes.
-
static
derive_prototype
(instance)[source]¶ Derives a prototype for the given attribute. This prototype attribute will be equal in all respects, expect for the value of the attribute. This value will be set to a default value, depending on the specific type of the given attribute.
Parameters: instance (XAttribute) – Attribute to derive prototype from. Returns: The derived prototype attribute. Return type: XAttribute
-
static
get_type
(attribute)[source]¶ For the given attribute, returns its type, i.e., the most high-level, typed interface this attribute implements.
Parameters: attribute (XAttribute) – Attribute to analyze. Returns: Class of this attribute. Return type: type
-
static
get_type_string
(attribute)[source]¶ For the given attribute, derives the standardized string describing the attributes specific type (used, e.g., for serialization).
Parameters: attribute (XAttribute) – Attribute to extract type string from. Returns: String representation of the attribute’s specific type. Return type: str
-
static
opyenxes.utils.XRegistry module¶
-
class
opyenxes.utils.XRegistry.
XRegistry
[source]¶ Bases:
object
Template implementation for a generic registry.
-
current_default
()[source]¶ Retrieves the current default instance.
Returns: The current default instance. Return type: Any
-
get_available
()[source]¶ Retrieves an unmodifiable set of all available instances.
Returns: Tuple of all available instances. Return type: tuple
-
opyenxes.utils.XRuntimeUtils module¶
-
class
opyenxes.utils.XRuntimeUtils.
XRuntimeUtils
[source]¶ Bases:
object
This class provides runtime utilities for library components. Its main purpose is to identify the host OS, and to locate a standard support folder location on each platform.
-
determine_os
()[source]¶ Determines the current host platform.
Returns: Current host platform. Return type: str
-
get_extension_cache_folder
()[source]¶ Retrieves the directory file of the platform-dependent OpenXES extension definition file folder.
Returns: the directory file of the platform-dependent. Return type: str
-
get_support_folder
()[source]¶ Retrieves the path of the platform-dependent OpenXES support folder.
Returns: The path of the platform-dependent OpenXES support folder. Return type: str
-
is_running_linux
()[source]¶ Checks whether the current platform is Linux.
Returns: True if the current platform is Linux. False otherwise. Return type: bool
-
is_running_mac_os_x
()[source]¶ Checks whether the current platform is Mac OS X.
Returns: True if the current platform is Mac OS X. False otherwise. Return type: bool
-
is_running_unix
()[source]¶ Checks whether the current platform is some flavor of Unix.
Returns: True if the current platform is some flavor of Unix. False otherwise. Return type: bool
-
is_running_windows
()[source]¶ Checks whether the current platform is Windows.
Returns: True if the current platform is Windows. False otherwise. Return type: bool
-
openxes_version
= '1.0RC7'¶
-
xes_version
= '1.0'¶
-
opyenxes.utils.XTimer module¶
-
class
opyenxes.utils.XTimer.
XTimer
[source]¶ Bases:
object
This class implements a simple timer that can be used to quickly profile the speed of operations within library components. The timer simply uses the system time for timing, and thus does not incur significant overhead on runtime.
-
DAY_MILLIS
= 86400000¶
-
HOUR_MILLIS
= 3600000¶
-
MINUTE_MILLIS
= 60000¶
-
SECOND_MILLIS
= 1000¶
-
static
format_duration
(millis)[source]¶ Formats a duration in milliseconds as a pretty-print string.
Parameters: millis (int or float) – Duration in milliseconds. Returns: Given duration as a pretty-print string. Return type: str
-
get_duration
()[source]¶ Retrieve the runtime of the timer.
Returns: Runtime between start (or creation of timer) and stop, in milliseconds. Return type: int
-