edi3 / edi3-json-ld-ndr

GNU General Public License v3.0
0 stars 2 forks source link

use SKOS for code lists #66

Open VladimirAlexiev opened 2 years ago

VladimirAlexiev commented 2 years ago

It's a good idea to use SKOS for representing codelists.

Then the example in #65 should be something like this:

uncefact:UNECERec28Code a skos:ConceptScheme.

rec28:Bulk_carrier a skos:Concept;
  skos:inScheme uncefact:UNECERec28Code;
  skos:prefLabel "Bulk carrier";
  skos:definition "Vessel designed to carry bulk cargo.";
  skos:notation "152".

rec28:Dry_bulk_carrier a skos:Concept;
  skos:inScheme uncefact:UNECERec28Code;
  skos:prefLabel "Dry bulk carrier";
  skos:definition "Vessel designed to carry dry bulk (expellers)."
  skos:notation "1521";
  skos:broader rec28:Bulk_carrier.

The current approach is to make a separate class for each codelist. That's compatible with using SKOS (some projects use such a dual approach), although a bit unwieldy.

Then you'd add statements like this:

uncefact:UNECERec28Code a skos:ConceptScheme, rdfs:Class;
  rdfs:subClassOf skos:Concept.

rec28:Bulk_carrier a skos:Concept, uncefact:UNECERec28Code.

rec28:Dry_bulk_carrier a skos:Concept, uncefact:UNECERec28Code.