Greenstone tutorial exercise
Moving a collection from DSpace to Greenstone
- Start a new collection called StoneD and fill out its fields appropriately.
- In the Design panel add DSpacePlugin. Leave the plugin options at their defaults and press <OK>.
- Using the up arrow, move the position of DSpacePlugin to the top of the list (above GreenstoneXMLPlugin).
- 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.
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.
- 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".
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).
- 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.
- 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.
- 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:
<br/>Also available as:
- 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
- Click <Add Format>.
Then scroll down to the classifierNode template for VLists. Here, replace:
<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.
- 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:
<br/>Also available as:
- Repeat the exact same step for the search format feature's documentNode template, so that it now also makes reference to <gsf:equivDocLink/>.
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.