-
-
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 processes the following TSV files, in this order:
- Classes.tsv
- Attributes.tsv
- Datatypes.tsv (optional)
- Enumerations.tsv (optional)
- EnumerationNamedValues.tsv (optional)
- AnnotationProperties.tsv (optional)
- Annotations.tsv (optional)
The processing order matters because classes and datatypes 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 classes (for ISO-style choices) |
| ChoiceSemantics | Allowed values: exclusive, inclusive, or blank |
ChoiceClass ⊑ ChoiceOptionA ⊔ ChoiceOptionB ⊔ ...- If
ChoiceSemantics = exclusive:- Each member is disjoint with the choice class
- Members may also be disjoint with one another
- 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
- CURIE prefixes must match prefixes provided by
-poption. - Missing referenced classes or datatypes trigger errors unless
--ignore-missingis supplied. - Facet ranges must be numerically valid.
- Pattern must be a valid XML Schema regular expression.
- XPath-style character classes must be escaped properly.
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.