-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
@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/#> . | ||
@prefix meshq: <http://www.medvik.cz/schema/mesh/query/#> . | ||
|
||
### Version 1.1.1 | ||
|
||
## 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/jena/databases/mesh" ; | ||
. | ||
|
||
# Text index description | ||
<#indexLucene> | ||
a text:TextIndexLucene ; | ||
text:directory "d:/Data/jena/indexes/mesh" ; | ||
text:entityMap <#entMap> ; | ||
text:storeValues true ; | ||
text:analyzer [ | ||
a text:ConfigurableAnalyzer ; | ||
text:tokenizer text:StandardTokenizer ; | ||
text:filters (text:ASCIIFoldingFilter text:LowerCaseFilter) | ||
] ; | ||
text:queryParser text:AnalyzingQueryParser ; | ||
text:multilingualSupport true ; | ||
text:propLists ( | ||
[ text:propListProp meshq:defQuery ; | ||
text:props ( | ||
rdfs:label | ||
meshv:identifier | ||
meshv:prefLabel | ||
meshv:altLabel | ||
meshv:casn1_label | ||
mesht:identifier | ||
mesht:prefLabel | ||
mesht:altLabel | ||
) ; | ||
] | ||
[ text:propListProp meshq:includeNotes ; | ||
text:props ( | ||
rdfs:label | ||
meshv:identifier | ||
meshv:prefLabel | ||
meshv:altLabel | ||
mesht:identifier | ||
mesht:prefLabel | ||
mesht:altLabel | ||
mesht:translatorsNote | ||
mesht:annotation | ||
mesht:historyNote | ||
mesht:scopeNote | ||
meshv:abbreviation | ||
meshv:annotation | ||
meshv:historyNote | ||
meshv:note | ||
meshv:onlineNote | ||
meshv:publicMeSHNote | ||
meshv:scopeNote | ||
meshv:source | ||
) ; | ||
] | ||
) ; | ||
. | ||
|
||
<#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: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 ] | ||
) . | ||
|
||
<#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 ; | ||
. | ||
|