-
-
Notifications
You must be signed in to change notification settings - Fork 0
Enumerations
This document provides a comprehensive explanation of enumeration classes, enumeration individuals, and how uml2semantics models ISO-style code lists (e.g. ISO 4217 currency codes) using OWL 2 constructs.
Enumerations are fundamental when modelling controlled vocabularies, regulated identifiers, or closed sets of named values.
uml2semantics uses two TSV files to define enumeration structures:
- Enumerations.tsv – declares enumeration classes
- EnumerationNamedValues.tsv – declares enumeration individuals
This separation mirrors ISO 20022’s separation between:
- the enumeration class (e.g., “CurrencyCode”) and
- its values (e.g., GBP, EUR, JPY)
An enumeration class is a standard OWL class representing the “type” of a controlled vocabulary.
| Column | Description |
|---|---|
| Curie | CURIE for the enumeration class, e.g. iso:CurrencyCode
|
| Name | Human-readable class name |
| Definition | Optional natural language definition |
Curie Name Definition
iso:CurrencyCode CurrencyCode ISO 4217 currency codes
Class: CurrencyCode
Annotations:
rdfs:label "CurrencyCode"
This class acts as the domain for all enumeration individuals.
Defines the actual values belonging to the enumeration class.
| Column | Description |
|---|---|
| Enumeration | Name of enumeration class (must match Enumerations.tsv “Name” or CURIE local part) |
| Curie | CURIE of the individual value |
| Name | Human-readable label, typically code value |
| Definition | Optional text |
Enumeration Curie Name Definition
CurrencyCode iso:GBP GBP Pound Sterling
CurrencyCode iso:EUR EUR Euro
CurrencyCode iso:JPY JPY Japanese Yen
Individual: GBP
Types: CurrencyCode
Annotations:
rdfs:label "GBP"
Curie Name Definition
iso:CurrencyCode CurrencyCode ISO 4217 currency codes
Enumeration Curie Name Definition
CurrencyCode iso:GBP GBP Pound Sterling
CurrencyCode iso:EUR EUR Euro
CurrencyCode iso:USD USD US Dollar
CurrencyCode iso:JPY JPY Japanese Yen
CurrencyCode iso:CHF CHF Swiss Franc
Class: CurrencyCode
Individual: GBP
Types: CurrencyCode
Individual: EUR
Types: CurrencyCode
Individual: USD
Types: CurrencyCode
Individual: JPY
Types: CurrencyCode
Individual: CHF
Types: CurrencyCode
iso:GBP a iso:CurrencyCode ;
rdfs:label "GBP" ;
skos:prefLabel "Pound Sterling"@en .
iso:EUR a iso:CurrencyCode ;
rdfs:label "EUR" ;
skos:prefLabel "Euro"@en .
Enumerations modelled in TSV become OWL:
- enumeration class →
owl:Class - enumeration entries →
owl:NamedIndividual - each individual has a
rdf:typerelationship to the enumeration class
The generator does not automatically create:
-
owl:oneOfaxioms - closed class restrictions
- disjointness between individuals
These can be added manually via additional TSV columns in future extensions.
Enumerations may be used as attribute ranges in Attributes.tsv.
Class Name ClassEnumOrPrimitiveType MinMultiplicity MaxMultiplicity
Account Ccy CurrencyCode 1 1
DataProperty: Ccy
Range: CurrencyCode
Any individual of type CurrencyCode is valid.
graph TD
E[Enumerations.tsv] --> EC[Enumeration Class]
V[EnumerationNamedValues.tsv] --> EV[Enumeration Values]
EC --> OWL[OWL Ontology]
EV --> OWL
- Use enumeration classes for any controlled vocabulary.
- Use clear, uppercase code values (GBP, EUR, JPY).
- Provide definitions where possible.
- Use annotation properties such as
skos:prefLabelfor human-friendly labels. - Keep enumeration TSVs alphabetised for stability.
- Use CURIEs consistently (
iso:GBP, not bareGBP).
- Return to TSV-Specification
- Continue to Datatypes-and-Facets
- Continue to Annotations
- Back to Home