-
Notifications
You must be signed in to change notification settings - Fork 1
/
excel_vocab_import.pr
50 lines (49 loc) · 1.84 KB
/
excel_vocab_import.pr
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
prefix : <http://purl.org/iow/terms/>
prefix grddl: <http://www.w3.org/2003/g/data-view#>
prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix gn: <http://www.geonames.org/ontology#>
prefix coda: <http://art.uniroma2.it/coda/contracts/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix fn: <http://www.w3.org/2005/xpath-functions#>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix sesame: <http://www.openrdf.org/schema/sesame#>
prefix luc: <http://www.ontotext.com/owlim/lucene#>
prefix dc: <http://purl.org/dc/elements/1.1/>
rule it.uniroma2.art.Sheet2RDFAnnotation id:row {
nodes = {
@Memoized
subject uri(coda:randIdGen('concept')) col_0/value .
Term literal@en col_0/value .
Abbr literal@en col_1/value .
Def literal@en col_2/value .
Theme1 uri col_3/value .
Theme2 uri col_4/value .
Theme3 uri col_5/value .
Theme4 uri col_6/value .
Theme5 uri col_7/value .
Comments literal@en col_8/ value .
}
graph = {
$subject rdf:type skos:Concept .
$subject skos:inScheme :adwr-d .
$subject skos:topConceptOf :adwr-d .
OPTIONAL {$Theme1 rdf:type skos:Collection .}
OPTIONAL {$Theme2 rdf:type skos:Collection .}
OPTIONAL {$Theme3 rdf:type skos:Collection .}
OPTIONAL {$Theme4 rdf:type skos:Collection .}
OPTIONAL {$Theme5 rdf:type skos:Collection .}
OPTIONAL{$subject skos:altLabel $Abbr .}
$subject skos:prefLabel $Term .
$subject skos:definition $Def .
OPTIONAL{$Theme1 skos:member $subject .}
OPTIONAL{$Theme2 skos:member $subject .}
OPTIONAL{$Theme3 skos:member $subject .}
OPTIONAL{$Theme4 skos:member $subject .}
OPTIONAL{$Theme5 skos:member $subject .}
OPTIONAL{$subject rdfs:comment $Comments .}
}
}