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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
importing_records:how_to_index_eprints_with_vufind [2012/05/08 12:36] – created demiankatzindexing:eprints [2015/12/14 18:14] – [4. Set Up Change Tracking (optional)] demiankatz
Line 3: Line 3:
 // Tips and configurations courtesy of Ranju Upadhyay, National University of Ireland Maynooth. // // 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 [[how to index dspace with vufind|DSpace]].+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 [[indexing:dspace|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: 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:
Line 36: Line 36:
 ===== 3. Set up import XSLT ===== ===== 3. Set up import XSLT =====
  
-I then copied dspace.xsl and renamed it eprints.xsl.  Only change I made on this file is:+I then copied dspace.xsl and renamed it eprints.xsl.  I made three changes to this file
 + 
 +First, set the record type to eprints:
  
 <code> <code>
 <!-- RECORDTYPE --> <!-- RECORDTYPE -->
 <field name="recordtype">eprints</field> <field name="recordtype">eprints</field>
 +</code>
 +
 +Next, add support for URLs from the dc:relation field:
 +
 +<code>
 +         <xsl:for-each select="//dc:relation">
 +            <field name="url">
 +                   <xsl:value-of select="//dc:relation[normalize-space()]"/>
 +            </field>
 +         </xsl:for-each>
 +</code>
 +
 +Finally, remove the check for hdl.handle.net in the dc:identifier URL processing:
 +
 +<code>
 +       <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>
 +</code>
 +
 +===== 4. Set Up Change Tracking (optional) =====
 +
 +If you need to track record change dates (see [[tracking_record_changes|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:
 +
 +<code>
 +track_changes = 1
 +solr_core = "biblio"
 +</code>
 +
 +  * Add these lines to eprints.xsl:
 +
 +First, after the other parameter declarations:
 +
 +<code>
 +<xsl:param name="track_changes">1</xsl:param>
 +<xsl:param name="solr_core">biblio</xsl:param>
 +</code>
 +
 +Further down, among the other field population code:
 +
 +<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>
 </code> </code>
 ---- struct data ---- ---- struct data ----
 ---- ----
  
indexing/eprints.txt · Last modified: 2023/11/28 20:08 by demiankatz