Greenstone tutorial exercise

Back to wiki
Back to index
Sample files: dspace.zip
Devised for Greenstone version: 2.60
Modified for Greenstone version: 2.87

Moving a collection from DSpace to Greenstone

  1. Start a new collection called StoneD and fill out its fields appropriately.

  1. In the Design panel add DSpacePlugin. Leave the plugin options at their defaults and press <OK>.

  1. Using the up arrow, move the position of DSpacePlugin to the top of the list (above GreenstoneXMLPlugin).

  1. In the Gather panel, locate the folder sample_files → dspace. It contains five example items exported from a DSpace institutional repository. Copy them into your collection by dragging them over to the right-hand side of the panel. Cancel out of any dialog offering to add plugins.

  1. Build the collection and preview it to see the basic defaults exhibited by a DSpace collection.

If you browse by titles, you will find 7 documents listed, though only 5 items were exported from DSpace. Two of the original items had alternative forms in their directory folder. The DSpace plug-in options control what happens in such situations: the default is to treat them as separate Greenstone documents.

Below we use a plug-in option (first_inorder_ext) to fuse the alternative forms together. This option has the effect of treating documents with the same filename but different extensions as a single entity within a collection. One of the files is viewed as the primary document—it is indexed, and metadata is extracted from it if possible—while the others are handled as "associated files."

The first_inorder_ext option takes as its argument a list of file extensions (separated by commas): the first one in the list that matches becomes the primary document.

  1. Back in the Design panel's Document Plugins section, select DSpacePlugin and click <Configure Plugin...>. Switch on its configuration option first_inorder_ext. Set its value to "pdf,doc,rtf".

  1. Build and preview the collection.

There are now only 5 documents, because only one version of each document has been included—the primary version.

Adding indexing and browsing capabilities to match DSpace's

The DSpace exported files contain Dublin Core metadata for title and author (amongst other things).

  1. In the Design panel, select Search Indexes. Delete the ex.Source index, and add one for ex.dc.Contributor. Rename the ex.dc.Contributor index by going to the Search section in the Format panel. Select this index and change its value to contributors.

  1. Go back to the Design panel, select Browsing Classifiers. Select the ex.Source List classifier and click <Configure Classifier...>. Change the metadata option to ex.dc.Contributor. Activate the bookshelf_type option and set its value to always. If not already active, activate the partition_type_within_level option. Then set it to none. Finally, activate buttonname and set this to Contributors. Click <OK> to close the dialog.

  1. Now select the Format Features section of the Format panel, and select the browse format statement in the list of assigned format statements. Add the following text before the final </td> of the documentNode template:

    <gsf:switch>
    <gsf:metadata name="equivDocLink"/>
    <gsf:when test="exists">
    <br/>Also available as:
    <gsf:metadata name="equivDocLink"/>
    <gsf:metadata name="equivDocIcon"/>
    <gsf:metadata name="/equivDocLink"/>
    </gsf:when>
    </gsf:switch>

  1. Also, let's add a format statement for the classifier based on ex.dc.Contributor metadata. In the Choose Feature menu (under Format Features on the Format panel), select the item that starts with:

    CL2: List -metadata ex.dc.Contributor

  1. Click <Add Format>. Replace

    <xsl:call-template name="choose-title"/>

    with

    <gsf:metadata name="ex.dc.Title"/>

    Then scroll down to the classifierNode template for VLists. Here, replace:

    <gsf:metadata name="Title"/>

    with

    <gsf:metadata name="Title"/> (<gsf:metadata name="numleafdocs"/>)

    This will display the number of documents for each bookshelf in the Contributors classifier. And for individual documents within each bookshelf, it will display the ex.dc.Title.

  1. Make the same change to CL2's documentNode template as you did above for the browse format statement's documentNode template, by adding the following text before the final </td> of CL2's documentNode template:

    <gsf:switch>
    <gsf:metadata name="equivDocLink"/>
    <gsf:when test="exists">
    <br/>Also available as:
    <gsf:metadata name="equivDocLink"/>
    <gsf:metadata name="equivDocIcon"/>
    <gsf:metadata name="/equivDocLink"/>
    </gsf:when>
    </gsf:switch>

  1. Repeat the exact same step for the search format feature's documentNode template, so that it now also makes reference to <gsf:equivDocLink/>.

  1. Build the collection once again and preview it.

There are still only 5 documents, but against some of the entries appears the line "Also available as:" followed by icons that link to the alternative representations.


Copyright © 2005-2019 by the New Zealand Digital Library Project at the University of Waikato, New Zealand
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License.”