A union graph built up in that way won't pull in a different way from disk to 
memory than using just the on-disk resource would. It will find triples in one 
graph and in the other and merge them; it will not set up any new data 
structures holding triples on its own account.

ajs6f

> On May 13, 2019, at 6:54 AM, 刑天 <[email protected]> wrote:
> 
> Sorry for my poor written English...
> 
> 
> My question is simple:
> I have a unioned default graph which backed by two different graphs: one for 
> tdb, and one for memory. I only made queries using default graph, how can 
> jena knows when to query a tdb, and when to query a memory db. Is jena loads 
> everything in memory for this situation?
> 
> 
> this is the assembler:
> 
> 
> @prefix :      <http://base/#> .
> @prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix tdb:   <http://jena.hpl.hp.com/2008/tdb#> .
> @prefix tdb2:  <http://jena.apache.org/2016/tdb#> .
> @prefix ja:    <http://jena.hpl.hp.com/2005/11/Assembler#> .
> @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix fuseki: <http://jena.apache.org/fuseki#> .
> 
> 
> :service_tdb_all  a                   fuseki:Service ;
>        rdfs:label                    "TDB2 test" ;
>        fuseki:dataset                :dataset ;
>        fuseki:name                   "test" ;
>        fuseki:serviceQuery           "query" , "sparql" ;
>        fuseki:serviceReadGraphStore  "get" ;
>        fuseki:serviceReadWriteGraphStore
>                "data" ;
>        fuseki:serviceUpdate          "update" ;
>        fuseki:serviceUpload          "upload" .
> 
> 
> :dataset a ja:RDFDataset ;
>  ja:defaultGraph :unioned_model ;
>  .
> 
> 
> :unioned_model
>  a            ja:UnionModel ;
>  ja:subModel <#graph> ;
>  ja:subModel <#ontology> ;
>  .
> 
> 
> <#graph> rdf:type tdb:GraphTDB ;
>  tdb:dataset :tdb_dataset_readwrite ;
>  .
> 
> 
> :tdb_dataset_readwrite
>        a              tdb:DatasetTDB ;
>        tdb:location  "/Users/gaozhixin/example_tdb" .
> 
> 
> <#ontology> rdf:type ja:MemoryModel ;
>     ja:content [ja:externalContent <file:/Users/gaozhixin/example.ttl> ] ;

Reply via email to