bobocep.cep.event.complex.BoboEventComplex

class bobocep.cep.event.complex.BoboEventComplex(event_id: str, timestamp: int, data: Any, phenomenon_name: str, pattern_name: str, history: BoboHistory)[source]

Bases: BoboEvent

A complex event.

__init__(event_id: str, timestamp: int, data: Any, phenomenon_name: str, pattern_name: str, history: BoboHistory)[source]
Parameters:
  • event_id – The event ID.

  • timestamp – The event timestamp.

  • data – The event data.

  • phenomenon_name – The phenomenon name.

  • pattern_name – The pattern name.

  • history – The history of events.

Raises:
cast(dtype: type) BoboEventComplex[source]
Parameters:

dtype – The type to which the event’s data is cast.

Returns:

A new BoboEventComplex instance with its data cast to dtype and all other properties identical to the original event.

property data: Any

Get event data.

property event_id: str

Get event ID.

static from_json_dict(d: dict) BoboEventComplex[source]
Parameters:

d – A JSON dict representation of the event.

Returns:

A new instance of the event type.

static from_json_str(j: str) BoboEventComplex[source]
Parameters:

j – A JSON str representation of the event.

Returns:

A new instance of the event type.

property history: BoboHistory
Returns:

Event history.

property pattern_name: str
Returns:

Pattern name.

property phenomenon_name: str
Returns:

Phenomenon name.

property timestamp: int

Get event timestamp.

to_json_dict() dict[source]
Returns:

A JSON dict representation of the event.

to_json_str() str[source]
Returns:

A JSON str representation of the event.