Skip to content

Vocabulary

Vocabulary

Vocabulary

  • In this section we expose the full extent of the possibilities concerning the vocabulary in Maggot.
  • Choosing the type of vocabulary and how to enter it depends entirely on what you put in the terminology definition file. However, some approaches require a little technicality by writing small scripts based on JavaScript, but nothing too serious. You can always take an already ready-made script and modify only the part that concerns your focus.


1 - Vocabulary based on a list of terms fixed in advance (checbox with feature open=0)

  • List of well-chosen and limited Control Vocabulary e.g according to a reference e.g. Data Document Initiative.


2 - Vocabulary open for addition (checkbox with feature open=1)

  • allows you to collect the desired Control Vocabulary (CV) from users. In order to initiate the list, you can put some terms in the predefined terms column of the terminology definition file.


3 - Vocabulary based on a web API in a text field (textbox)

  • The web API is defined in a JavaScript file with the same name as the assigned variable (here cities) and must present under web/js/autocomplete. For example, to enter a French city you can use the API geo.api.gouv.fr. See cities.js


4 - Vocabulary based on a dictionary with multiple selection (multiselect)

  • Dictionaries allow you to record multiple information necessary to define an entity, such as the names of people or even the funders. These information, once entered and saved in a file called a dictionary. Based on a very simple JavaScript retrieving the complete list of items included in the dictionary, thus creating a sort of internal API, we can fill a Maggot field by autocompletion related to a search for these items.
  • The JavaScript file must be named dico.js and be present under web/cvlist/dico/ where dico is the name of the dictionary. See for instance people.js


5 - Vocabulary based on a SKOSMOS Thesaurus with multiple selection (multiselect)

  • SKOSMOS is a web tool facilitating the posting of controlled vocabulary online in the form of a thesaurus according to the SKOS data model. It offers a navigation interface as well as a web API. A simple JavaScript allows you to easily connect this web API with a multiselect field.
  • The JavaScript file must have the same name as the assigned variable (here VOvocab) and must present under web/js/autocomplete. See for instance VOvocab.js.


6 - Vocabulary based on an OntoPortal with multiple selection (multiselect)

  • Portals based on OntoPortal offer the wealth of ontologies according to several domains of application (e.g. BioPortal in the biomedical domain, AgroPortal in the domain of plants).
  • No need of JavaScript file. The Bioportal Autocompletion widget has been implemented into Maggot. You have to only declare the ontology you want to use directly into the terminology definition file in order to easily connect this widget with a multiselect field.