Thanks Greg, this is what I have eventually ended up doing. I was initially suspicious of doing it for such a large batch, but it seems to work ok.
Thanks to all who replied Peri Peri Stracchino Digital Library Team University of York ext 4082 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 11 October 2008 16:54 To: [email protected] Subject: Fedora-commons-users Digest, Vol 20, Issue 15 Send Fedora-commons-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/fedora-commons-users or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Fedora-commons-users digest..." Today's Topics: 1. Re: Supplying PID for 'about' attribute to RELS-EXT (Greg Jansen) 2. Fedora 3 behind Apaceh 2.2 mod_proxy (Elliot Metsger) 3. Re: Fedora 3 behind Apaceh 2.2 mod_proxy (Elliot Metsger) 4. Re: Supplying PID for 'about' attribute toRELS-EXT (Luis Zorita) ---------------------------------------------------------------------- Message: 1 Date: Thu, 09 Oct 2008 10:43:50 -0400 From: Greg Jansen <[EMAIL PROTECTED]> Subject: Re: [Fedora-commons-users] Supplying PID for 'about' attribute to RELS-EXT To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Peri, I had the same problem when I was writing a mass ingest tool. We ended up using the API to request batches of new PIDs from Fedora. https://fedora-commons.org/confluence/display/FCR30/API-M-LITE#API-M-LITE-ge tNextPID Then I added the PIDs to the FOXML and the RDF for RELS-EXT prior to ingest. It seems to work fine and makes fewer round trips to Fedora, which seems important in batch mode. I've been requesting lots of PIDs at once without a problem. This is one of those areas where I think the Fedora roadmap seems to be headed, especially with future support for the Java transaction API (JTA). Greg Jansen Carolina Digital Repository UNC Chapel Hill ps552 wrote: > Hi > > I'm working on a mass ingest for Fedora. I write the foxml for each > object I want to ingest, then use the fedora client to perform the > actual ingest, allowing the client to allocate the correct pid in each > case. So far so good. The problem comes when I try to write the RDF > (RELS_EXT) section to specify that the item is a member of a specific > collection. Without a PID for the "about" parameter I get a > SAXException. But as the object is not yet ingested it does not yet have a pid... > Since this situation IS allowed for in foxML - you just omit the PID > from the relevant foXML elements - I assume there must also be a way > to deal with it in the RDF section. Can anyone help? > > Heres the relevant section from a sample foxml file I have created for > ingest. york:1 is the PID of the previously created collection object. > > <foxml:datastream ID="RELS-EXT" CONTROL_GROUP="X"> > <foxml:datastreamVersion ID="RELS-EXT.0" MIMETYPE="text/xml" > LABEL="Fedora Object-to-Object Relationship Metadata"> > <foxml:xmlContent> <rdf:RDF > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:fedora="info:fedora/fedora-system:def/relations-external#" > xmlns:myns="http://www.nsdl.org/ontologies/relationships#" > xmlns:dc="http://purl.org/dcs/elements/1.1/" > xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc"> > <rdf:Description rdf:about="> > <rel:isMemberOf rdf:resource="info:fedora\york:1" > xmlns:rel="info:fedora/fedora-system:def/relations-external#"/> > </rdf:Description> > </rdf:RDF> > </foxml:xmlContent> > </foxml:datastreamVersion> > </foxml:datastream> > > Thanks > > Peri Stracchino > Digital Library Team > University of York > ext 4082 > > > ---------------------------------------------------------------------- > --- This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & > win great prizes Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fedora-commons-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users > ------------------------------ Message: 2 Date: Fri, 10 Oct 2008 13:25:29 -0400 From: Elliot Metsger <[EMAIL PROTECTED]> Subject: [Fedora-commons-users] Fedora 3 behind Apaceh 2.2 mod_proxy To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Hi, I'm using Fedora 3 behind Apache 2.2's mod_proxy. When viewing the object profile of the demo objects, the Item and Dissemination index links are the direct urls to Tomcat, and bypass the proxy. E.g. a request for http://fedora-test.mse.jhu.edu/fedora/get/demo:8 succeeds, but the dissemination index url is presented as: http://fedora-test.mse.jhu.edu:8081/fedora/get/demo:8/fedora-system:3/viewMe thodIndex when I really want it to be http://fedora-test.mse.jhu.edu/fedora/get/demo:8/fedora-system:3/viewMethodI ndex (no port 8081). In ReadOnlyContext, line 421: if (request.getLocalPort() > -1) { environmentMap.set(Constants.HTTP_REQUEST.SERVER_PORT.uri, "" + request.getLocalPort()); } Shouldn't request.getServerPort() be being used, instead of request.getLocalPort()? Or is there another way for me to accomplish what I want (without using mod_rewrite). Thanks, Elliot ------------------------------ Message: 3 Date: Fri, 10 Oct 2008 18:02:02 -0400 From: Elliot Metsger <[EMAIL PROTECTED]> Subject: Re: [Fedora-commons-users] Fedora 3 behind Apaceh 2.2 mod_proxy To: [EMAIL PROTECTED] Cc: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Phil, Try applying this patch to your Fedora 3.0 source tree and recompiling. Redeploy the war and see if it corrects the problem (it does for me). Index: src/java/fedora/server/ReadOnlyContext.java =================================================================== --- src/java/fedora/server/ReadOnlyContext.java (revision 7767) +++ src/java/fedora/server/ReadOnlyContext.java (working copy) @@ -420,7 +420,7 @@ } if (request.getLocalPort() > -1) { environmentMap.set(Constants.HTTP_REQUEST.SERVER_PORT.uri, "" - + request.getLocalPort()); + + request.getServerPort()); } if (request.getProtocol() != null) { On Oct 10, 2008, at 3:28 PM, Phil Cryer wrote: > I asked this same question a few days ago: > > > [Fedora-commons-users] Proxying > fedora behind port 80 (nginx > I've hit the same stopping point on it. I know php frontends and such > on the the same host will be able to see things fine, but outside of > that, and for providing oai-pmh URLs, it won't. > > P > > > On Fri, 2008-10-10 at 13:25 -0400, Elliot Metsger wrote: >> Hi, >> >> I'm using Fedora 3 behind Apache 2.2's mod_proxy. >> >> When viewing the object profile of the demo objects, the Item and >> Dissemination index links are the direct urls to Tomcat, and bypass >> the proxy. >> >> E.g. a request for http://fedora-test.mse.jhu.edu/fedora/get/demo:8 >> succeeds, but the dissemination index url is presented as: >> http://fedora-test.mse.jhu.edu:8081/fedora/get/demo:8/fedora-system:3 >> /viewMethodIndex when I really want it to be >> http://fedora-test.mse.jhu.edu/fedora/get/demo:8/fedora-system:3/view >> MethodIndex >> (no port 8081). >> >> In ReadOnlyContext, line 421: >> >> if (request.getLocalPort() > -1) { >> >> environmentMap.set(Constants.HTTP_REQUEST.SERVER_PORT.uri, "" >> + request.getLocalPort()); >> } >> >> >> Shouldn't request.getServerPort() be being used, instead of >> request.getLocalPort()? >> >> Or is there another way for me to accomplish what I want (without >> using mod_rewrite). >> >> Thanks, >> Elliot >> >> --------------------------------------------------------------------- >> ---- This SF.Net email is sponsored by the Moblin Your Move >> Developer's challenge Build the coolest Linux based applications with >> Moblin SDK & win great prizes Grand prize is a trip for two to an >> Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Fedora-commons-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users > -- > Phil Cryer | Open Source Development | Missouri Botanical Garden > www: http://mobot.org | latitude, longitude: 38.613877, -90.257943 > email: phildotcryeratmobotdotorg | im googletalk/skype: phil.cryer ------------------------------ Message: 4 Date: Sat, 11 Oct 2008 17:35:02 +0200 From: Luis Zorita <[EMAIL PROTECTED]> Subject: Re: [Fedora-commons-users] Supplying PID for 'about' attribute toRELS-EXT To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Hi all: Attached you will find a xslt I used 2 years ago to ingest mor than 2000 digital objects coming from other xml structure. The RELS-EXT datastream is created with the pid created in the transformation process.If yo have already the foxml you will need to recreate with a very similar xslt. The RELS-EXT -about part of the stylsheet is: <rdf:RDF xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rel="info:fedora/fedora-system:def/relations-external#" xmlns:xsi="http://www.w3.org/2001/XMLSchema"> <xsl:variable name="infopid" select="concat('info:fedora/',$pid)"/> <rdf:description rdf:about="{$infopid}"> <xsl:variable name="libre"> <xsl:value-of select="./ud:libre"/> </xsl:variable> <xsl:variable name="numero1"> <xsl:value-of select="substring-before($libre,')')"/> </xsl:variable> <xsl:variable name="numero"> <xsl:value-of select="substring-after($numero1,'(')"/> </xsl:variable> <xsl:variable name="miembrode1"> <xsl:value-of select="normalize-space(concat('info:fedora/bibliuned:Endoxa-',$fecha))"/> </xsl:variable> <xsl:variable name="miembrode2"> <xsl:value-of select="normalize-space(concat($miembrode1,'-numero'))"/> </xsl:variable> <xsl:variable name="miembrode"> <xsl:value-of select="normalize-space(concat($miembrode2,$numero))"/> </xsl:variable> <oai:itemID> <xsl:value-of select="$pid"/> </oai:itemID> <rel:isMemberOf rdf:resource="{$miembrode}"/> <rel:isMemberOf rdf:resource="info:fedora/bibliuned:Setarticulo"/> </rdf:description> </rdf:RDF> It works. I hope it will help you. Luis Zorita Greg Jansen escribi?: > Peri, > I had the same problem when I was writing a mass ingest tool. We ended > up using the API to request batches of new PIDs from Fedora. > > https://fedora-commons.org/confluence/display/FCR30/API-M-LITE#API-M-LITE-ge tNextPID > > Then I added the PIDs to the FOXML and the RDF for RELS-EXT prior to > ingest. It seems to work fine and makes fewer round trips to Fedora, > which seems important in batch mode. I've been requesting lots of PIDs > at once without a problem. > > This is one of those areas where I think the Fedora roadmap seems to be > headed, especially with future support for the Java transaction API (JTA). > > Greg Jansen > Carolina Digital Repository > UNC Chapel Hill > > ps552 wrote: > >> Hi >> >> I'm working on a mass ingest for Fedora. I write the foxml for each object I >> want to ingest, then use the fedora client to perform the actual ingest, >> allowing the client to allocate the correct pid in each case. So far so >> good. The problem comes when I try to write the RDF (RELS_EXT) section to >> specify that the item is a member of a specific collection. Without a PID >> for the "about" parameter I get a SAXException. But as the object is not yet >> ingested it does not yet have a pid... >> Since this situation IS allowed for in foxML - you just omit the PID from >> the relevant foXML elements - I assume there must also be a way to deal with >> it in the RDF section. Can anyone help? >> >> Heres the relevant section from a sample foxml file I have created for >> ingest. york:1 is the PID of the previously created collection object. >> >> <foxml:datastream ID="RELS-EXT" CONTROL_GROUP="X"> >> <foxml:datastreamVersion ID="RELS-EXT.0" MIMETYPE="text/xml" LABEL="Fedora >> Object-to-Object Relationship Metadata"> >> <foxml:xmlContent> >> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >> xmlns:fedora="info:fedora/fedora-system:def/relations-external#" >> xmlns:myns="http://www.nsdl.org/ontologies/relationships#" >> xmlns:dc="http://purl.org/dcs/elements/1.1/" >> xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc"> >> <rdf:Description rdf:about="> >> <rel:isMemberOf rdf:resource="info:fedora\york:1" >> xmlns:rel="info:fedora/fedora-system:def/relations-external#"/> >> </rdf:Description> >> </rdf:RDF> >> </foxml:xmlContent> >> </foxml:datastreamVersion> >> </foxml:datastream> >> >> Thanks >> >> Peri Stracchino >> Digital Library Team >> University of York >> ext 4082 >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Fedora-commons-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users >> >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fedora-commons-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users > > -------------- next part -------------- A non-text attachment was scrubbed... Name: ud-to-foxmlendoxa.xsl Type: text/xml Size: 10532 bytes Desc: not available ------------------------------ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ------------------------------ _______________________________________________ Fedora-commons-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fedora-commons-users End of Fedora-commons-users Digest, Vol 20, Issue 15 **************************************************** ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Fedora-commons-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
