AtesComp commented on issue #1583:
URL: https://github.com/apache/jena/issues/1583#issuecomment-3843839020

   **TLDR**: Version 5.6.0 is all good now! Feel free to use the following 
config as an example. With the UI Editor changes for the next release, even 
better.
   
   I've set up my config to use the following config where I can switch the 
`:graphUnionCOLT` between a `ja:UnionModel` or a `tdb2:GraphTDB2`.  I had been 
operating under the `tdb2:GraphTDB2`.
   
   **NOTE**: The `tdb2:unionDefaultGraph true` setting may have been clashing 
with my union graph definitions, so it's commented. The default graph should 
have always been defined as my inferred graph based on the union graph.
   
   Switching to the `ja:UnionModel` version seems to work well now and allows 
for a finer control over the default union graph as I don't need the ontology 
graphs to be exposed in it. Including them in the `ja:Reasoner` seems to work 
well now.
   
   **First Test:**
   1. Start Fuseki
   2. Simple query on the dataset from the SPARQL Query screen. All good.
   3. info -> count triples in all graphs. All good.
   4. edit -> list current graphs. All good. The "edit -> list current graphs" 
now always works. Seems to be fixed.
   
   **Second Test:**
   1. Restart Fuseki
   2. Directly to edit -> list current graphs. Query worked. All other queries 
work.
   
   **Third Test:**
   1. Use my application on the data to test general response.
   2. All queries work.
   
   NOTE: `MyData` represents common data for all apps. `MyApp` represents 
