pub struct OcpmEventLog {
pub metadata: EventLogMetadata,
pub object_types: HashMap<String, ObjectType>,
pub activity_types: HashMap<String, ActivityType>,
pub objects: ObjectGraph,
pub object_relationships: RelationshipIndex,
pub events: Vec<OcpmEvent>,
pub resources: HashMap<String, Resource>,
pub variants: HashMap<String, ProcessVariant>,
pub cases: HashMap<Uuid, CaseTrace>,
/* private fields */
}Expand description
Complete OCPM event log with all events, objects, and relationships.
Fields§
§metadata: EventLogMetadataLog metadata
object_types: HashMap<String, ObjectType>Object type definitions
activity_types: HashMap<String, ActivityType>Activity type definitions
objects: ObjectGraphAll object instances
object_relationships: RelationshipIndexAll object relationships
events: Vec<OcpmEvent>All events
resources: HashMap<String, Resource>Resources
variants: HashMap<String, ProcessVariant>Process variants (computed)
cases: HashMap<Uuid, CaseTrace>Case traces
Implementations§
Source§impl OcpmEventLog
impl OcpmEventLog
Sourcepub fn with_metadata(metadata: EventLogMetadata) -> Self
pub fn with_metadata(metadata: EventLogMetadata) -> Self
Create with metadata.
Sourcepub fn register_object_type(&mut self, object_type: ObjectType)
pub fn register_object_type(&mut self, object_type: ObjectType)
Register an object type.
Sourcepub fn register_activity_type(&mut self, activity_type: ActivityType)
pub fn register_activity_type(&mut self, activity_type: ActivityType)
Register an activity type.
Sourcepub fn register_resource(&mut self, resource: Resource)
pub fn register_resource(&mut self, resource: Resource)
Register a resource.
Sourcepub fn add_object(&mut self, object: ObjectInstance)
pub fn add_object(&mut self, object: ObjectInstance)
Add an object.
Sourcepub fn add_relationship(&mut self, relationship: ObjectRelationship)
pub fn add_relationship(&mut self, relationship: ObjectRelationship)
Add an object relationship.
Sourcepub fn events_for_object(&self, object_id: Uuid) -> Vec<&OcpmEvent>
pub fn events_for_object(&self, object_id: Uuid) -> Vec<&OcpmEvent>
Get events for an object.
Sourcepub fn events_for_activity(&self, activity_id: &str) -> Vec<&OcpmEvent>
pub fn events_for_activity(&self, activity_id: &str) -> Vec<&OcpmEvent>
Get events for an activity.
Sourcepub fn events_in_range(
&self,
start: NaiveDate,
end: NaiveDate,
) -> Vec<&OcpmEvent>
pub fn events_in_range( &self, start: NaiveDate, end: NaiveDate, ) -> Vec<&OcpmEvent>
Get events for a date range.
Sourcepub fn compute_variants(&mut self)
pub fn compute_variants(&mut self)
Compute process variants from completed cases.
Sourcepub fn summary(&self) -> EventLogSummary
pub fn summary(&self) -> EventLogSummary
Get summary statistics.
Sourcepub fn with_standard_types(self) -> Self
pub fn with_standard_types(self) -> Self
Initialize with standard P2P and O2C types.
Sourcepub fn rebuild_indices(&mut self)
pub fn rebuild_indices(&mut self)
Rebuild indices (call after deserialization).
Trait Implementations§
Source§impl Clone for OcpmEventLog
impl Clone for OcpmEventLog
Source§fn clone(&self) -> OcpmEventLog
fn clone(&self) -> OcpmEventLog
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OcpmEventLog
impl Debug for OcpmEventLog
Source§impl Default for OcpmEventLog
impl Default for OcpmEventLog
Source§impl<'de> Deserialize<'de> for OcpmEventLog
impl<'de> Deserialize<'de> for OcpmEventLog
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OcpmEventLog
impl RefUnwindSafe for OcpmEventLog
impl Send for OcpmEventLog
impl Sync for OcpmEventLog
impl Unpin for OcpmEventLog
impl UnwindSafe for OcpmEventLog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more