-
Notifications
You must be signed in to change notification settings - Fork 1
Home
(See initial modeling discussion here)
We are basically going to implement the following conversion approach. See at the end for remaining questions.
An instance of the Unit
class captures one main unit entry in the XML. It may have a primary name (via property hasName
) and zero or more aliases (via hasAlias
property).
Instances of the UnitName
class capture names and aliases associated with instances of a class Unit
.
This is a functional property to capture the <def>
element from the XML description.
This is a functional property that indicates the primary name of a given Unit
instance. In particular, a unit may not have a primary name.
Indicates an alternate name for a given Unit
instance. A unit can have zero or more aliases associated.
Indicates a symbol associated with a given Unit
instance. A unit can have zero or more symbols associated.
With UnitName
as domain, this functional property indicates the Unit
instance associated with the name.
With UnitName
as domain, this functional property indicates whether the name is "singular"
or "plural"
.
Remarks:
- The approach clearly separates the concept of unit from any associated specific names/aliases.
- Those names/aliases will have URIs per se (so they could be self-resolvable)
- The
hasSymbol
property could also be used as a property ofUnitName
in cases where the symbol is for the specific name.
The following entry from the original vocabulary:
<unit>
<def>'/60</def>
<name><singular>arc_second</singular></name>
<symbol>"</symbol>
<symbol>″</symbol> <!-- DOUBLE PRIME -->
<aliases>
<name><singular>angular_second</singular></name>
<name><singular>arcsecond</singular></name>
<name><singular>arcsec</singular></name>
</aliases>
</unit>
will result in the RDF representation:
@prefix : <http://mmisw.org/ont/mmitest/udunits2-accepted/> .
@prefix prop: <http://mmisw.org/ont/mmitest/udunits2-prop/> .
:2a1369
a :Unit ;
prop:hasDefinition "'/60" ;
prop:hasName "arc_second" ;
prop:hasAlias :arcsec, :angular_second, :arcsecond ;
prop:hasSymbol "\"", "″" ;
:arc_second
a :UnitName ;
prop:namesUnit :2a1369;
prop:hasCardinality "singular";
:arcsec
a :UnitName ;
prop:namesUnit :2a1369;
prop:hasCardinality "singular";
:angular_second
a :UnitName ;
prop:namesUnit :2a1369;
prop:hasCardinality "singular";
:arcsecond
a :UnitName ;
prop:namesUnit :2a1369;
prop:hasCardinality "singular";
Remaining questions to proceed with implementation:
- Assuming both
Unit
andUnitName
instance URIs will share the same namespace, how to determine the id for eachUnit
instance in a way that is "stable", that is, that will be preserved even upon multiple conversions as the original vocabularies are updated?
Possible strategy:
- Unless so manual ID assignment is desired, we could apply some arbitrary but deterministic translation of the given primary name.
Any other questions?