Thursday, May 13, 2010

2010/05/12-13 - OAI harvest to Vufind

The vufind-import tool now supports simple OAI harvest. I finally got an OAI-harvest to VuFind tool working. As a test I was able to harvest most of the 15000 records in Georgia Tech's ETD collection into Vufind on devcat.

The tool harvests the OAI metadata, then applies an XSL transform, and finally posts the result to the Solr server: http://devcat.lib.auburn.edu:8080/solr/biblio

The XSL for the GTech ETD collection is below. You can see what the import-app looks like here: http://redlib1.lib.auburn.edu:8080/AuCataloging/jar/vygr2vfnd.jnlp If you click on the 'OAI' tab, and reset the XSL-file field to a copy of the XSL below, then you can test the OAI import.

I spent some time yesterday setting up the Honors College Collection in our repository server. Boyd told me yesterday that the LADC staff that we need to talk with about setting up an online collection for LADC senior projects are not available during intercession. He'll catch up with them when summer term starts, and hopefully things will work out.

gaTech.xsl:
--------------------------------

<?xml version="1.0" encoding="UTF-8" ?>


<xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" 
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     >
  <xsl:output method="xml" indent="yes"/>
<!--
http://smartech.gatech.edu/oai/request?verb=ListRecords&set=hdl_1853_4760&metadataPrefix=oai_dc 

-->

  <!-- pass-through rule -->
  <xsl:template match="@*|node()">
      <!--
     <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
     </xsl:copy>
        -->
  </xsl:template>


  <xsl:template match="/oai_dc:dc">
   <doc><xsl:apply-templates select="*" />
       <field name="format">Electronic</field>
       <field name="collection">Auburn University ETD</field>
       <field name="building">Auburn University Digital
Library</field>
       <field name="publisher">Georgia Institute of Technology</field>
       <field name="allfields">
   <xsl:for-each select="*">
       <xsl:value-of select="." /><xsl:text>
</xsl:text>
   </xsl:for-each>
      </field>
     </doc>
  </xsl:template>

  <xsl:template match="dc:identifier[1]">
    <field name="id">GTechETD<xsl:value-of
select='substring-after(.,"http://hdl.handle.net/1853/")'/></field>
    <field name="url"><xsl:value-of select="." /></field>
  </xsl:template>


  <xsl:template match="dc:creator">
     <field name="author"><xsl:value-of select="." /></field>
  </xsl:template>

  <xsl:template match="dc:subject">
    <field name="topic"><xsl:value-of select="." /></field>
    <field name="fulltopic"><xsl:value-of select="." /></field>
   </xsl:template>


  <xsl:template match="dc:title[1]">
     <field name="title"><xsl:value-of select="." /></field>
  </xsl:template>

  <xsl:template match="dc:description">
    <field name="description">
      <xsl:value-of select="." /></field>
  </xsl:template>

</xsl:stylesheet>

1 comment:

  1. Hi Reuben,
    This is great, well done! Is this something that can be shared back to the VuFind community?
    Eoghan

    ReplyDelete