Delete Content

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

Overview

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.

Installation

To install the plugin, the following file must be installed:

/opt/digiverso/goobi/plugins/step/plugin_intranda_step_deleteContent-base.jar

To configure how the plugin should behave, various values can be adjusted in the configuration file. The configuration file is usually located here:

/opt/digiverso/goobi/config/plugin_intranda_step_deleteContent.xml

Overview and functionality

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.

Since this plugin is usually to be executed automatically, the step in the workflow should be configured as automatic.

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.

Configuration

The configuration of the plugin is structured as follows:

<config_plugin>
    <config>
        <project>*</project>
        <step>*</step>
        
        <!-- delete all data within the images/ folder -->
        <deleteAllContentFromImageDirectory>false</deleteAllContentFromImageDirectory>
        
        <!-- OR delete a single image folder - this is only used if deleteAllContentFromImageDirectory is set to false -->
        <deleteMediaDirectory>false</deleteMediaDirectory>
        <deleteMasterDirectory>false</deleteMasterDirectory>
        <deleteSourceDirectory>false</deleteSourceDirectory>
        <deleteFallbackDirectory>false</deleteFallbackDirectory>
        <!-- configure any additional folder. This folder gets deleted, if the folder name was configured in goobi_config.properties and does exist in current process -->
        <!-- 
        <additionalFolder>images.jpeg</additionalFolder>
        <additionalFolder>images.cropped</additionalFolder>
        -->
        <!-- delete all data within the thumbs/ folder -->
        <deleteAllContentFromThumbsDirectory>false</deleteAllContentFromThumbsDirectory>
        
        <!-- delete all data within the ocr/ folder -->
        <deleteAllContentFromOcrDirectory>false</deleteAllContentFromOcrDirectory>
        
        <!-- OR delete a single ocr folder - this is only used if deleteAllContentFromOcrDirectory is set to false -->
        <deleteAltoDirectory>false</deleteAltoDirectory>
        <deletePdfDirectory>false</deletePdfDirectory>
        <deleteTxtDirectory>false</deleteTxtDirectory>
        <deleteWcDirectory>false</deleteWcDirectory>
        <deleteXmlDirectory>false</deleteXmlDirectory>
        
        <!-- delete export folder -->
        <deleteExportDirectory>false</deleteExportDirectory>
        
        <!-- delete import folder -->
        <deleteImportDirectory>false</deleteImportDirectory>
        
        <!-- delete processlog folder -->
        <deleteProcesslogDirectory>false</deleteProcesslogDirectory>

        <!-- delete validation folder -->
        <deleteValidationDirectory>false</deleteValidationDirectory>
        
        <!-- delete metadata -->
        <deleteMetadataFiles>false</deleteMetadataFiles>
        
        <!-- deactivate all unfinished tasks -->
        <deactivateProcess>false</deactivateProcess>
        
        <!-- delete specific metadata in the structure main object (e.g. Monograph or Volume) 
             use the internal ruleset name here, e.g. singleDigCollection, DocLanguage etc. 
             this field is repeatable -->
        <deleteMetadata name="myMetadataType"/>

        <!-- delete specific process properties, e.g. Font type, Opening angle etc. 
             this field is repeatable -->
        <deleteProperty name="Opening angle"/>
        
        
        
    </config>
</config_plugin>

General parameters

The <config> block can occur repeatedly for different projects or work steps in order to be able to perform different actions within different workflows. The other parameters within this configuration file have the following meanings:

Further parameters

In addition to these general parameters, the following parameters are available for further configuration:

Last updated