What version of the repository are you using?  Batch purges are 
supported in Fedora 3.5:

https://jira.duraspace.org/browse/FCREPO-756

Command: fedora-purge

Summary: Purges an object from the Fedora repository.

Syntax:
   fedora-purge host:port user password pid|fileURI protocol log [context]

Where:
   host          is the target repository hostname.
   port          is the target repository port number.
   user          is the id of the target repository user.
   password      is the password of the target repository user.
   pid|fileURI   is the id of the object to purge from the target repository
                 OR the file URL for a file containing pids to purge, 
one pid per line
   protocol      is the protocol to communicate with repository (http or 
https)
   log           is a log message.
   context  (optional) is a different web application server context of 
Fedora (default is fedora)

Examples:
fedora-purge myrepo.com:8443 jane janepw demo:5 https "my message"

   Purges the object whose pid is demo:5 from the
   target repository at myrepo.com:8443 using the secure https protocol 
(SSL)

fedora-purge myrepo.com:8443 jane janepw file:///some/dir/purge-pids.txt 
http "my message"

   Purges the objects whose pids are listed in the file 
/some/dir/purge-pids.txt from the target repository at myrepo.com:8443 
using the non-secure http protocol

I see that the fedora-purge documentation needs to be updated, however. 
  I'll do that.

-- Scott

On 11/04/2011 02:16 PM, James, Eric wrote:
> Thanks Michael.  I was actually able to make in about five minutes a java 
> program that takes a pidnamespace, startnumber and endnumber.  The program 
> loops through and creates a directives file that can be processed in the 
> fedora-admin client (Tools->Batch->ModifyBatch->Process Directives).  Code is 
> below if interested:
>
> public void writeFile() throws Exception {
>          bw.write("<fbm:batchModify 
> xmlns:fbm=\"http://www.fedora.info/definitions/\"; 
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"; 
> xsi:schemaLocation=\"http://www.fedora.info/definitions/ 
> http://www.fedora.info/definitions/1/0/api/batchModify.xsd\";>\n");
>          int s = Integer.parseInt(start);
>          int e = Integer.parseInt(end);
>          for (int i=s;i<=e;i++) {
>              bw.write("<fbm:purgeObject pid=\""+pid+":"+i+"\" 
> logMessage=\"Batch Modify-purgeObject\"/>\n");
>          }
>          bw.write("</fbm:batchModify>");
>          bw.flush();
>          bw.close();
>          System.out.println("DirectiveFile created:"+directiveFileStr);
>      }
>
> ________________________________________
> From: Michael Della Bitta [michaeldellabi...@nypl.org]
> Sent: Friday, November 04, 2011 2:24 PM
> To: Support and info exchange list for Fedora users.
> Subject: Re: [fcrepo-user] refreshing a fedora repository
>
> Eric,
>
> I usually take the server down, delete everything under the objects
> and datastream trees, run the rebuild script for the database (and the
> triplestore, if you're using it) and bring the server back up.
>
> Michael Della Bitta
>
> Senior Applications Developer
> Information Technology Group
> The New York Public Library
> 40 West 20th Street, 5th Floor
> New York, NY 10011-4211
> (212) 621-0609
>
>
>
> On Fri, Nov 4, 2011 at 2:12 PM, James, Eric<eric.ja...@yale.edu>  wrote:
>> I will most likely be going through several iterations of ingesting about 
>> ~1k of objects and purging.  Is there a "repository refresh" action 
>> somewhere, perhaps in the fedora-admin client or REST services? Or a 
>> purgeObject service with date range parameters?  The only option I can think 
>> of is to generate a list of pids and either build a script that calls the 
>> purgeObject service on that list, or do something similar with the 
>> processDirectives in the fedora-admin client, but it seems like there should 
>> be a simpler way.
>>
>>
>>
>> Thanks,
>>
>> Eric
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> _______________________________________________
>> Fedora-commons-users mailing list
>> Fedora-commons-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users


-- 
Scott Prater
Library, Instructional, and Research Applications (LIRA)
Division of Information Technology (DoIT)
University of Wisconsin - Madison
pra...@wisc.edu

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to