-
Notifications
You must be signed in to change notification settings - Fork 0
/
loterre.ttl
executable file
·96 lines (84 loc) · 3.53 KB
/
loterre.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# TDB dataset and text index published using Fuseki for INIST
@prefix : <#> .
@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#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#service_text_tdb>
) .
# TDB
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
# Text
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
text:TextDataset rdfs:subClassOf ja:RDFDataset .
text:TextIndexLucene rdfs:subClassOf text:TextIndex .
## ---------------------------------------------------------------
<#service_text_tdb> rdf:type fuseki:Service ;
rdfs:label "TDB/text service" ;
fuseki:name "LoterreVocabularies" ; # la base
fuseki:serviceQuery "query" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:dataset <#text_dataset> ;
.
<#text_dataset> rdf:type text:TextDataset ;
text:dataset <#dataset> ;
text:index <#indexLucene> ;
.
<#dataset> rdf:type tdb:DatasetTDB ;
# emplacement de la base
tdb:location "/fuseki/databases/LoterreVocabularies" ;
tdb:unionDefaultGraph true ;
ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "60000" ] ;
.
<#indexLucene> a text:TextIndexLucene ;
# emplacement des index lucene
text:directory <file:/fuseki/lucene> ;
##text:directory "mem" ;
text:entityMap <#entMap> ;
text:storeValues true ; ## required for Skosmos 1.4
text:queryParser text:AnalyzingQueryParser ;
.
# Text index configuration for Skosmos 0.6 and above (requires Fuseki 1.1.1+)
# definition des proprites des index
<#entMap> a text:EntityMap ;
text:entityField "uri" ;
text:graphField "graph" ; ## enable graph-specific indexing
text:defaultField "pref" ; ## Must be defined in the text:map
text:uidField "uid" ; ## recommended for Skosmos 1.4+
text:langField "lang" ; ## required for Skosmos 1.4
text:map (
# skos:prefLabel
[ text:field "pref" ;
text:predicate skos:prefLabel ;
# text:analyzer [ a text:StandardAnalyzer
text:analyzer [ a text:ConfigurableAnalyzer ;
text:tokenizer text:StandardTokenizer ;
text:filters (text:ASCIIFoldingFilter text:LowerCaseFilter)
] ]
[ text:field "alt" ;
text:predicate skos:altLabel ;
# text:analyzer [ a text:StandardAnalyzer
text:analyzer [ a text:ConfigurableAnalyzer ;
text:tokenizer text:StandardTokenizer ;
text:filters (text:ASCIIFoldingFilter text:LowerCaseFilter)
] ]
# skos:hiddenLabel
[ text:field "hidden" ;
text:predicate skos:hiddenLabel ;
#text:analyzer [ a text:StandardAnalyzer
text:analyzer [ a text:ConfigurableAnalyzer ;
text:tokenizer text:StandardTokenizer ;
text:filters (text:ASCIIFoldingFilter text:LowerCaseFilter)
] ]
) .