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 "_labelCreator_". Using a macro for an index name means that it will display in the correct language (assuming that the macro has been translated). You can check Greenstone → macros → english.dm to see which macros are available.

  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 VList format statement in the list of assigned format statements. Add the following text before the final </td>:

    {If}{[ex.equivlink],<br>Also available as:[ex.equivlink]}

  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. Leave VList as the Affected Component and click <Add Format>. Edit the text in the HTML Format String box. Replace

    {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}

    with

    {If}{[numleafdocs],([numleafdocs]) [ex.Title],[ex.dc.Title]

    This will display the number of documents for each bookshelf in the Contributors classifier.

  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-2016 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.”