Een soort uit het domein (een gaswasser, een lozingspunt, een schouw, een ingrediënt) komt in
het model als begrip (dct:type naar een skos:Concept in een codelijst) of als
klasse (een eigen subklasse van een klasse uit de kern, met rdf:type). De toets: heeft
de soort eigen regels, eigen eigenschappen, kardinaliteiten of afleidingen? Dan een klasse.
Anders een begrip. De twee gaan samen: een klasse voor elke soort met eigen regels, een begrip
voor de fijnere soorten daarbinnen. Daarom hangt de inhoud van een codelijst af van het
datamodel: wat als klasse in de ontologie staat, hoort niet meer als begrip in de lijst.
Ontwerp eerst het model, dan de lijst, en onderhoud ze samen.
De kernvocabularia zijn abstract. Een sosa:System, een prov:Entity of een p-plan:Step zegt
niets over het domein; dat is hun kracht, want zo passen ze overal. De businesstaal moet er dus
bij, en daarvoor zijn er twee wegen.
Een begrip volstaat om iets te benoemen, te groeperen of te filteren. Het kost niets in de ontologie: de lijst kan groeien zonder dat het model verandert, en een beheerder buiten het ontologieteam kan ze onderhouden.
Een klasse is nodig zodra de soort iets eigens moet: een emissiepunt heeft een geometrie en kenmerken die een installatie niet heeft, een emissieproces wordt door een emissiepunt uitgevoerd. Zo'n regel hoort op een benoemde klasse, want alleen daar kan een restrictie op staan, en alleen daaruit genereert de validatie een shape.
Het model bepaalt de codelijst. Een model met enkel abstracte klassen heeft een codelijst nodig met alle soorten: installatie, emissiepunt, meetpunt, schouw, huis. Een model met subklassen heeft die soorten niet meer als begrip nodig, enkel de fijnere soorten binnen elke klasse: welk soort emissiepunt, welk soort installatie. Kies dus eerst de klassen; de codelijst volgt. Een codelijst die de klassen herhaalt, zegt hetzelfde twee keer, en de twee lopen uit elkaar.
# klasse: eigen regels
riepr:Emissieproces rdfs:subClassOf riepr:Proces ;
rdfs:subClassOf [ a owl:Restriction ;
owl:onProperty sosa:implementedBy ; owl:someValuesFrom riepr:Emissiepunt ] .
# data: klasse voor de soort met regels, begrip voor de fijnere soort
ex:lozingspunt-LP01 a riepr:Emissiepunt , sosa:System ;
dct:type emissiepunt-type:lozingspunt .
ex:lozing-LP01 a riepr:Emissieproces , riepr:Proces , p-plan:Step ;
sosa:implementedBy ex:lozingspunt-LP01 .
Een abstract model zonder eigen klassen is ook goed, als de soorten geen eigen regels hebben:
ex:boter a prov:Entity ;
dct:type ingredient:butter .
# een regel aan een begrip gehangen: een subklasse in vermomming
[ owl:intersectionOf ( riepr:Proces
[ owl:onProperty dct:type ; owl:hasValue riepr:emissieProcedure ] ) ]
rdfs:subClassOf [ owl:onProperty sosa:implementedBy ; owl:someValuesFrom riepr:Emissiepunt ] .
# en daarvoor een begrip uit de codelijst gekopieerd in de namespace van de ontologie
riepr:emissieProcedure a sosa:Procedure , skos:Concept ;
skos:related <https://data.omgeving.vlaanderen.be/id/concept/riepr/procedure-type/emissie> .
De generator vertaalt een axioma op een anonieme klasse niet: de regel werd nooit gecontroleerd.
# een klasse zonder eigen regels: enkel een andere naam
riepr:ZuiveringsApparaat rdfs:subClassOf riepr:Installatie .
| Signaal | Dan |
|---|---|
een axioma of shape hangt een regel aan een waarde van dct:type |
het begrip wordt een klasse |
| de ontologie kopieert begrippen uit een codelijst om er regels aan te hangen | het begrip wordt een klasse |
| de definitie van een begrip bevat een regel ("emissie via een emissiepunt") | het begrip wordt een klasse |
| een subklasse zonder eigen restricties | de klasse wordt een begrip |
| een codelijst herhaalt de klassen van het model | de begrippen vervallen, of worden fijner |
Het bereik van dct:type is rdfs:Class. Een begrip als waarde wordt daardoor formeel ook
een klasse. De praktijk (OSLO, DCAT-AP) gebruikt toch begrippen, en de validatie meldt geen
tegenspraak. Wie die afleiding wil vermijden, gebruikt een eigen subproperty van dct:type met
bereik skos:Concept. Nooit een tekst: dct:type "Overstortmeter" is geen type. Beperk in een
profiel de waarde met owl:allValuesFrom skos:Concept; welke codelijst kan de gegenereerde SHACL
niet zeggen, dus noteer dat in een commentaar.
Een begrip als waarde van een rol is geen typering. Een CSOR-parameteraspect als
sosa:observedProperty is de eigenschap zelf, een individu
(Codelijsten en registers).
riepr:Proces, met de
regel welk systeem ze uitvoert; installatie- en emissiepunttypes als begrip. De ontvangen
ontologie hing die regels aan begrippen.wk:Emissie en wk:Staal als klassen met
eigen restricties; emissietype en matrix met dct:type.Codelijsten en registers · Ontologie en toepassingsprofiel · R15
R18 — Type with a concept or with a class — uit guide/linked-data.md, kit 0.3.12
The core vocabularies are abstract: a sosa:System, a prov:Entity or a p-plan:Step says
nothing about the domain. The domain's own kinds (an air scrubber, a discharge point, a manhole, an
ingredient) enter the model in one of two ways:
dct:type to a skos:Concept in
a code list;rdfs:subClassOf), used with rdf:type.The test: does the kind have rules of its own? Make it a class when it has properties, cardinalities, value restrictions or inferences of its own: something that holds for its members and not for the other members of the general class. Otherwise make it a concept. A kind that only names, groups or filters is a concept.
The two combine. A class for each kind with rules of its own, and a concept for the finer kinds within it:
riepr:Emissiepunt rdfs:subClassOf sosa:System ; # own restrictions: geometry, properties, …
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty dct:type ; owl:allValuesFrom skos:Concept ] .
riepr:Emissieproces rdfs:subClassOf riepr:Proces ; # own rule: which kind of system runs it
rdfs:subClassOf [ a owl:Restriction ;
owl:onProperty sosa:implementedBy ; owl:someValuesFrom riepr:Emissiepunt ] .
ex:lozingspunt-LP01 a riepr:Emissiepunt , sosa:System ;
dct:type emissiepunt-type:lozingspunt . # finer kind, no rules of its own
ex:lozing-LP01 a riepr:Emissieproces , riepr:Proces , p-plan:Step ;
sosa:implementedBy ex:lozingspunt-LP01 .
The model decides the code list. A model with only abstract classes needs a code list with every kind (installation, emission point, measuring point, …). A model with subclasses no longer needs those kinds as concepts, only the finer ones within each class. Decide the classes first; the code list follows. A code list that repeats the classes says the same thing twice, and the two drift apart.
Signs that a concept should be a class:
dct:type (owl:hasValue inside an
owl:intersectionOf, a SHACL target on a value). That is a subclass in disguise. The generator
of ld-mcp does not translate an axiom on an anonymous class, so the rule goes unchecked; as a
restriction on a named subclass it becomes a shape;:emissieProcedure a sosa:Procedure, skos:Concept ; skos:related <concept in the code list>);Signs that a class should be a concept: a subclass without restrictions of its own, which only
renames (riepr:ZuiveringsApparaat beside riepr:Installatie: an air scrubber has no rules that
another installation lacks).
dct:type and its range. DCTERMS gives dct:type the range rdfs:Class, so a concept as its
value is formally also a class. Practice (OSLO, DCAT-AP) uses concepts all the same, and validation
reports no inconsistency. A profile that wants to avoid the inference uses a subproperty of
dct:type of its own with range skos:Concept. Never a literal: dct:type "Overflow meter" is
not a type. In a profile, restrict the value with owl:allValuesFrom skos:Concept; the generated
SHACL cannot say which code list, so document the scheme in a comment.
Not a type. A concept as the value of a role is not a typing: a csor:ParameterAspect as
sosa:observedProperty is the property itself, an individual. A class whose members are concepts
with rules of their own (csor:ParameterAspect ⊂ sosa:Property, riepr:Rubriek ⊂ skos:Concept,
with a required skos:notation) follows the same test.
In OSLOthema-SSNSOSA-VL: riepr/ (kinds of process as subclasses, installation and emission point
types as concepts), waterkwaliteit/ (wk:Emissie as a class, emission type and matrix with
dct:type), Nigella-Lawson-Brownies/ (an abstract model, every ingredient a concept).