Thesaurus (module for Omeka S)
New versions of this module and support for Omeka S version 3.0 and above are available on GitLab, which seems to respect users and privacy better than the previous repository.
- the skos ontology is included;
- a resource template to build the thesaurus as a list of items (recommended);
- an admin view to manage the tree structure;
- a view helper to display the tree of concepts in the theme, or part of it.
- a block template to display the thesaurus as a tree (via module Block Plus).
The view helper can be used for any purpose, for example to build a hierarchical list of item sets, but this is not the main purpose.
A future version may rely on ISO 25964 (Thesauri and interoperability with other vocabularies).
Uncompress files and rename module folder
Thesaurus. Then install it like any
other Omeka module and follow the config instructions.
See general end user documentation for Installing a module.
This module allows to manage concept as any other items and to use and to manage directly the terms of the ontology skos.
Use of concepts as related items
You can create your own thesaurus (or import it via module such [Bulk Import]).
For that, use the integrated ontology
skos, that contains the classes and the
properties to manage items as concepts.
Then, in your theme, use the various methods of the view helper
in order to display full tree, ascendants, descendants, siblings, etc.
A site block "Thesaurus" is available to include the thesaurus on any page, or a part of it (branch, narrowers, ascendants, descendants, etc.).
A template is added for the simple block of module Block Plus too. Just set
item = id where id is the thesaurus you want to display.
Create a select with the tree, in particular for the module Collecting
To add a select where the user will be able to choose terms, you need to use a
fork of the module Collecting, which commits will be integrated upstream soon.
Then choose a property to fill, the input type "resource item", then the query:
or in php:
'resource_class_id' => [ xxx, ], 'property' => [ [ 'joiner' => 'and', 'property' => 'skos:inScheme', 'type' => 'res', 'text' => yyy, ], ], 'sort_by' => 'thesaurus', 'sort_thesaurus' => yyy,
xxx is the resource class id of
yyy is the
item id of the scheme.
Controller plugin and view helper
The controller or view helper thesaurus() allows to create a thesaurus and to get the whole tree, the tops, any branch, the ascendants, the descendants, etc. It can be used in the theme or anywhere else.
To build a thesaurus, use
$thesaurus = $this->thesaurus($item), where item is
the scheme or any concept. Then, you can get any data for it with the methods.
To get data for any other concept of the thesaurus, set it first. For example,
to get the ascendants for a concept, use
The view helper has the specific method
display() to display the tree, a list,
or anything else via a view template.
- Manage terms as a full resources, separetly from items (like Annotation)? No.
- Manage representation when a term belongs to multiple thesaurus? Probably useless with association.
- Implement a tree iterator in representation, plugin and helper.
- Uninstall vocabulary and resources templates if not used.
Use it at your own risk.
It’s always recommended to backup your files and your databases and to check your archives regularly so you can roll back if needed.
See online issues on the module issues page on GitLab.
In consideration of access to the source code and the rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software’s author, the holder of the economic rights, and the successive licensors only have limited liability.
In this respect, the risks associated with loading, using, modifying and/or developing or reproducing the software by the user are brought to the user’s attention, given its Free Software status, which may make it complicated to use, with the result that its use is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the suitability of the software as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions of security. This Agreement may be freely reproduced and published, provided it is not altered, and that no provisions are either added or removed herefrom.
- Copyright Daniel Berthereau, 2018-2022 (see Daniel-KM on GitLab)