Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Task Description

This document describes how you can add a dynamic term list that can be used in a Cataloging, Procedure, or Authority Term record.

Prerequisites

This work requires knowledge of how to:

  • Make new directories, copy files, and perform similar tasks in your operating system.
  • Run commands at your operating system's command prompt.
  • Edit XML files.

In addition, if you have not already done so:

  • Create a tenant for your museum. (A tenant is a space or partition on a CollectionSpace system for your museum or collection, within which you'll make most or all of your configuration changes.)

Layers involved

To carry out this task, you will need to make changes in the following CollectionSpace layer(s):

  • Application

In addition, you will need to run a single command in the following CollectionSpace layer:

  • Services

Procedure

Application layer

Find your tenant folder in the Application layer

 Click here to read these instructions (included in many documents on this site) ...
Unknown macro: {multi-excerpt-include}

(Or instead see Finding your tenant folder.)

Find or create the relevant configuration file within your tenant folder

Dynamic term lists are added in the domain-instance-vocabularies.xml file at the root of your Application layer tenant folder.  (This is the same location as your tenant's settings.xml file.)  If this file does not exist, create a new, empty text file in that folder with that name.

Edit that file to add your new dynamic term list

  • If this is the first dynamic term list you are adding to domain-instance-vocabularies.xml, then add <instances> and </instances> to the top and bottom of the file.
  • The markup to create a dynamic term list requires a instance element:

<instance id="vocab-{brief vocabulary name}">
	<web-url>{brief vocabulary name}</web-url>
	<title-ref>{brief vocabulary name}</title-ref>
	<title>{display name of vocabulary}</title>
	<options>
		<option id="{brief term identifier}">{term meaning}</option>
		<option id="{brief term identifier}">{term meaning}</option>
		<option id="{brief term identifier}">{term meaning}</option>
		....
	</options>
</instance>

The 'brief vocabulary name' is the identifier used when you use the field in the Many dynamic term lists can be created in the domain-instance-vocabularies.xml file, each in their own <instance> ... </instance> block.

Example of a complete domain-instance-vocabularies.xml file

<!-- The wrapper tag -->
<instances>

<!-- Each dynamic term list is contained in an 'instance' block -->
    <instance id="vocab-approvalState">
        <web-url>approvalState</web-url>
        <title-ref>approvalState</title-ref>
        <title>Approval States</title>
        <options>
            <option id="yes">Yes</option>
            <option id="no">No</option>
            <option id="pending">Pending</option>
            <option id="notrequired">Not Required</option>
        </options>
    </instance>

<!-- Another dynamic term list can follow -->
    <instance id="vocab-exitMethod">
        <web-url>exitMethod</web-url>
        <title-ref>exitMethod</title-ref>
        <title>Exit Method</title>
        <options>
            <option id="courier">Courier</option>
            <option id="inperson">In Person</option>
            <option id="post">Post</option>
        </options>
    </instance>

</instances> 

The domain-instance-vocabularies.xml file is automatically processed when the application layer and service layers are built.  The file in your tenant directory will override the file with the same name in the defaults directory (which is typically a file no dynamic term list definitions.

Build the Application layer

 Click here to read these instructions (included in many documents on this site) ...
Unknown macro: {multi-excerpt-include}

(Or instead see Configuring CollectionSpace's Application Layer - An Overview.)

Services layer

Run a command to generate Services artifacts for your extension schema

Unknown macro: {multi-excerpt-include}

Test

After following the procedure above, use a web browser for the following steps:

  • First, clear your Web browser's caches.
  • If you are not already logged into your museum (tenant) on your CollectionSpace system:
  • Navigate to the Administration page
  • Select the Term List Management tab
  • Find the brief vocabulary name in the Term List Name table
  • Select the brief vocabulary name
  • Add term values to the repeating "Terms (Values)" table
  • Save the term list details

If it doesn't work

Expand as needed on the following bullet points, which are currently just telegraphic reminders:

....

 

  • No labels