madb-fuseki-docker/assembler.ttl
2023-07-03 05:36:14 +09:00

57 lines
2.3 KiB
Turtle

@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@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 text: <http://jena.apache.org/text#> .
@prefix schema: <https://schema.org/> .
<#service> rdf:type fuseki:Service ;
fuseki:name "madb" ; # http://host:port/madb
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:serviceReadGraphStore "data" ; # SPARQL Graph store protocol (read only)
fuseki:dataset <#text> ;
# fuseki:dataset <#tdb2> ;
.
<#text> rdf:type text:TextDataset ;
text:dataset <#tdb2> ;
text:index <#lucene> ;
.
tdb2:DatasetTDB2 rdfs:subClassOf ja:RDFDataset .
<#tdb2>
rdf:type tdb2:DatasetTDB2 ;
tdb2:location "/fuseki-base/databases/tdb2" ;
.
<#lucene> a text:TextIndexLucene ;
text:directory <file:/fuseki-base/databases/lucene> ;
text:storeValues true ;
text:entityMap <#entity-map> ;
.
<#text-analyzer> a text:GenericAnalyzer ;
text:class "org.apache.lucene.analysis.cjk.CJKAnalyzer" ;
.
<#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:langField "lang" ;
text:map (
[ text:field "text" ; text:predicate schema:name ; text:analyzer <#text-analyzer> ]
[ text:field "text" ; text:predicate schema:alternateName ; text:analyzer <#text-analyzer> ]
[ text:field "text" ; text:predicate schema:alternativeHeadline ; text:analyzer <#text-analyzer> ]
[ text:field "text" ; text:predicate schema:description ; text:analyzer <#text-analyzer> ]
[ text:field "text" ; text:predicate schema:contributor ; text:analyzer <#text-analyzer> ]
[ text:field "text" ; text:predicate rdfs:label ; text:analyzer <#text-analyzer> ]
)
.