-
Notifications
You must be signed in to change notification settings - Fork 0
/
assembler.ttl
79 lines (71 loc) · 3.24 KB
/
assembler.ttl
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
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text: <http://jena.apache.org/text#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix skosxl: <http://www.w3.org/2008/05/skos-xl#> .
@prefix agent: <http://schema.onki.fi/agent-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix spatial: <http://jena.apache.org/spatial#> .
@prefix schema: <http://schema.org/> .
@prefix : <#> .
@prefix crm: <http://erlangen-crm.org/current/> .
<#mmm-cidoc> rdf:type fuseki:Service ;
fuseki:name "ds" ; # http://host:port/ds
fuseki:serviceQuery "sparql" ; # SPARQL query service
fuseki:serviceUpdate "update" ; # SPARQL update service
# fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol
fuseki:dataset <#mmm-cidoc-dataset> ;
.
<#mmm-cidoc-dataset> rdf:type spatial:SpatialDataset ;
spatial:dataset <#mmm-cidoc-text> ;
spatial:index <#mmm-cidoc-spatiallucene> ;
.
<#mmm-cidoc-spatiallucene> a spatial:SpatialIndexLucene ;
spatial:directory <file:/fuseki-base/databases/spatiallucene> ;
spatial:definition <#mmm-cidoc-spatialdefinition> ;
.
<#mmm-cidoc-spatialdefinition> a spatial:EntityDefinition ;
spatial:entityField "uri" ;
spatial:geoField "geo" ;
# custom geo predicates for 1) Latitude/Longitude Format
# spatial:hasSpatialPredicatePairs (
# [ spatial:latitude :latitude_1 ; spatial:longitude :longitude_1 ]
# [ spatial:latitude :latitude_2 ; spatial:longitude :longitude_2 ]
# ) ;
# custom geo predicates for 2) Well Known Text (WKT) Literal
# spatial:hasWKTPredicates (:wkt_1 :wkt_2) ;
spatial:hasWKTPredicates (schema:polygon) ;
# custom SpatialContextFactory for 2) Well Known Text (WKT) Literal
spatial:spatialContextFactory
"org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
.
<#mmm-cidoc-text> rdf:type text:TextDataset ;
text:dataset <#mmm-cidoc-tdb> ;
text:index <#mmm-cidoc-lucene> ;
.
<#mmm-cidoc-tdb> rdf:type tdb:DatasetTDB ;
tdb:location "/fuseki-base/databases/tdb" ;
# Make the default graph be the union of all named graphs.
tdb:unionDefaultGraph true ;
.
<#mmm-cidoc-lucene> a text:TextIndexLucene ;
text:directory <file:/fuseki-base/databases/lucene> ;
text:entityMap <#mmm-cidoc-entity-map> ;
.
<#mmm-cidoc-entity-map> a text:EntityMap ;
text:entityField "uri" ;
text:graphField "graph" ; ## enable graph-specific indexing
text:defaultField "text" ; ## Must be defined in the text:map
text:uidField "uid" ;
text:map (
[ text:field "text" ; text:predicate skos:prefLabel ]
[ text:field "text" ; text:predicate skos:altLabel ]
[ text:field "text" ; text:predicate skos:hiddenLabel ]
[ text:field "text" ; text:predicate rdfs:label ]
[ text:field "text" ; text:predicate crm:P3_has_note ]
)
.