-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyarrrml.yml
More file actions
200 lines (184 loc) · 6.93 KB
/
Copy pathyarrrml.yml
File metadata and controls
200 lines (184 loc) · 6.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
---
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
prefixes:
spo: "https://w3id.org/steel/ProcessOntology/"
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
dc: "http://purl.org/dc/elements/1.1/"
dcterms: "http://purl.org/dc/terms/"
skos: "http://www.w3.org/2004/02/skos/core#"
owl: "http://www.w3.org/2002/07/owl#"
grel: "http://users.ugent.be/~bjdmeest/function/grel.ttl#"
xsd: "http://www.w3.org/2001/XMLSchema#"
emmo: "http://emmo.info/emmo#"
pmdco: "https://material-digital.de/pmdco/"
foaf: "http://xmlns.com/foaf/0.1/"
base: "https://w3id.org/steel/ProcessOntology/"
mappings:
###
# generating ontology metadata
###
ontologyMetadata:
sources:
- ['csv/OntologyMetadata.csv~csv']
# subject: "spo:"
subject:
# remove trailing slash "/" from ontology prefix IRI
function: "grel:string_chomp"
parameters:
- parameter: "grel:valueParameter"
value:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#expandPrefix"
parameters:
- ["grel:valueParameter", "spo:"]
- ["grel:p_string_sep", "/"]
po:
- ["a", "owl:Ontology"]
- [ ["rdfs:label", "skos:prefLabel"], "$(title-EN)", "en~lang"]
- ["dc:description", "$(description-EN)", "en~lang"]
- ["owl:versionInfo", "$(version-EN)", "en~lang"]
- ["dcterms:created", "$(created)"]
- ["dcterms:license", "$(license)~iri"]
- ["dcterms:rights", "$(copyright)"]
- ["dcterms:date", "$(xlsx2owl_datetime)"]
- p: "foaf:depiction"
o:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#expandPrefix"
parameters:
- ["grel:valueParameter", "$(depiction)"]
- p: "dcterms:contributor"
o:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#split"
parameters:
- ["grel:valueParameter", "$(contributor)"]
- ["grel:p_string_sep", ";"]
###
# mappings for the **Classes** sheet
###
classes:
sources:
- ['csv/Classes.csv~csv']
## **TODO:** add filter for only limited character list as subject
## **TODO:** we probably want to change 'spo' prefix to something like 'target' or use base prefix
subject: "spo:$(id)"
### we need some handling for ids with other prefixes, but get NullPointer exception here
condition:
# function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#boolean_not"
# parameters:
# - parameter: "grel:param_b"
# value:
# function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#boolean_not"
# parameters:
# - parameter: "grel:param_b"
# value:
#function: "grel:string_contains"
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#notContains"
parameters:
- [grel:valueParameter, "$(id)"]
- [grel:string_sub, "\:"]
po:
## simple direct mappings:
- ["a", "owl:Class"]
- ["rdfs:label", $(label-EN), "en~lang"]
- ["rdfs:label", $(label-DE), "de~lang"]
- ["skos:preflabel", $(label-EN), "en~lang"]
- ["skos:preflabel", $(label-DE), "de~lang"]
- ["rdfs:comment", $(description-EN), "en~lang"] # JOD prefers rdfs:comment instead of dc:description
## mappings for maybe semicolon/comma separated values
- p: "skos:altlabel"
o:
# function: "grel:string_split" ## throws NullPointerExceptions for every missing value
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#split"
parameters:
- ["grel:valueParameter", "$(synonyms-EN)"]
- ["grel:p_string_sep", ";"]
# value: $(synonyms-EN)
language: en
- p: "skos:altlabel"
o:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#split"
parameters:
- ["grel:valueParameter", "$(synonyms-DE)"]
- ["grel:p_string_sep", ";"]
#value: $(synonyms-DE)
language: de
- p: "rdfs:subClassOf"
o:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#splitAndExpandPrefixes"
parameters:
- ["grel:valueParameter", "$(parentClass)"]
- ["grel:p_string_sep", ";"]
type: iri
- p: ["rdfs:seeAlso", "skos:related"]
o:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#splitAndExpandPrefixes"
parameters:
- ["grel:valueParameter", "$(related)"]
- ["grel:p_string_sep", ";"]
type: iri
###
# mappings for the **Relations** sheet
###
objectProperties:
sources:
- ['csv/Relations.csv~csv']
subject: "spo:$(id)"
condition:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#notContains"
parameters:
- [grel:valueParameter, "$(id)"]
- [grel:string_sub, "\:"]
po:
- ["a", "owl:ObjectProperty"]
## rdfs:label, skos:preflabel for en
- ["rdfs:label", $(label-EN), en~lang]
- [skos:preflabel, $(label-EN), en~lang]
## dc:description
- [dc:description, $(description-EN), en~lang]
## domain and range
## **TODO:** use expandPrefix function
- [rdfs:domain, spo:$(domain)~iri]
## **TODO:** use expandPrefix function
- [rdfs:range, spo:$(range)~iri]
## synonyms
- p: "skos:altlabel"
o:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#split"
parameters:
- ["grel:valueParameter", "$(synonyms-EN)"]
- ["grel:p_string_sep", ";"]
# value: $(synonyms-EN)
language: en
## **TODO:** add superProperty
###
# mappings for the **Attributes** sheet
###
DatatypeProperties:
sources:
- ['csv/Attributes.csv~csv']
subject: "spo:$(id)"
condition:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#notContains"
parameters:
- [grel:valueParameter, "$(id)"]
- [grel:string_sub, "\:"]
po:
- ["a", "owl:DatatypeProperty"]
## rdfs:label, skos:preflabel for en
- [rdfs:label, $(label-EN), en~lang]
- [skos:preflabel, $(label-EN), en~lang]
## dc:description
- [dc:description, $(description-EN), en~lang]
## domain and range
## **TODO:** use expandPrefix function
- [rdfs:domain, spo:$(domain)~iri]
## **TODO:** use expandPrefix function
- p: rdfs:range
o:
function: "http://w3id.org/steel/xlsx2owl-utils/functions.ttl#expandPrefix"
parameters:
- ["grel:valueParameter", "$(datatype)"]
# value: "$(datatype)"
type: iri ## causes error with rmlmapper 4.13 instead 4.10: "ERROR be.ugent.rml.cli.Main.main(389) - Not a valid (absolute) IRI:"
## **TODO:** add superProperty