Skip to content

Function: materializeVocabularyIndexFromSkosDocuments() ​

ts
function materializeVocabularyIndexFromSkosDocuments(documents, options?): MaterializedVocabularyIndex;

Defined in: application/services/core/VocabularyService.ts:188

Build a compact MaterializedVocabularyIndex from SKOS JSON-LD documents. Reads each document's @graph: skos:ConceptScheme entries become schemes, other entries become concepts of their skos:inScheme (or the document's schemeUri). URIs are compacted with generated prefixes and schemes and concepts are sorted by URI.

Parameters ​

ParameterTypeDescription
documentsobject[]SKOS documents; schemeUri and schemeLabel are fallbacks when the graph lacks them.
options?{ generatedAt?: string; }generatedAt overrides the timestamp written to the index.
options.generatedAt?string-

Returns ​

MaterializedVocabularyIndex