Delete Content
This step plugin allows an automatic selective deletion of content from a process.

Introduction

The plugin is used to automatically delete data from a process. For this purpose, a configuration file can be used to define very granularly which data exactly should be deleted.

Overview

Details
Text
Identifier
intranda_step_deleteContent
Licence
GPL 2.0 or newer
Compatibility
Goobi workflow 2021.10
Documentation date
05.12.2021

Installation

To install the plugin, the following file must be installed:
1
/opt/digiverso/goobi/plugins/step/plugin_intranda_step_deleteContent.jar
Copied!
To configure how the plugin should behave, various values can be adjusted in the configuration file. The configuration file is usually located here:
1
/opt/digiverso/goobi/config/plugin_intranda_step_deleteContent.xml
Copied!

Configuration of the plugin

The configuration of the plugin is structured as follows:
1
<config_plugin>
2
3
<config>
4
<project>*</project>
5
<step>*</step>
6
7
<!-- delete all data within the images/ folder -->
8
<deleteAllContentFromImageDirectory>false</deleteAllContentFromImageDirectory>
9
10
<!-- OR delete a single image folder - this is only used if deleteAllContentFromImageDirectory is set to false -->
11
<deleteMediaDirectory>false</deleteMediaDirectory>
12
<deleteMasterDirectory>false</deleteMasterDirectory>
13
<deleteSourceDirectory>false</deleteSourceDirectory>
14
<deleteFallbackDirectory>false</deleteFallbackDirectory>
15
16
<!-- delete all data within the thumbs/ folder -->
17
<deleteAllContentFromThumbsDirectory>false</deleteAllContentFromThumbsDirectory>
18
19
<!-- delete all data within the ocr/ folder -->
20
<deleteAllContentFromOcrDirectory>false</deleteAllContentFromOcrDirectory>
21
22
<!-- OR delete a single ocr folder - this is only used if deleteAllContentFromOcrDirectory is set to false -->
23
<deleteAltoDirectory>false</deleteAltoDirectory>
24
<deletePdfDirectory>false</deletePdfDirectory>
25
<deleteTxtDirectory>false</deleteTxtDirectory>
26
<deleteWcDirectory>false</deleteWcDirectory>
27
<deleteXmlDirectory>false</deleteXmlDirectory>
28
29
<!-- delete export folder -->
30
<deleteExportDirectory>false</deleteExportDirectory>
31
32
<!-- delete import folder -->
33
<deleteImportDirectory>false</deleteImportDirectory>
34
35
<!-- delete processlog folder -->
36
<deleteProcesslogDirectory>false</deleteProcesslogDirectory>
37
38
<!-- delete metadata -->
39
<deleteMetadataFiles>false</deleteMetadataFiles>
40
41
<!-- deactivate all unfinished tasks -->
42
<deactivateProcess>false</deactivateProcess>
43
44
<!-- delete specific metadata in the structure main object (e.g. Monograph or Volume)
45
use the internal ruleset name here, e.g. singleDigCollection, DocLanguage etc.
46
this field is repeatable -->
47
<deleteMetadata name="myMetadataType"/>
48
49
<!-- delete specific process properties, e.g. Font type, Opening angle etc.
50
this field is repeatable -->
51
<deleteProperty name="Opening angle"/>
52
</config>
53
54
</config_plugin>
Copied!
The block <config> can occur repeatedly for different projects or workflow steps in order to be able to carry out different actions within different workflows. The other parameters within this configuration file have the following meanings:
Value
Description
project
This parameter determines the project for which the current block <config> is to apply. The name of the project is used here. This parameter can occur several times per <config> block.
step
This parameter controls for which workflow steps the block <config> is to apply. The name of the step is used here. This parameter can occur several times per <config> block.
deleteAllContentFromImageDirectory
Specify whether to delete all data from the images folder.
deleteMediaDirectory
Specify whether to delete the media folder. This option is not evaluated if deleteAllContentFromImageDirectory is enabled.
deleteMasterDirectory
Specify whether to delete the master folder. This option is not evaluated if deleteAllContentFromImageDirectory is enabled.
deleteSourceDirectory
Specify whether to delete the source folder. This option is not evaluated if deleteAllContentFromImageDirectory is enabled.
deleteFallbackDirectory
Specify whether to delete the configured fallback folder. This option is not evaluated if deleteAllContentFromImageDirectory is enabled.
deleteAllContentFromThumbsDirectory
Specify whether to delete all data from the thumbs folder.
deleteAllContentFromOcrDirectory
Specify whether to delete all data from the ocr folder.
deleteAltoDirectory
Specify whether to delete the alto folder. This option is not evaluated if deleteAllContentFromOcrDirectory is enabled.
deletePdfDirectory
Specify here whether the pdf folder is to be deleted. This option is not evaluated if deleteAllContentFromOcrDirectory is enabled.
deleteTxtDirectory
Specify whether to delete the txt folder. This option is not evaluated if deleteAllContentFromOcrDirectory is enabled.
deleteWcDirectory
Specify whether to delete the wc folder. This option is not evaluated if deleteAllContentFromOcrDirectory is enabled.
deleteXmlDirectory
Specify whether to delete the xml folder. This option is not evaluated if deleteAllContentFromOcrDirectory is enabled.
deleteExportDirectory
Specify whether to delete the export folder.
deleteImportDirectory
Specify whether to delete the import folder.
deleteProcesslogDirectory
Specify whether to delete the folder where the files uploaded in the operation log are managed.
deleteMetadataFiles
Specify here whether the metadata and associated backups should be deleted.
deactivateProcess
When this option is enabled, all steps of the process are disabled if they have not been completed previously.
deleteMetadata
Here a specific metadata can be deleted that is at the level of the work in the metadata file. The item is repeatable and must use a valid name for a metadata type from the rule set.

Integration of the plugin into the workflow

To use the plugin, it must be activated for one or more desired tasks in the workflow. This is done as shown in the following screenshot by selecting the plugin intranda_step_deleteContent from the list of installed plugins.
Assigning the plugin to a specific task
Since this plugin is usually to be executed automatically, the step in the workflow should be configured as automatic.

How the plugin works

Once the plugin is fully installed and set up, it is usually executed automatically within the workflow, so there is no manual interaction with the user. Instead, the workflow calls the plugin in the background and starts the deletion of the configured data. In doing so, the configured folders and data are deleted, if they exist. Data that does not exist will be skipped. If it has been configured that the process is to be deactivated, all workflow steps are run through and checked whether they have already been closed regularly within the workflow. If this is not the case, the steps are deactivated.
When the deletion is complete, a message is added to the process log to inform you that this plugin has been called and the data was deleted.