Collection Relationships

Collection Relationships

Collection relationships in Specify allow specimens to be associated with either specimens in another collection or with a taxonomic name in another collection. Some examples of these types of relationships are tissue and voucher, plant and pollinator and host parasite, etc. Specify allows collection objects in two different collections to be related to one another for the purpose of documenting these types of relationships. The collections may be in different disciplines, but are required to use the same catalog number format.

Collection relationships require that one collection be the ‘Source’ and the other the ‘Destination’. In a single relationship, a source may have many destinations, but a destination may only have one source. This is important to remember when choosing which collection will be the source and which will be the destination. For instance, if a bee pollinates several flowers the bee collection would be the source and the flowers would be the destination.

Collection relationships can either associate two collection objects (cataloged specimens) or a collection object from a source collection with a taxonomic name in a destination collection. A relationship that associates two collection objects is called an Object Relationship and a relationship that associates a collection object with a taxonomic name is called a Host Taxon ID.

On a database level, the Collection Object Relationship sides are:

Source: Left Side
Destination: Right Side

Two steps are required to create collection relationships:

  1. The relationship must be configured and named using the Collection Relationship tool in Specify
  2. Forms must be edited to include controls which allow the source collection object to be associated with the destination collection object or taxonomic name. Members may contact Specify at support@specifysoftware.org to request forms that include either of these relationships.

Specify 6


:linkout_: Consider evaluating Projects as another means of relating a group of objects together when working on a project.

The collection relationship tool is only available to users at the system administrator level.

Configure Collection Relationships

To open the collection relationship tool choose System > Configure Collection Relationships.

cr_open

Existing Collection Relationships

If collection relationships exists within any of the collections in the institution, the first window will display those existing relationships. Existing relationships can be edited or added using available buttons.

Select the edit (Edit) button to edit a relationship.

Select the delete (Delete) button to delete a relationship.

Note: Collection relationships with associated collection objects may not be deleted. To delete a collection relationship all collection object associations must first be removed.

Select the add (Add) button to create a collection relationship.

cr_wiz_1

Choose a Source Collection

  1. Choose a source collection from the list of collections in the current discipline and click the Next button. The collections available are limited to those that you have permission to access.

  2. Note: If a collection relationship exists for the current collection the first dialog will list the collection relationships. Either choose a current collection relationship to edit or click the add (Add) button to add a new collection relationship.

    cr_wiz_2

Choose a Destination Collection

  1. Choose a destination collection from the list of acceptable collections in Specify. Associations may not exist between collections with different catalog number formats. The collections available are limited to those that you have permission to access and use the same catalog number format as the source collection.
  2. cr_wiz_3

Name the Collection Relationship

  1. Name the Collection Relationship. The remarks field is available for describing the relationship, which can be valuable information for colleagues or future users.

Associating Collection Objects using a Collection Object Form

The default forms in Specify must be edited to include fields for creating relationships.

Two relationship fields are available to add to forms:

  • Object Relationship
  • Host Taxon ID

Object Relationship

An object relationship associates a collection object in a source collection with a collection object in a destination collection. The object relationship field is added to the collection object form.

one_relationship_screen

One Source associated with One Destination

Click on the search button and type in a catalog number from the destination collection. Specify will search the destination collection and show results in the dialog. Choose the correct value from the list to complete the relationship.

One Source associated with Many Destinations

Click on the searchadd (Search and Add) button and type in a catalog number from the destination collection. Specify will search the destination collection and show results in the dialog. Choose the correct value from the list to add the relationship to the list.

Select the remove_20 (Remove) button to remove a relationship from the list.

Host Taxon ID

A host taxon id associates a collection object with a taxonomic name in a destination collection. It is not necessary for the destination collection to include cataloged specimens. The host taxon ID field is added to the collecting event attribute form.

host_id

Host Taxon ID Field on a Collecting Event Attribute Form

Select the edit button to edit a relationship.

Select the add (Add) button and type the first few letters of a taxonomic name. A drop-down list of taxonomic names from the destination collection will display to choose from.

Simply click on the search button and type in all or part of a taxonomic name. Specify will search the destination collection and show results in the dialog. Choose the correct name from the list to create the relationship.

Specify 7


Important Note: Currently, you must define a CollectionRelType view in your form definition to establish this in 7. You can expand the form definitions section to copy and paste the views used in this tutorial into your user’s form definition.

Form definitions:

Views:

        <view name="CollectionRelType"
            class="edu.ku.brc.specify.datamodel.CollectionRelType"
            resourcelabels="false">
            <desc><![CDATA[The CollectionRelType Form.]]></desc>
            <altviews>
                <altview name="CollectionRelType View" viewdef="CollectionRelType" mode="view" validated="false" default="true"/>                
                <altview name="CollectionRelType Edit" viewdef="CollectionRelType" mode="edit" validated="true"/>                
            </altviews>
        </view>

Viewdef:

        <viewdef>
            type="form"
            name="CollectionRelType"
            class="edu.ku.brc.specify.datamodel.CollectionRelType"
            gettable="edu.ku.brc.af.ui.forms.DataGetterForObj"
            settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
            <desc><![CDATA[The Journal form - unknown use in schema]]></desc>

            <columnDef>100px,2px,195px,5px,86px,2px,210px,5px,74px,2px,146px,15px,p:g</columnDef>
            <columnDef os="lnx">115px,2px,195px,5px,125px,2px,210px,5px,125px,2px,131px,15px,p:g</columnDef>
            <columnDef os="mac">130px,2px,215px,5px,138px,2px,260px,5px,138px,2px,155px,15px,p:g</columnDef>
            <columnDef os="exp">p,2px,min(p;220px),5px:g,p,2px,p,5px:g,p,2px,200px,p,p:g</columnDef>
            <rowDef auto="true" cell="p" sep="2dlu"/>

            <rows>
                <row>
                    <cell type="label" labelfor="1"/>
                    <cell type="field" id="1" name="name" uitype="text"/>
                    <cell type="label" labelfor="2"/>
                    <cell type="field" id="2" name="remarks" uitype="text"/>
                </row>
                <row>
                    <cell type="label" labelfor="4"/>
                    <cell type="field" id="4" name="leftSideCollection" uitype="querycbx" initialize="name=CollectionRelationship" isrequired="true" colspan="6"/>
                </row>
                <row>
                    <cell type="label" labelfor="5"/>
                    <cell type="field" id="5" name="rightSideCollection" uitype="querycbx" initialize="name=CollectionRelationship" isrequired="true" colspan="6"/>
                </row>
            </rows>
        </viewdef>

Step 1: Create a new Collection Relationship Type

You can do this by appending the following to your database’s URL:

/specify/view/collectionreltype/new/

You need to give your new relationship a name (which will be used later) and select both the “left side” (source) collection and “right side” (destination) collection.

Step 2: Add the relationship to your CO form.

In this instance, you can see that the relname= attribute is followed by the name we established in Step 1. In this case, relname=“VoucherToTissue”.

<row>
    <cell type="field" id="colrel" uitype="plugin" name="this" initialize="name=CollectionRelOneToManyPlugin;relname=VoucherToTissue;" colspan="9"/>
</row>

Step 3: View the updated form and create a connection! You just need to press the “+” button on the new Collection Relationship view. You can then search for the catalog number of the related CO record.