# This file is written in N3 / Turtle @prefix rdfs: . @prefix rdf: . @prefix xsd: . @prefix module: . @prefix joseki: . @prefix ja: . @prefix tdb: . ## -------------------------------------------------------------- ## This file is written in N3 / Turtle ## It is an RDF graph - order of RDF triples does not matter ## to the machine but it does help people who need to edit this file. ## Note: web.xml must be in-step with this file. ## for each service, ## Note: adding rdfs:label to blank nodes will cause Joseki ## to print that in log messages. ## See also file:joseki-config-example.ttl ## -------------------------------------------------------------- ## About this configuration <> rdfs:label "Joseki Configuration File" . ## -------------------------------------------------------------- ## About this server <#server> rdf:type joseki:Server ; # Example of some initialization code. joseki:initialization [ module:implementation [ module:className ; rdfs:label "Example initializer" ; ] ] ; . ## -------------------------------------------------------------- ## Services ## Services are the points that request are sent to. ## serviceRef that will be used to match requests to services, ## not some resource URI for the description. ## Note that the service reference and the routing of incoming ## requests by URI as defined by web.xml have to align. # Service 1 # General purpose SPARQL processor, no dataset, expects the # request to specify the dataset (either by parameters in the # protocol request or in the query itself). #<#service1> # rdf:type joseki:Service ; # rdfs:label "service point" ; # joseki:serviceRef "sparql" ; # web.xml must route this name to Joseki # joseki:processor joseki:ProcessorSPARQL ; # . # Service 2 - SPARQL processor for only handling a given dataset in a TDB directory <#service2> rdf:type joseki:Service ; rdfs:label "SPARQL-TDB" ; joseki:serviceRef "sparql" ; # web.xml must route this name to Joseki # dataset part joseki:dataset <#bloggers-dataset> ; # Service part. # This processor will not allow either the protocol, # nor the query, to specify the dataset. joseki:processor joseki:ProcessorSPARQL_FixedDS ; . ## ---- SPARQL/Update ## A pair of services - one for SPARQL queries, one for SPARQL/Update ## Previous web.xml must also be updated to include a defintion for the ## servlet "SPARQL/Update service processor" and update requests must ## be routed to this servlet. ## <#serviceUpdate> ## rdf:type joseki:Service ; ## rdfs:label "SPARQL/Update" ; ## joseki:serviceRef "update/service" ; ## # dataset part ## joseki:dataset <#mem>; ## # Service part. ## # This processor will not allow either the protocol, ## # nor the query, to specify the dataset. ## joseki:processor joseki:ProcessorSPARQLUpdate ## . ## ## <#serviceRead> ## rdf:type joseki:Service ; ## rdfs:label "SPARQL" ; ## joseki:serviceRef "sparql/read" ; ## # dataset part ## joseki:dataset <#mem> ; ## Same dataset ## # Service part. ## # This processor will not allow either the protocol, ## # nor the query, to specify the dataset. ## joseki:processor joseki:ProcessorSPARQL_FixedDS ; ## . ## -------------------------------------------------------------- ## Datasets <#books> rdf:type ja:RDFDataset ; rdfs:label "Books" ; ja:defaultGraph [ rdfs:label "books.n3" ; a ja:MemoryModel ; ja:content [ja:externalContent ] ; ] ; . <#mem> rdf:type ja:RDFDataset ; rdfs:label "MEM" ; ja:defaultGraph [ a ja:MemoryModel ] ; . [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" . ## Initialize TDB. tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset . tdb:GraphTDB rdfs:subClassOf ja:Model . <#bloggers-dataset> a ja:RDFDataset; ja:defaultGraph [ a ja:InfModel; ja:baseModel [ a tdb:GraphTDB; tdb:location "/work/data/blogger-db-dir"; ]; ]; . ## -------------------------------------------------------------- ## Processors joseki:ProcessorSPARQL rdfs:label "General SPARQL processor" ; rdf:type joseki:Processor ; module:implementation joseki:ImplSPARQL ; # Parameters - this processor processes FROM/FROM NAMED joseki:allowExplicitDataset "true"^^xsd:boolean ; joseki:allowWebLoading "true"^^xsd:boolean ; ## And has no locking policy (it loads data each time). ## The default is mutex (one request at a time) joseki:lockingPolicy joseki:lockingPolicyNone ; . joseki:ProcessorSPARQL_FixedDS rdfs:label "SPARQL processor for fixed datasets" ; rdf:type joseki:Processor ; module:implementation joseki:ImplSPARQL ; # This processor does not accept queries with FROM/FROM NAMED joseki:allowExplicitDataset "false"^^xsd:boolean ; joseki:allowWebLoading "false"^^xsd:boolean ; joseki:lockingPolicy joseki:lockingPolicyMRSW ; . joseki:ProcessorSPARQLUpdate rdfs:label "SPARQL Update processor" ; rdf:type joseki:Processor ; module:implementation joseki:ImplSPARQLUpdate ; joseki:lockingPolicy joseki:lockingPolicyMRSW ; . joseki:ImplSPARQL rdf:type joseki:ServiceImpl ; module:className . joseki:ImplSPARQLUpdate rdf:type joseki:ServiceImpl ; module:className . # Local Variables: # tab-width: 4 # indent-tabs-mode: nil # End: