Skip to content

Collections

Marten edited this page Sep 17, 2015 · 3 revisions

Table of Contents

What are Collections

Support for collections begins at version 1.2. This is an experimental functionality, open to enhancement and comment!

Collections are groups of records that belong to a particular group, designated after they are published to the geoportal. They leverage the Dublin Core 'isPartof' element, such that a CSW query for records can retrieve a record that 'isPartof' a certain collection.

A collection can be any kind of subjective grouping. Records are added to a collection after they are published to the geoportal through the Administration page (see Add records to a Collection).

Collections and their associated records are defined in two new tables in the Geoportal database: GPT_COLLECTION and GPT_COLLECTION_MEMBER. If you have not enabled collections in your geoportal, these tables will remain empty. It is possible to upgrade to version 1.2 of the Geoportal Server and use the same 1.x database, but you will get an error if you enable collections in that case because the 1.x database does not have the tables to support collections. The tables can be added in manually - see Upgrade 1.x to 1.2 database for instructions.

Enable Collections

To enable the collections feature, open the gpt.xml file and set the key="catalog.useCollections" parameter to "true". Then save the gpt.xml file and restart your geoportal web application. This turns on the collections capability in your geoportal web application.

IMPORTANT: There is a setting in the gpt.xml file called key="lucene.force.isPartOf". This setting can be enabled if search results should always be part of one designated collection. This is a rare scenario; most organizations would leave collections disabled if they only want to support one group. It is recommended to leave this setting as default (empty) in the gpt.xml file.

How to create a Collection

Creating collections is done through directly editing the geoportal database. Once collections are created, records can be added to the collection through the geoportal web application user interface. To create a collection, you can use database management tools - such as SQL Server Management Studio or PgAdmin - to edit the database, or you can edit directly through SQL queries. You must connect to the GPT_COLLECTION table, and add new records for each collection you want to define. For example, if I want to add three collections called 'ocean', 'geology', and 'population', I would provide a value for the COLUUID and a shortname for each collection. The COLUUID can be any UUID you want, as long as its unique to your GPT_COLLECTION table.

Add records to a Collection

Once you've enabled collections in your gpt.xml file and you've added the collections you want to your GPT_COLLECTION table, you are ready to add records to the collections you've defined. IMPORTANT: Only geoportal administrator users can add records to collections. This is an administrative functionality only at version 1.2.

Login to your geoportal web application as an administrator, and click the Administration tab. Assuming that you already have records published to the geoportal, you should see records in the table on this page. Select the records you want to add to your first collection group by checking the box next to the records. Then, select the "Share With" option from the "For Selected Records" dropdown. Another field will appear, showing a dropdown with the list of available collections as defined in the GPT_COLLECTION table in the geoportal database. Select the desired collection, and click Execute. The records will be added to your collection.

It is possible for a record to belong to more than one collection; just repeat this workflow and add the record to a different collection as well.

If you want to take those records out of the collection, select them again and then choose the "Don't Share With" option from the "For Selected Records" dropdown.

To see which records belong to a collection, hover your mouse over the records 'Status' in the table.

If you were to open your geoportal database and look at the GPT_COLLECTION_MEMBER table, you would see the records now added to this table with the associated collection in the 'COLUUID' column.

See Records that belong to a Collection on the Administration page

If you want to get a list of which records belong to which collections from the Manage page, there is a filter on the page called 'isPartOf'. If you click this dropdown, you can select the collection for which you want to see member records. Select the collection of interest and then click the "is Part of" button to filter the records on the Manage page by collection.

Search for records from a Collection on the Search page

The isPartOf Dublin Core element is also a new lucene index. This means that users can define searches on the geoportal Search page using the isPartof index to limit their results to those of a particular collection. For example, if a collection with the shortname of 'ocean' is defined, searching on the search page for isPartOf:ocean will retrieve all records that belong to the ocean collection.


Back to Customizations
Clone this wiki locally