-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmesh_Jena4.ttl
124 lines (112 loc) · 4.39 KB
/
mesh_Jena4.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
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
@prefix : <http://localhost/jena_example/#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text: <http://jena.apache.org/text#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix meshv: <http://id.nlm.nih.gov/mesh/vocab#> .
@prefix mesht: <http://www.medvik.cz/schema/mesh/vocab/#> .
### Version 1.4.0 for Jena v4
## Initialize text query
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
# A TextDataset is a regular dataset with a text index.
text:TextDataset rdfs:subClassOf ja:RDFDataset .
# Lucene index
text:TextIndexLucene rdfs:subClassOf text:TextIndex .
# Elasticsearch index
text:TextIndexES rdfs:subClassOf text:TextIndex .
## ---------------------------------------------------------------
## This URI must be fixed - it's used to assemble the text dataset.
:text_dataset
a text:TextDataset ;
text:dataset <#dataset> ;
text:index <#indexLucene> ;
.
# A TDB dataset used for RDF storage
<#dataset>
a tdb2:DatasetTDB2 ;
tdb2:location "d:/Data/jena4/databases/mesh" ;
.
# Text index description
<#indexLucene>
a text:TextIndexLucene ;
text:directory "d:/Data/jena4/indexes/mesh" ;
text:entityMap <#entMap> ;
text:storeValues false ;
## text:analyzer[ a text:StandardAnalyzer ] ;
text:analyzer [
a text:ConfigurableAnalyzer ;
text:tokenizer text:StandardTokenizer ;
text:filters (
text:ASCIIFoldingFilter
text:LowerCaseFilter
# text:PorterStemFilter
)
] ;
## text:queryAnalyzer [ a text:KeywordAnalyzer ] ;
text:queryParser text:AnalyzingQueryParser ;
## text:defineAnalyzers [ . . . ] ;
text:multilingualSupport true ;
.
<#entMap>
a text:EntityMap ;
text:defaultField "ftext" ;
text:entityField "uri" ;
text:uidField "uid" ;
text:langField "lang" ;
text:graphField "graph" ;
text:map (
[ text:field "ftext" ; text:predicate rdfs:label ]
[ text:field "ftext" ; text:predicate meshv:abbreviation ]
[ text:field "ftext" ; text:predicate meshv:annotation ]
[ text:field "ftext" ; text:predicate meshv:historyNote ]
[ text:field "ftext" ; text:predicate meshv:identifier ]
[ text:field "ftext" ; text:predicate meshv:prefLabel ]
[ text:field "ftext" ; text:predicate meshv:altLabel ]
[ text:field "ftext" ; text:predicate meshv:casn1_label ]
[ text:field "ftext" ; text:predicate meshv:registryNumber ]
[ text:field "ftext" ; text:predicate meshv:relatedRegistryNumber ]
[ text:field "ftext" ; text:predicate meshv:note ]
[ text:field "ftext" ; text:predicate meshv:onlineNote ]
[ text:field "ftext" ; text:predicate meshv:publicMeSHNote ]
# [ text:field "ftext" ; text:predicate meshv:source ]
[ text:field "ftext" ; text:predicate meshv:scopeNote ]
[ text:field "ftext" ; text:predicate mesht:abbreviation ]
[ text:field "ftext" ; text:predicate mesht:annotation ]
[ text:field "ftext" ; text:predicate mesht:historyNote ]
[ text:field "ftext" ; text:predicate mesht:identifier ]
[ text:field "ftext" ; text:predicate mesht:prefLabel ]
[ text:field "ftext" ; text:predicate mesht:altLabel ]
[ text:field "ftext" ; text:predicate mesht:scopeNote ]
[ text:field "ftext" ; text:predicate mesht:translatorsNote ]
) .
### MeSH common:
## abbreviation
## annotation
## historyNote
## identifier
## prefLabel
## altLabel
## scopeNote
### MeSH master only:
## rdfs:label
## meshv:casn1_label
## meshv:note
## meshv:onlineNote
## meshv:publicMeSHNote
## meshv:source
### Translation only:
## mesht:translatorsNote
<#service_text_tdb>
a fuseki:Service ;
rdfs:label "MeSH-Translation-service" ;
fuseki:name "mesh" ;
fuseki:serviceQuery "query" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:dataset :text_dataset ;
.