# Provenance metadata and events (Event management)

Keeping a view and record of events that have affected objects, either within LIBSAFE or in a previous system, is considered a good digital preservation practice as it allows users to keep a record of what has been happening, at the granularity of an object, a file or several files (which may not even exist in the system anymore: for example, a file deletion event during an ingestion process).

**LIBSAFE** implements a PREMIS-based system as a schema for representing events.

This functionality allows maintaining a list of events associated to the objects, so that it can be loaded from external sources, consulted by multiple means (object tab and API) and exported in the future through the DIP functionality.

Unlike the framework that defines the PREMIS standard, LIBSAFE has adopted some changes to adapt the functionality, seeking with this to have a conditioning to the standard that is compatible with the application's own model and that fit the concept of digital objects.

* In the PREMIS model, a single event can be associated with more than one file or object. In LIBSAFE a restriction is introduced to allow an event linked with only one file (existing or not) or with an object.
* In the PREMIS model, an event can be associated to a date/time or a range of dates/times. In LIBSAFE a single one is registered (at the beginning).
* In the PREMIS model, the event details are repeatable (the same event can have more than one Type or Detail). In LIBSAFE these events are unique.
* Although in the PREMIS model, events and agents are two independent entities and a given agent can generate multiple events, in LIBSAFE these entities are unified into one, with it, the agent is a property of an event.

This functionality is viewable in LIBSAFE through object details in the section “**Audit trail and provenance details**”, and from this section it is possible to access even a higher detailed content.

To display this functionality of events in the catalogue of an object, it is necessary that this content exists. If this is not the case, the new section in the catalogue of the object indicates that related records do not exist.

Without events:

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYp57PY27oNaVp2DFI%2Fimage.png?alt=media\&token=418f37a8-4498-4eff-aaaa-1b7509334936)

With events:

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYp8XXAX96_iOEftf6%2Fimage.png?alt=media\&token=11bd16b2-8480-400f-82c1-548106268fd5)

When an object has events, in the object catalogue appears the link (_View all provenance events for this object_) to access to the detailed events page. This page shows the details for each event both for the object and the files within.

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpC5dhwsVdBWWOZyp%2Fimage.png?alt=media\&token=f9ab23b2-bc58-4afb-a7ae-c2c9d8fbf817)

The graph shows in a pie chart the percentage distribution of events of the object by their type; this graph allows a maximum of 10 different types of events so that the information is represented correctly. To see the detail of each event, just click on the detail icon framed in the following image:

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpIktElLQ0tikr-Ej%2Fimage.png?alt=media\&token=7e3adc4a-fda8-463d-9afe-f34a93e72089)

The following is the detail of the events found in the system and that are part of the explored object. These events can be associated to two different types of content: to the object as a unit to which an event has been applied.

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpKlRQ5F0duLcP6Fz%2Fimage.png?alt=media\&token=709e9088-b2b3-4dcb-9950-01b7b9081678)

Or a file belonging to the object affected by an event; in contrast with object events, these show an additional row with a link in the filename to redirect to the file details section in LIBSAFE as in the following picture.

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpNX9BHX2qHnt2JUS%2Fimage.png?alt=media\&token=8ed7470d-ae9c-4453-8660-d74061af7c99)

Each record in the Events table has an option to expand its information and another option to copy the content to the clipboard in JSON format. This last option will launch an alert window to the user to indicate the action taken.

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpQF2uJK48Jq5Zj4t%2Fimage.png?alt=media\&token=188a6939-857f-438a-b1c6-9632401e5cc3)

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpS6vbg3wGwPWq3Qk%2Fimage.png?alt=media\&token=18aa648b-0158-4562-85dc-2c06aca919c3)

From the section showing the file details it is possible to visualize the events table associated with that file. Unlike the details table in which a link to the file is shown, this one does not show this row while the rest of the information is displayed.

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpV8FTuzk911Zq0e9%2Fimage.png?alt=media\&token=a03d80c2-5b5b-40ee-94eb-d51c52a18621)

Clicking on the details option displays more detail about the event.

![](https://1027461619-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjAMV2uTheGBDHeGhtb%2F-MjYeWgOIN4yw8WLTC3R%2F-MjYpXu5jja2PhToiXxL%2Fimage.png?alt=media\&token=c33aa632-cb6c-43ec-add0-8fe9b29819bf)
