linneo

Extensions

Linneo ships, besides the standard taxonomy, optional extensions for a sector: terms that most applications do not need, packaged as a TaxonomyExtension in the Linneo JAR, each in its own exported package io.github.devbpm.linneo.extension.<sector>, with compile-time constants for its keys.

Extension Class name() Adds Page
Higher education io.github.devbpm.linneo.extension.university.UniversityTaxonomy "university" 33 data categories, 27 data uses, 13 data subjects University

Not applied by default

A shipped extension is never part of the taxonomy unless the application asks for it:

A shipped extension follows the same rules as yours: it adds children of existing terms (a shipped extension may add a new root of data uses where fideslang has none for the sector, as the university extension does) and it only makes protection stricter.

Applying a shipped extension

Apply it on the builder, after the standard terms:

import io.github.devbpm.linneo.Taxonomy;
import io.github.devbpm.linneo.extension.university.UniversityTaxonomy;

Taxonomy taxonomy = Taxonomy.builder().withStandard().extend(new UniversityTaxonomy()).build();

taxonomy.toString() prints Taxonomy[158 data categories, 90 data uses, 34 data subjects], against Taxonomy[125 data categories, 63 data uses, 21 data subjects] for the standard taxonomy. Keep the result and use it everywhere: in the Classifier, the ProcessingChecker and the catalogue exporters. A Classifier built on Taxonomy.standard() reports every key of the extension as UNKNOWN_CATEGORY.

Registering a shipped extension

To have Taxonomy.load() apply a shipped extension, the application registers it with ServiceLoader. How depends on where Linneo is:

The explicit extend call above works in both cases and needs no registration.

Shipped extensions and yours

A shipped extension and your own extensions are applied to the same builder and combine like any two extensions:

See also: University extension · Extending the taxonomy · Standard taxonomy · course: Extending the taxonomy