Skip to main content
Rust4PM

slim_ocel_bindings

process_mining::bindings::slim_ocel_bindings

Related Examples(2)

Functions in this Module(36)

locel_add_e2o

bindings::slim_ocel_bindingsSource

Add an E2O (event-to-object) relationship with the given qualifier.

Multiple qualifiers between the same (event, object) pair are allowed. Re-adding the exact same (event, object, qualifier) triple is a no-op. Returns true on success.

Errors. If either index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz

An Event Index

An Object Index

String
bool
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_add_e2o(ocel, 1, 1, 'places')

locel_add_event

bindings::slim_ocel_bindingsSource

Add an event and return its EventIndex.

The event type must have been declared via locel_add_event_type first.

id: If None, a UUID is assigned.

attributes: Positional values in the declared attribute order. Padded with Null or truncated on length mismatch (with a warning). relationships: E2O relationships as (qualifier, object_index) pairs (can also be added later via locel_add_e2o).

Errors. If the event type is undeclared, the id is already taken, or a relationship names an object index that does not exist. The OCEL is left unchanged.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz
String
u32

An Event Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_add_event(ocel, 'pay order', '2020-01-01T10:30:00Z')

locel_add_event_type

bindings::slim_ocel_bindingsSource

Add an event type with the given ordered attribute declarations.

No-op if the event type already exists.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz
String
()
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
r4pm.bindings.locel_add_event_type(ocel, 'pay order')

locel_add_o2o

bindings::slim_ocel_bindingsSource

Add a directed O2O (object-to-object) relationship from from_obj to to_obj with the given qualifier.

Multiple qualifiers between the same (from_obj, to_obj) pair are allowed. Re-adding the exact same (from_obj, to_obj, qualifier) triple is a no-op. Returns true on success.

Errors. If either index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz

An Object Index

An Object Index

String
bool
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_add_o2o(ocel, 1, 1, 'places')

locel_add_object

bindings::slim_ocel_bindingsSource

Add an object and return its ObjectIndex.

The object type must have been declared via locel_add_object_type first. id: If None, a UUID is assigned.

attributes: Positional list of time-indexed attribute histories (one (timestamp, value) list per declared attribute, in order). Use 1970-01-01T00:00:00Z for constant/initial values. Padded with empty lists or truncated on length mismatch (with a warning). relationships: Outgoing O2O relationships as (qualifier, object_index) pairs (can also be added later via locel_add_o2o).

Errors. If the object type is undeclared, the id is already taken, or a relationship names an object index that does not exist yet. The OCEL is left unchanged.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz
String
u32

An Object Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_add_object(ocel, 'order')

locel_add_object_attribute_value

bindings::slim_ocel_bindingsSource

Add a value to the history of an object attribute.

Inserted after the last change at or before its time. The attribute must be declared on the object's type.

Errors. If the object index does not exist or the object's type does not declare attribute. The OCEL is left unchanged.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz

An Object Index

String

OCEL Attribute Values

()
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
r4pm.bindings.locel_add_object_attribute_value(
    ocel,
    1,
    'example',
    '2020-01-01T10:30:00Z',
    1,
)

locel_add_object_type

bindings::slim_ocel_bindingsSource

Add an object type with the given ordered attribute declarations.

No-op if the object type already exists.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz
String
()
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
r4pm.bindings.locel_add_object_type(ocel, 'order')

locel_append_batch

bindings::slim_ocel_bindingsSource

Add many events and objects, referring to objects by id.

Unlike locel_add_event and locel_add_object, types and attributes that are not declared yet are declared on the fly, and relationships name their target by object id. A relationship may refer to an object that appears later in the same batch. A relationship to an object id that is unknown after the whole batch is dropped with a warning. An object whose id already exists is updated, see OCELAppendBatch::objects.

Errors. If an event id is already taken or occurs twice in the batch, or an object id is given with two different types. The OCEL is left unchanged.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz

Events, objects and type declarations to add with [`locel_append_batch`]

OCELAppendSummary

What a [`locel_append_batch`] call added

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_append_batch(ocel, {})

locel_delete_e2o

bindings::slim_ocel_bindingsSource

Remove all E2O relationships between the given event and object (across every qualifier).

Returns true on success.

Errors. If either index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz

An Event Index

An Object Index

bool
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_delete_e2o(ocel, 1, 1)

locel_delete_o2o

bindings::slim_ocel_bindingsSource

Remove all O2O relationships from from_obj to to_obj (across every qualifier).

Returns true on success.

Errors. If either index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz

An Object Index

An Object Index

bool
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_delete_o2o(ocel, 1, 1)

locel_get_e2o

bindings::slim_ocel_bindingsSource

Get the E2O relationships of an event as (qualifier, object_index) pairs.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Event Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_e2o(ocel, 1)

locel_get_e2o_rev

bindings::slim_ocel_bindingsSource

Get the reverse E2O relationships of an object (events relating to it) as