specific app data.
   
   ```ttl
   # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
   
   ## Fuseki Server configuration file.
   
   ## Reasoners:
   ##   GenericRuleReasoner    -> 
<http://jena.hpl.hp.com/2003/GenericRuleReasoner>
   ##   TransitiveReasoner     -> 
<http://jena.hpl.hp.com/2003/TransitiveReasoner>
   ##   RDFSExptRuleReasoner   -> 
<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>
   ##   OWLFBRuleReasoner      -> 
<http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
   ##   OWLMiniFBRuleReasoner  -> 
<http://jena.hpl.hp.com/2003/OWLMiniFBRuleReasoner>
   ##   OWLMicroFBRuleReasoner -> 
<http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>
   
   PREFIX :        <#>
   PREFIX fuseki:  <http://jena.apache.org/fuseki#>
   PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
   PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
   PREFIX tdb2:    <http://jena.apache.org/2016/tdb#>
   PREFIX res:     <http://jena.hpl.hp.com/2003/>
   PREFIX data:    <https://mydata.org/>
   PREFIX app:     <https://myapp.org/>
   
   ## ------------------------------------------------------------
   ## Server
   
   [] a fuseki:Server ;
       rdfs:label "MyApp Server" ;
       ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "30000,60000" 
] ;
       ##  Services
       fuseki:services ( :serviceMyApp ) ;
       .
   
   ## ------------------------------------------------------------
   ## Service Descriptions
   
   :serviceMyApp a fuseki:Service ;
       rdfs:label "TDB2 MyApp Dataset" ;
       fuseki:name "MyDS" ;
       fuseki:dataset :dsMyApp ;
       fuseki:endpoint [ fuseki:operation fuseki:query ] ;                      
   # Default query endpoint
       fuseki:endpoint [ fuseki:operation fuseki:query  ; fuseki:name "sparql" 
] ;
       fuseki:endpoint [ fuseki:operation fuseki:query  ; fuseki:name "query"  
] ;
       fuseki:endpoint [ fuseki:operation fuseki:update ; fuseki:name "update" 
] ;
       fuseki:endpoint [ fuseki:operation fuseki:gsp_r  ; fuseki:name "get"    
] ; # SPARQL Graph Store Protocol Quad extension Query
       fuseki:endpoint [ fuseki:operation fuseki:gsp_rw ; fuseki:name "data"   
] ; # SPARQL Graph Store Protocol Quad extension Update
   
       fuseki:endpoint [ fuseki:operation fuseki:upload ; fuseki:name "upload" 
] ; # for Fuseki UI: Add
       fuseki:endpoint [ fuseki:operation fuseki:gsp_rw ] ;                     
   # for Fuseki UI: Edit
   
       #fuseki:endpoint [ fuseki:operation fuseki:shacl  ; fuseki:name "shacl"  
] ;
       .
   
   ## ------------------------------------------------------------
   ## MyApp Dataset
   
   :dsMyApp a ja:RDFDataset ;
       rdfs:label "MyApp RDF Dataset" ;
       ja:defaultGraph :graphMyApp_Inf ;
    
       ja:namedGraph [ ja:graphName app:inference       ; ja:graph 
:graphMyApp_Inf    ] ;
   
       ja:namedGraph [ ja:graphName data:ontology       ; ja:graph 
:graphMyData_Ont    ] ;
       ja:namedGraph [ ja:graphName data:vcard          ; ja:graph 
:graphMyData_VCard  ] ;
       ja:namedGraph [ ja:graphName data:people         ; ja:graph 
:graphMyData_People ] ;
       ja:namedGraph [ ja:graphName data:organization   ; ja:graph 
:graphMyData_Org    ] ;
       ja:namedGraph [ ja:graphName data:status         ; ja:graph 
:graphMyData_Stat   ] ;
       ja:namedGraph [ ja:graphName data:tags           ; ja:graph 
:graphMyData_Tags   ] ;
       ja:namedGraph [ ja:graphName data:configuration  ; ja:graph 
:graphMyData_Conf   ] ;
   
       ja:namedGraph [ ja:graphName app:ontology        ; ja:graph 
:graphMyApp_Ont     ] ;
       ja:namedGraph [ ja:graphName app:resource        ; ja:graph 
:graphMyApp_Res     ] ;
       ja:namedGraph [ ja:graphName app:capability      ; ja:graph 
:graphMyApp_Cap     ] ;
       .
   
   ## ------------------------------------------------------------
   ## The Database
   
   :ds_tdb2_MyApp a tdb2:DatasetTDB2 ;
       rdfs:label "MyApp TDB2 Dataset" ;
       tdb2:location "./data" ;
   #    tdb2:unionDefaultGraph true ; # ...DO NOT USE: define our own default 
graph; if used, replaces urn:x-arq:DefaultGraph
       .
   
   ## ------------------------------------------------------------
   ## Inference Graph Model
   
   :graphMyApp_Inf a ja:InfModel ;
       rdfs:label "MyApp Inference Graph" ;
       ja:baseModel :graphUnionMyApp ;
       ja:reasoner :reasonerMyApp ;
       .
   
   :reasonerMyApp a ja:Reasoner ;
       ja:reasonerURL res:OWLMicroFBRuleReasoner ;
       ja:schema :graphMyData_Ont ;   # ...test between reasonerMyApp and 
graphUnionMyApp
       ja:schema :graphMyApp_Ont ;    # ...test between reasonerMyApp and 
graphUnionMyApp
       ja:schema :graphMyData_VCard ; # ...test between reasonerMyApp and 
graphUnionMyApp
       .
   
   ## ------------------------------------------------------------
   ## MyApp Union Graph Model - the Controlled Union Graph Model
   
   :graphUnionMyApp a ja:UnionModel ;
       rdfs:label "MyApp Union Graph" ;
   #    ja:rootModel :graphMyData_Root;   # ...no root model == an immutable, 
empty model (Read Only)
   #    ja:subModel :graphMyData_Ont ;    # ...test between reasonerMyApp and 
graphUnionMyApp
   #    ja:subModel :graphMyData_VCard ;  # ...test between reasonerMyApp and 
graphUnionMyApp
       ja:subModel :graphMyData_Org ;
       ja:subModel :graphMyData_People ;
       ja:subModel :graphMyData_Stat ;
       ja:subModel :graphMyData_Tags ;
       ja:subModel :graphMyData_Conf ;
   #    ja:subModel :graphMyApp_Ont ;     # ...test between reasonerMyApp and 
graphUnionMyApp
       ja:subModel :graphMyApp_Res ;
       ja:subModel :graphMyApp_Cap ;
       .
   
   ## ------------------------------------------------------------
   ## MyApp Union Graph Model - the Complete Union Graph Model
   
   #:graphUnionMyApp a tdb2:GraphTDB2 ;
   #    rdfs:label "MyApp Union Graph" ;
   #    tdb2:graphName "urn:x-arq:UnionGraph" ; # ...redirect default Union 
Graph to :graphUnionMyApp
   #    tdb2:dataset :ds_tdb2_MyApp ;
   #    .
   
   ## ------------------------------------------------------------
   ## Root (default) Graph
   
   #:graphMyData_Root a tdb2:GraphTDB2 ;
   #    rdfs:label "Root Graph" ;
   #    tdb2:dataset :ds_tdb2_MyApp ;
   #    .
   
   ## ------------------------------------------------------------
   ## MyData Ontology Graph
   
   :graphMyData_Ont a tdb2:GraphTDB2 ;
       rdfs:label "MyData Ontology Graph" ;
       tdb2:graphName data:ontology ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyData VCard Ontology Graph
   
   :graphMyData_VCard a tdb2:GraphTDB2 ;
       rdfs:label "MyData VCard Ontology Graph" ;
       tdb2:graphName data:vcard ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyData Organization Graph
   
   :graphMyData_Org a tdb2:GraphTDB2 ;
       rdfs:label "MyData Organization Graph" ;
       tdb2:graphName data:organization ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyData People Graph
   
   :graphMyData_People a tdb2:GraphTDB2 ;
       rdfs:label "MyData People Graph" ;
       tdb2:graphName data:people ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyData Status Graph
   
   :graphMyData_Stat a tdb2:GraphTDB2 ;
       rdfs:label "MyData Status Graph" ;
       tdb2:graphName data:status ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyData Tags Graph
   
   :graphMyData_Tags a tdb2:GraphTDB2 ;
       rdfs:label "MyData Tags Graph" ;
       tdb2:graphName data:tags ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyData Configuration Graph
   
   :graphMyData_Conf a tdb2:GraphTDB2 ;
       rdfs:label "MyData Configuration Graph" ;
       tdb2:graphName data:configuration ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyApp Ontology Graph
   
   :graphMyApp_Ont a tdb2:GraphTDB2 ;
       rdfs:label "MyApp Ontology Graph" ;
       tdb2:graphName app:ontology ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyApp Resource Graph
   
   :graphMyApp_Res a tdb2:GraphTDB2 ;
       rdfs:label "MyApp Resource Graph" ;
       tdb2:graphName app:resource ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   ## MyApp Capability Graph
   
   :graphMyApp_Cap a tdb2:GraphTDB2 ;
       rdfs:label "MyApp Capability Graph" ;
       tdb2:graphName app:capability ;
       tdb2:dataset :ds_tdb2_MyApp ;
       .
   
   ## ------------------------------------------------------------
   # End triples.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to