Sha256: fa166158db6172d5770b72b3629a23e159170d987ba442de0880ad00fdd170b6
Contents?: true
Size: 768 Bytes
Versions: 22
Compression:
Stored size: 768 Bytes
Contents
class JettyCleaner def self.clean(namespace=nil) objects = Fedora::Repository.instance.find_objects(:limit=>1000000) objects.each do |obj| case obj when ActiveFedora::Base puts "deleting #{obj.pid}" when Fedora::FedoraObject puts "found FedoraObject #{obj.pid}" if namespace if obj.pid.match(/^#{namespace}:/) puts "deleting #{obj.pid} from namespace #{namespace}" ActiveFedora::Base.load_instance( obj.pid ).delete end else puts "deleting #{obj.pid}" ActiveFedora::Base.load_instance( obj.pid ).delete end else puts "#{obj.pid} is a #{obj.class}. Could not load and delete it." end end nil end end
Version data entries
22 entries across 22 versions & 1 rubygems