Bereinigung des Coreservice für NIMS

Admin

/* NIMS Cnntexts escidoc:54218 escidoc:28207 escidoc:468035 */

/* Script to remove import tasks for not nims contexts, on Fedora level separate purge for Item objects and for File objects is needed */ select './fedora-purge.sh localhost:8082 fedoraAdmin fedoraAdmin '||list.item.id ||' http "Removed IMPORTTASK item"' from list.item where id in (select resource_id from list.property             where local_path='/properties/context/id' and value not in ('escidoc:54218', 'escidoc:28207', 'escidoc:468035')) and  id in (select resource_id from list.property              where local_path='/properties/content-model/id'             and value='escidoc:importtask1') union select distinct './fedora-purge.sh localhost:8082 fedoraAdmin fedoraAdmin '||list.property.value ||' http "Removed IMPORTTASK file"' from list.item left join list.property on (list.property.resource_id = list.item.id and list.property.local_path = '/components/component/id') and list.item.id in (select resource_id from list.property             where local_path='/properties/context/id' and value not in ('escidoc:54218', 'escidoc:28207', 'escidoc:468035')) and  list.item.id in (select resource_id from list.property              where local_path='/properties/content-model/id'             and value='escidoc:importtask1')

/*Script to remove publication items from not nims contexts, on Fedora level separate purge for Item objects and for File objects is needed */ select './fedora-purge.sh localhost:8082 fedoraAdmin fedoraAdmin '||list.item.id ||' http "Removed PUB item"' from list.item where id in (select resource_id from list.property             where local_path='/properties/context/id' and value  not in ('escidoc:54218', 'escidoc:28207', 'escidoc:468035')) and  id in (select resource_id from list.property              where local_path='/properties/content-model/id'             and value='escidoc:persistent4') union select distinct './fedora-purge.sh localhost:8082 fedoraAdmin fedoraAdmin '||list.property.value ||' http "Removed PUB item file"' from list.item left join list.property on (list.property.resource_id = list.item.id and list.property.local_path = '/components/component/id') and list.item.id in (select resource_id from list.property             where local_path='/properties/context/id' and value not in ('escidoc:54218', 'escidoc:28207', 'escidoc:468035')) and  list.item.id in (select resource_id from list.property              where local_path='/properties/content-model/id'             and value='escidoc:persistent4')