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 [[email protected]]
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 <[email protected]> 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
> [email protected]
> 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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users