Greenstone tutorial exercise

Back to wiki
Back to index
Sample files: images.zip
Devised for Greenstone version: 2.60
Modified for Greenstone version: 2.70w

A simple image collection

  1. In the Librarian Interface, start a new collection (FileNew...) called backdrop. Fill out the fields with appropriate information. For Base this collection on:, select the item Simple image collection (image-e) from the pull-down menu.

    When you base a collection on an existing one, it inherits all the settings of the old one. You won't be asked to choose a metadata set because the new collection inherits the ones (if any) used by the seed collection.

  1. Copy the images provided in sample_files → images into your newly-formed collection.

  1. Change to the Create panel and build the collection.

  1. Preview the result.

  1. Click on in the navigation bar to view a list of the photos ordered by filename and presented as a thumbnail accompanied by some basic data about the image. The structure of this collection is the same as Simple image collection (image-e), but the content is different.

  1. Back in the Librarian Interface, change to the Enrich panel and view the extracted metadata for Bear.jpg.

Adding a metadata set to the collection

We now add our own metadata and use it to give users a new way to browse the collection. We use the Dublin Core metadata set.

  1. The collection (image-e) on which backdrop is based uses only extracted metadata. To add another metadata set, go to the Design panel of the Librarian Interface and click Metadata Sets in the list on the left (the last one). Then click <Add Metadata Set...> (lower left button).

  1. In the window that pops up, select dublin.mds and click <Add>.

  1. Now switch to the Enrich panel by clicking this tab. The metadata for each file now shows the (empty) Dublin Core dc. fields as well as the extracted ex. fields.

Adding Title and Description metadata

  1. We work with just the first three files (Bear.jpg, Cat.jpg and Cheetah.jpg) to get a flavour of what is possible. First, set each file's dc.Title field to be the same as its filename but without the filename extension:

    Click on Bear.jpg so its metadata fields are available, then click on its dc.Title field on the right-hand side. Type in Bear.

    Repeat the process for Cat.jpg and Cheetah.jpg.

  1. Add a description for each image as dc.Description metadata.

    What description should you enter? To remind yourself of a file's content, the Librarian Interface lets you open files by double-clicking them. It launches the appropriate application based on the filename extension, Word for .doc files, Acrobat for .pdf files and so on.

    Double-click Bear.jpg: on Windows, the image will normally be displayed by Microsoft's Photo Editor (although this depends on how your computer has been set up).

    Back in the Enrich pane, make sure that Bear.jpg is selected in the collection tree on the left hand side. Enter the text Bear in the Rocky Mountains as the value for the dc.Description field.

    Repeat this process for Cat.jpg and Cheetah.jpg, adding a suitable description for each.

Change Format Features to display new metadata

  1. Now we customize the collection's appearance. Building or previewing the collection at this point won't reveal anything new. That's because we haven't changed the design of the collection to take advantage of the new metadata.

  1. Go to the Design panel and select Format Features from the left-hand list. Leave the feature selection controls at their default values, so that Choose Feature remains blank and VList is selected as the Affected Component. In the HTML Format String, edit the text as follows:

    Metadata names are case-sensitive in Greenstone: it is important that you capitalize "Title" and "Description" (and don't capitalize "dc").

  1. Next click <Replace Format>. The new format statement will be displayed in the list of assigned format statements. The first substitution alters the fragment of text that appears to the right of the thumbnail image, the second alters the item of metadata that follows it. The addition displays the description after the Title.

  1. Go to the Create panel and click <Build Collection>. Once it has finished building, preview the collection. When you click on in the navigation bar the presentation has changed to "Title: Bear" and so on. Each image's description should appear beside the thumbnail, following the title.

After the first three items, the Title and Description become blank because we have only assigned Dublin Core metadata to these first three. To get a full listing, enter all the metadata.

For some design parameters the collection must be rebuilt before the effect of changes can be seen. However, changes to format statements take place immediately and you can see the result straightaway by clicking reload (or refresh) in the web browser. Above, you were asked to build before previewing because you had added metadata.

Changing the size of image thumbnails

  1. Lets change the size of the thumbnail image and make it smaller. Thumbnail images are created by the ImagePlug plug-in, so we need to access its configuration settings. To do this, switch to the Design panel and select Document Plugins from the list on the left. Double-click plugin ImagePlug to pop up a window that shows its settings. (Alternatively, select plugin ImagePlug with a single click and then click <Configure Plugin...> further down the screen). Currently all options are off, so standard defaults are used. Select thumbnailsize, set it to 50, and click <OK>.

  1. Build and preview the collection.

  1. Once you have seen the result of the change, return to the Design panel, select the configuration options for ImagePlug, and switch the thumbnailsize option off so that the thumbnail reverts to its normal size when the collection is re-built.

Adding a browsing classifier based on Description metadata

  1. Now we'll add a new browsing option based on the descriptions. In the Design panel, select Browsing Classifiers from the left-hand list. Set the menu item for Select classifier to add: to AZList; then click <Add Classifier...>.

  1. A window pops up to control the classifier's options. Set the metadata option to dc.Description and click <OK>.

  1. Build the collection, and preview it. Choose the new descriptions link that appears in the navigation bar.

Only three items are shown, because only items with the relevant metadata (dc.Description in this case) appear in the list. The original browse list includes all photos in the collection because it is based on ex.Image, extracted metadata that reflects an image's filename, which is set for all images in the collection.

Creating a searchable index based on Description metadata

  1. Now we'll add an index so that the collection can be searched by descriptions. Switch to the Design panel and select Search Indexes from the left-hand list. Enter the text "descriptions" as the Index Name:, select dc.Description from the Build index on: list, and click <Add Index>.

  1. Switch to the Create panel, build the collection, then preview it. There is now a Search for words button in the navigation bar. As an example, search for the term "bear" in the descriptions index (which is the only index at this point).