You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2f7246d
Browse filesBrowse the repository at this point in the historyBrowse files
* Dimension ↔ Quantity: Each quantity has exactly one dimension, but multiple quantities can share the same dimension
64
+
62
65
* Quantity ↔ Unit: Each quantity can be measured by multiple units, and each unit can measure multiple quantities (many-to-many relationship)
66
+
63
67
* Unit ↔ Dimension: Each unit has exactly one dimension, which must match the dimension of the quantities it measures
68
+
64
69
* Prefix ↔ Unit: Prefixes can be applied to units to create new prefixed units
70
+
65
71
* UnitSystem ↔ Unit: Each unit belongs to a specific unit system
66
72
67
73
These relationships are implemented through cross-references between the different YAML files.
@@ -70,42 +76,40 @@ These relationships are implemented through cross-references between the differe
70
76
71
77
UnitsDB uses a consistent cross-reference mechanism to link entities across different files:
72
78
73
-
* References to dimensions use the format `#NISTdX` (e.g., `#NISTd1` for length)
74
-
* References to quantities use the format `#NISTqX` (e.g., `#NISTq1` for length)
75
-
* References to units use the format `#NISTuX` (e.g., `#NISTu1` for meter)
76
-
* References to prefixes use the format `#NISTpX_Y` (e.g., `#NISTp10_3` for kilo)
79
+
* References to dimensions use the format `#NISTdX` (e.g., `#NISTd1` for length).
80
+
* References to quantities use the format `#NISTqX` (e.g., `#NISTq1` for length).
81
+
* References to units use the format `#NISTuX` (e.g., `#NISTu1` for meter).
82
+
* References to prefixes use the format `#NISTpX_Y` (e.g., `#NISTp10_3` for kilo).
77
83
78
-
These cross-references create a web of relationships that maintain the integrity and coherence of the measurement system.
84
+
These cross-references create a web of relationships that maintain the integrity
85
+
and coherence of the measurement system.
79
86
80
-
=== Lutaml-model language
87
+
=== Information models
81
88
82
-
UnitsDB uses the lutaml-model language to define the structure of each data model. The lutaml-model language provides a human-readable way to define class-like structures with attributes and relationships.
89
+
UnitsDB defines five primary classes.
83
90
84
-
The general pattern for a lutaml-model class definition is:
91
+
`Dimension`::
92
+
Represents the mathematical concept of a physical dimension
85
93
86
-
[source,lutaml]
87
-
----
88
-
class ClassName {
89
-
attribute attributeName, AttributeType {
90
-
definition "Description of the attribute"
91
-
}
92
-
// Additional attributes...
93
-
}
94
-
----
94
+
`Quantity`::
95
+
Represents a measurable property with a specific dimension
96
+
97
+
`Unit`::
98
+
Represents a reference for measuring quantities
95
99
96
-
UnitsDB defines five primary classes using lutaml-model:
100
+
`Prefix`::
101
+
Represents a multiplier for units
97
102
98
-
* `Dimension`: Represents the mathematical concept of a physical dimension
99
-
* `Quantity`: Represents a measurable property with a specific dimension
100
-
* `Unit`: Represents a reference for measuring quantities
101
-
* `Prefix`: Represents a multiplier for units
102
-
* `UnitSystem`: Represents a system of units (e.g., SI, non-SI)
103
+
`UnitSystem`::
104
+
Represents a system of units (e.g., SI, non-SI)
103
105
104
-
Each class definition specifies the attributes that should be present in the corresponding YAML files.
106
+
Each class definition specifies the attributes that should be present in the
107
+
corresponding YAML files.
105
108
106
109
=== Inheritance hierarchies
107
110
108
-
UnitsDB does not use formal inheritance hierarchies, but it does establish conceptual hierarchies through relationships:
111
+
UnitsDB does not use formal inheritance hierarchies, but it does establish
112
+
conceptual hierarchies through relationships:
109
113
110
114
* Base dimensions vs. derived dimensions: Derived dimensions are composed of combinations of base dimensions
111
115
* Base quantities vs. derived quantities: Derived quantities reference dimensions that are combinations of base dimensions
@@ -127,7 +131,10 @@ These extension points allow UnitsDB to evolve while maintaining backward compat
127
131
128
132
=== Model mapping to YAML
129
133
130
-
The lutaml-model class definitions are mapped to YAML structures in the database files. For example, the `Unit` class defined in lutaml-model:
134
+
The lutaml-model class definitions are mapped to YAML structures in the database
135
+
files.
136
+
137
+
For example, the `Unit` class defined in lutaml-model:
0 commit comments