Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Codelist Profile

Resources:

A CDIF codelist is a controlled vocabulary or classification scheme represented as a SKOS ConceptScheme serialized in JSON-LD. The profile composes the base SKOS ConceptScheme and Concept building blocks with CDIF-specific constraints: resolvable identifiers, required definitions, bidirectional hierarchy, and the mandatory CDIF Core metadata properties. It aligns with the approach described in ‘Modelling of Eurostat’s Statistical Classifications in ShowVoc’.

All property names use namespace prefixes declared in the @context:

"@context": {
  "skos": "http://www.w3.org/2004/02/skos/core#",
  "schema": "http://schema.org/",
  "dcterms": "http://purl.org/dc/terms/"
}

Additional prefixes may be added for concept URIs (e.g. "sf": "https://w3id.org/isample/vocabulary/sampledfeature/").

Graphical presentation of Codelist profile

Codelist concept scheme

The root object representing the controlled vocabulary or classification scheme, typed as skos:ConceptScheme. It carries the scheme-level properties below together with the mandatory CDIF Core metadata.

@id

@type

skos:prefLabel

skos:hasTopConcept

schema:identifier

schema:dateModified

schema:license / schema:conditionsOfAccess

Optional scheme properties

Codelist concept

A skos:Concept with CDIF constraints, representing a single term or category within the scheme.

@id

@type

skos:prefLabel

skos:inScheme

skos:definition

skos:broader

skos:narrower

skos:notation

Data types

This profile uses the shared LanguageTaggedValue, object reference, and PropertyValue patterns defined on the Common data types page.

Bidirectional hierarchy

CDIF codelists require concept hierarchies to be expressed in both directions:

Any concept that appears as a value of skos:narrower must also declare skos:broader pointing back to its parent. Top concepts (those in skos:hasTopConcept) must not have skos:broader within the scheme.

{
  "@id": "sf:anysampledfeature",
  "@type": ["skos:Concept"],
  "skos:prefLabel": "Any sampled feature",
  "skos:definition": "Top concept",
  "skos:inScheme": {"@id": "sf:sampledfeaturevocabulary"},
  "skos:narrower": [
    {
      "@id": "sf:earthmaterial",
      "@type": ["skos:Concept"],
      "skos:prefLabel": "Natural Solid Material",
      "skos:definition": "A naturally occurring solid material.",
      "skos:inScheme": {"@id": "sf:sampledfeaturevocabulary"},
      "skos:broader": [{"@id": "sf:anysampledfeature"}]
    }
  ]
}

Array convention

Unlike other CDIF profiles, the Codelist profile does not require repeatable properties to always be serialized as arrays. This follows standard SKOS practice, which allows either a single string or an array for literal values. Both of these are valid:

"skos:prefLabel": "Material"
"skos:prefLabel": [
  {"@value": "Material", "@language": "en"},
  {"@value": "Matériau", "@language": "fr"}
]

Consumers of CDIF codelist documents should test whether a value is a string or an array before iterating.

Validation