-
-
Notifications
You must be signed in to change notification settings - Fork 0
TSV Specification
This document provides a complete technical specification of all TSV files used by uml2semantics.
Each TSV controls part of the UML → OWL2 transformation pipeline.
All files must be UTF-8 encoded, tab‑separated, and include headers.
uml2semantics loads the following TSV files:
- Classes.tsv
- Enumerations.tsv (optional)
- EnumerationNamedValues.tsv (optional)
- Datatypes.tsv (optional)
- Attributes.tsv
- AnnotationProperties.tsv (optional)
- Annotations.tsv (optional)
Resolution and validation happen during ontology build; classes, datatypes, and enumerations must exist before attributes and annotations can reference them.
Defines all OWL classes in the model, including inheritance and exclusive choice logic.
| Column | Description |
|---|---|
| Curie | Short IRI prefix plus local name, e.g. iso:Account
|
| Name | Human-readable class label |
| ParentNames | Pipe-separated list of superclasses; empty means owl:Thing
|
| Definition | Optional natural language description |
| ChoiceOf | Pipe-separated list of alternative class tokens or attribute tokens |
| ChoiceSemantics | Allowed values: exclusive, inclusive, or blank |
ChoiceClass ⊑ ChoiceOptionA ⊔ ChoiceOptionB ⊔ ...- If
ChoiceSemantics = exclusive:- The choice class and members are pairwise disjoint (via
owl:AllDisjointClasses)
- The choice class and members are pairwise disjoint (via
- If
ChoiceSemanticsis empty:- No exclusivity constraints are applied
Curie Name ParentNames Definition ChoiceOf ChoiceSemantics
iso:QtyChoice Quantity6Choice Amount ISO pattern FinInstrmQtyChoice|OrigAndCurrQty exclusive
Defines UML attributes mapped to OWL object or datatype properties.
| Column | Description |
|---|---|
| Class | The class owning this attribute |
| Curie | Optional explicit property CURIE |
| Name | Property name; becomes rdfs:label and local name |
| ClassEnumOrPrimitiveType | Range: class, enumeration, or XSD datatype |
| MinMultiplicity | 0, 1, or n |
| MaxMultiplicity | 1, n, or * for unbounded |
| Definition | Optional natural-language description |
These generate owl:DatatypeRestriction:
| Facet Column | Description |
|---|---|
| Pattern | regex string (must be XML Schema compliant) |
| MinLength | minimum string length |
| MaxLength | maximum string length |
| MinInclusive | minimum numeric value |
| MaxInclusive | maximum numeric value |
| MinExclusive | exclusive numeric lower bound |
| MaxExclusive | exclusive numeric upper bound |
| TotalDigits | total digits allowed |
| FractionDigits | decimal fractional digits |
Class Name ClassEnumOrPrimitiveType MinMultiplicity MaxMultiplicity Pattern MinLength MaxLength
Account OwnerId xsd:string 1 1 [A-Z0-9]+ 16 16
Produces:
OwnerId ⊑ DatatypeRestriction( xsd:string xsd:minLength "16"^^xsd:int xsd:maxLength "16"^^xsd:int )
Defines reusable datatype restrictions.
| Column | Description |
|---|---|
| Curie | Named datatype CURIE |
| Name | Human-readable name |
| BaseDatatype | Must be an XSD type (e.g. xsd:string) |
| Definition | Optional description |
Same as in Attributes.tsv.
| Facet Column | Description |
|---|---|
| Pattern | regex string (must be XML Schema compliant) |
| MinLength | minimum string length |
| MaxLength | maximum string length |
| MinInclusive | minimum numeric value |
| MaxInclusive | maximum numeric value |
| MinExclusive | exclusive numeric lower bound |
| MaxExclusive | exclusive numeric upper bound |
| TotalDigits | total digits allowed |
| FractionDigits | decimal fractional digits |
Curie Name BaseDatatype Pattern MinLength MaxLength
iso:LEI LEI20 xsd:string [A-Z0-9]{20} 20 20
Generates:
Datatype: LEI20
EquivalentTo:
xsd:string[pattern "[A-Z0-9]{20}", minLength 20, maxLength 20]
Defines OWL classes whose instances are individuals declared in EnumerationNamedValues.tsv.
| Column | Description |
|---|---|
| Curie | Enumeration class CURIE |
| Name | e.g. CurrencyCode |
| Definition | Optional description |
Defines actual named values.
| Column | Description |
|---|---|
| Enumeration | Must match a class declared in Enumerations.tsv |
| Curie | Individual CURIE |
| Name | Human-readable token |
| Definition | Optional definition |
Enumeration Curie Name Definition
CurrencyCode iso:GBP GBP Pound Sterling
Generates:
Individual: GBP
Types: CurrencyCode
Defines custom annotation properties.
| Column | Description |
|---|---|
| Curie | Annotation property CURIE |
| Name | Label |
| Definition | Description |
Assigns metadata to classes, properties, datatypes, individuals.
| Column | Description |
|---|---|
| TargetCurie | Entity being annotated |
| AnnotationProperty | CURIE of annotation property |
| Value | Literal or IRI |
| Language | Optional language tag |
| Datatype | Optional datatype CURIE |
iso:Account rdfs:label "Account Details" en xsd:string
- Missing or duplicate identifiers (CURIE/Name) for classes, enumerations, datatypes, attributes, and annotation properties raise errors.
- Attribute multiplicities must be non-negative and consistent (min ≤ max).
- Attribute types must resolve to a class, enumeration, named datatype, or
xsd:primitive. - Prefixes used in CURIEs must be declared; missing prefixes are logged as warnings.
- Choice members that do not resolve to a class or attribute are logged as warnings.
Additional constraints (e.g. regex validity, numeric facet ranges) are recommended but are not currently enforced by the converter.
graph TD
C[Classes.tsv] --> A[Attributes.tsv]
C --> E[Enumerations.tsv]
E --> V[EnumerationNamedValues.tsv]
D[Datatypes.tsv] --> A
AP[AnnotationProperties.tsv] --> AN[Annotations.tsv]
A --> OWL[Ontology Output]
Continue to:
- Choice-Patterns for exclusive union modelling
- Datatypes-and-Facets for datatype restriction logic
- CLI-Usage for full command reference
Return to Home.