(qualifier, event_index) pairs.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_e2o_rev(ocel, 1)

locel_get_e2o_rev_ids

bindings::slim_ocel_bindingsSource

Get the ids of the events related to an object, or None for an unknown object id.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_e2o_rev_ids(ocel, 'ob-893f8ab9')

locel_get_ev_attr_val

bindings::slim_ocel_bindingsSource

Get the value of an event attribute by name. None if the attribute does not exist.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Event Index

String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_attr_val(ocel, 1, 'price')

locel_get_ev_by_id

bindings::slim_ocel_bindingsSource

Look up an event by its ID string. None if not found.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_by_id(ocel, 'ev-893f8ab9')

locel_get_ev_id

bindings::slim_ocel_bindingsSource

Get the ID string of an event.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Event Index

String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_id(ocel, 1)

locel_get_ev_ids_of_type

bindings::slim_ocel_bindingsSource

Get the ids of all events of a type.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_ids_of_type(ocel, 'pay order')

locel_get_ev_time

bindings::slim_ocel_bindingsSource

Get the timestamp of an event.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Event Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_time(ocel, 1)

locel_get_ev_type

bindings::slim_ocel_bindingsSource

Get the event type specification (name + attributes), or None if unknown.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_type(ocel, 'pay order')

locel_get_ev_type_of

bindings::slim_ocel_bindingsSource

Get the event type (activity) of an event.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Event Index

String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_type_of(ocel, 1)

locel_get_ev_types

bindings::slim_ocel_bindingsSource

Get all declared event type names, in declaration order.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ev_types(ocel)

locel_get_evs_of_type

bindings::slim_ocel_bindingsSource

Get all event indices of the given event type. Empty if unknown.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_evs_of_type(ocel, 'pay order')

locel_get_full_ev

bindings::slim_ocel_bindingsSource

Get the full OCELEvent (resolved type name, named attributes, string object IDs).

Allocates. Prefer the specific locel_get_ev_* accessors for single fields.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Event Index

OCELEvent

OCEL Event

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_full_ev(ocel, 1)

locel_get_full_ob

bindings::slim_ocel_bindingsSource

Get the full OCELObject (resolved type name, named time-indexed attributes, string object IDs).

Allocates. Prefer the specific locel_get_ob_* accessors for single fields.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

OCELObject

OCEL Object

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_full_ob(ocel, 1)

locel_get_o2o

bindings::slim_ocel_bindingsSource

Get the outgoing O2O relationships of an object as (qualifier, object_index) pairs.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_o2o(ocel, 1)

locel_get_o2o_rev

bindings::slim_ocel_bindingsSource

Get the reverse O2O relationships of an object (objects with an O2O to it) as (qualifier, object_index) pairs.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_o2o_rev(ocel, 1)

locel_get_ob_activity_trace

bindings::slim_ocel_bindingsSource

Get the activity trace of an object (i.e., the sequence of event types connected to the object,

ordered by event timestamp)

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_activity_trace(ocel, 1)

locel_get_ob_attr_vals

bindings::slim_ocel_bindingsSource

Get the time-indexed history of an object attribute by name as (timestamp, value) pairs. Empty if absent.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_attr_vals(ocel, 1, 'price')

locel_get_ob_by_id

bindings::slim_ocel_bindingsSource

Look up an object by its ID string. None if not found.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_by_id(ocel, 'ob-893f8ab9')

locel_get_ob_id

bindings::slim_ocel_bindingsSource

Get the ID string of an object.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_id(ocel, 1)

locel_get_ob_ids_of_type

bindings::slim_ocel_bindingsSource

Get the ids of all objects of a type.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_ids_of_type(ocel, 'order')

locel_get_ob_type

bindings::slim_ocel_bindingsSource

Get the object type specification (name + attributes), or None if unknown.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_type(ocel, 'order')

locel_get_ob_type_of

bindings::slim_ocel_bindingsSource

Get the object type of an object.

Errors. If the index is out of range.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

An Object Index

String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_type_of(ocel, 1)

locel_get_ob_types

bindings::slim_ocel_bindingsSource

Get all declared object type names, in declaration order.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_ob_types(ocel)

locel_get_obs_of_type

bindings::slim_ocel_bindingsSource

Get all object indices of the given object type. Empty if unknown.

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)
String
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_get_obs_of_type(ocel, 'order')

locel_new

bindings::slim_ocel_bindingsSource

Create a new empty SlimLinkedOCEL.

A SlimLinkedOCEL is an object-centric event log where events and objects are referenced by integer indices (EventIndex / ObjectIndex) returned from the add_* calls, and each indexed event/object is an instance of an event/object type (activity / object class) declared beforehand with an ordered list of attributes.

Arguments

Store the result under this id instead of a generated one.

import r4pm

ocel = r4pm.bindings.locel_new()
# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
r4pm.export_item(ocel, 'ocel.xml')