About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:eprints

This is an old revision of the document!


How to import EPrints with VuFind

Tips and configurations courtesy of Ranju Upadhyay, National University of Ireland Maynooth.

As our repo is EPrints, I have needed to do the configuration in VuFind for data harvest from EPrints. It is not whole lot different than DSpace.

On the EPrints side, the data is already exposed for harvesting in oai_dc, so there was no configuration needed there. On VuFind, I did the following:

1. Set up OAI Harvester

I created a section on oai.ini which looks something like this:

[NUIMEprints]
url = http://oureprintshostname/cgi/oai2
metadataPrefix = oai_dc
idSearch[] = "/^oai:generic.eprints.org:/"
idReplace[] = "nuimeprn-"
;idSearch[] = "/\//"
;idReplace[] = "-"
injectId = "identifier"
;injectDate = "datestamp"

The big thing that I discovered in this stage was that VuFind does not like full colon i.e. “:” so I had to use “-” as the delimeter between my namespace and eprints uuid i.e. nuimeprn- and not nuimeprn:

2. Set up import properties

I then copied the dspace.properities file and renamed it to eprints.properties.In this file I made the following changes:

institution = "National University of Ireland Maynooth "
collection = "ePrints"

3. Set up import XSLT

I then copied dspace.xsl and renamed it eprints.xsl. I made three changes to this file:

First, set the record type to eprints:

<!-- RECORDTYPE -->
<field name="recordtype">eprints</field>

Next, add support for URLs from the dc:relation field:

         <xsl:for-each select="//dc:relation">
            <field name="url">
                   <xsl:value-of select="//dc:relation[normalize-space()]"/>
            </field>
         </xsl:for-each>

Finally, remove the check for hdl.handle.net in the dc:identifier URL processing:

       <xsl:for-each select="//dc:identifier">
           <xsl:if test="substring(., 1, 5) = &quot;http:&quot;">
            <field name="url">
                    <xsl:value-of select="."/>
            </field>
           </xsl:if>
       </xsl:for-each>

4. Set Up Change Tracking (optional)

If you need to track record change dates (see Tracking Record Changes for details), you need to do a couple of extra things:

  • Uncomment the injectDate line in the oai.ini file section above.
  • Add these lines to eprints.properties:
track_changes = 1
solr_core = "biblio"
  • Add these lines to eprints.xsl:

First, after the other parameter declarations:

<xsl:param name="track_changes">1</xsl:param>
<xsl:param name="solr_core">biblio</xsl:param>

Further down, among the other field population code:

<xsl:if test="$track_changes != 0">
    <field name="first_indexed">
        <xsl:value-of select="php:function('VuFind::getFirstIndexed', $solr_core, string(//identifier), string(//datestamp))"/>
    </field>
    <field name="last_indexed">
        <xsl:value-of select="php:function('VuFind::getLastIndexed', $solr_core, string(//identifier), string(//datestamp))"/>
    </field>
</xsl:if>
indexing/eprints.1450110807.txt.gz · Last modified: 2015/12/14 16:33 by demiankatz