Re: SPARQL Update does not changes the triple values

2020-04-21 Thread Andy Seaborne
The Fuseki servers distributed by the Jena project don't need those in 
the configuration,. If repacking the jars in the process is described in:


https://jena.apache.org/documentation/notes/jena-repack.html

Its like any Java system : there may be files in the jar that need 
including which is done by the ServicesResourceTransformer. This isn't 
unique to Jena.


Andy

On 20/04/2020 19:06, Silvio Domingos wrote:

Hi Andy,

That works, thanks so much for your help.

The triples you mean, perhaps are those from the config.tll
I have them coded because of my docker image and container that needs it.

Best Regards,
Silvio

On 2020/04/20 16:21:06, Andy Seaborne  wrote:

Hi Silvio,

You have:

  >  tdb2:unionDefaultGraph true ;

so the default graph for query is the union of the names graph and not
the real default graph.

WHERE {...} will be over the query union of the names graph.

That isn't a real graph - its calculated on demand.

Updates do go to the real storage default graph ( it has the fake name
 but isn't part of the union of named graphs.

Either direct the DELETE / INSERT to a named graph
or don't use "tdb2:unionDefaultGraph true".

  Andy





On 20/04/2020 13:40, Silvio Domingos wrote:

Hi everyone,

I'm trying to execute a SPARQL update on fuseki 3.14.0
I have a output success, but the triples are not updated. It means, they remain 
with the previous value.

Find here the example I'm using in the update:

DELETE
   {   
 ?o . }
INSERT
   {   
  "closed" . }
WHERE
   {   
 ?o . }

Later you can select the value by running:


SELECT *
WHERE {
 
 ?object
}
LIMIT 25

So, I also have tested different combinations using DELETE/INSERT DATA:

DELETE DATA {  
 "undefined" };
INSERT DATA {  
 "running" }

Moreover, I'm using TDB2 with lucene index

@prefix :   .
@prefix rdf:    .
@prefix tdb2:   .
@prefix ja: .
@prefix rdfs:   .
@prefix fuseki:  .
@prefix text:   .
@prefix skos:   .

ja:DatasetTxnMem  rdfs:subClassOf  ja:RDFDataset .
ja:MemoryDataset  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetOne  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetSink  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetZero  rdfs:subClassOf  ja:RDFDataset .

tdb2:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb2:DatasetTDB2  rdfs:subClassOf  ja:RDFDataset .

tdb2:GraphTDB  rdfs:subClassOf  ja:Model .
tdb2:GraphTDB2  rdfs:subClassOf  ja:Model .


Out of curiosity - why all these triples? They are built-in,or at least
should be. if they aren't then system initialization got broken - a
common cause is repackafing the code without include the service files
in META-INF/services/



  rdfs:subClassOf  ja:RDFDataset .


  rdfs:subClassOf  ja:Model .

text:TextDataset
  rdfs:subClassOf  ja:RDFDataset .

:service_tdb_all  a   fuseki:Service ;
  rdfs:label"TDB2+text permissions" ;
  fuseki:dataset:text_dataset ;
  fuseki:name   "permissions" ;
  fuseki:serviceQuery   "query" , "" , "sparql" ;
  fuseki:serviceReadGraphStore  "get" ;
  fuseki:serviceReadQuads   "" ;
  fuseki:serviceReadWriteGraphStore "data" ;
  fuseki:serviceReadWriteQuads  "" ;
  fuseki:serviceUpdate  "" , "update" ;
  fuseki:serviceUpload  "upload" .

:text_dataset a text:TextDataset ;
  text:dataset :tdb_dataset_readwrite ;
  text:index :index_lucene .

:tdb_dataset_readwrite
  a tdb2:DatasetTDB2 ;
  tdb2:unionDefaultGraph true ;
  tdb2:location  "/tmp/fuseki/databases/permissions" .

:index_lucene a text:TextIndexLucene ;
  text:directory  ;
  text:entityMap :entity_map ;
  text:analyzer [ a text:StandardAnalyzer ] ;
  text:queryAnalyzer [ a text:StandardAnalyzer ] ;
  text:multilingualSupport true ;
  text:storeValues true .
 


# Text index configuration
:entity_map a text:EntityMap ;
  text:entityField  "uri" ;
  text:graphField   "graph" ;
  text:defaultField 

Re: SPARQL Update does not changes the triple values

2020-04-20 Thread Silvio Domingos
Hi Andy,

That works, thanks so much for your help.

The triples you mean, perhaps are those from the config.tll
I have them coded because of my docker image and container that needs it.

Best Regards,
Silvio

On 2020/04/20 16:21:06, Andy Seaborne  wrote: 
> Hi Silvio,
> 
> You have:
> 
>  >  tdb2:unionDefaultGraph true ;
> 
> so the default graph for query is the union of the names graph and not 
> the real default graph.
> 
> WHERE {...} will be over the query union of the names graph.
> 
> That isn't a real graph - its calculated on demand.
> 
> Updates do go to the real storage default graph ( it has the fake name 
>  but isn't part of the union of named graphs.
> 
> Either direct the DELETE / INSERT to a named graph
> or don't use "tdb2:unionDefaultGraph true".
> 
>  Andy
> 
> 
> 
> 
> 
> On 20/04/2020 13:40, Silvio Domingos wrote:
> > Hi everyone,
> > 
> > I'm trying to execute a SPARQL update on fuseki 3.14.0
> > I have a output success, but the triples are not updated. It means, they 
> > remain with the previous value.
> > 
> > Find here the example I'm using in the update:
> > 
> > DELETE
> >   {  
> >  ?o . }
> > INSERT
> >   {  
> >   "closed" . }
> > WHERE
> >   {  
> >  ?o . }
> > 
> > Later you can select the value by running:
> > 
> > 
> > SELECT *
> > WHERE {
> > 
> >  ?object
> > }
> > LIMIT 25
> > 
> > So, I also have tested different combinations using DELETE/INSERT DATA:
> > 
> > DELETE DATA {    
> >  "undefined" };
> > INSERT DATA {    
> >  "running" }
> > 
> > Moreover, I'm using TDB2 with lucene index
> > 
> > @prefix :   .
> > @prefix rdf:    .
> > @prefix tdb2:   .
> > @prefix ja: .
> > @prefix rdfs:   .
> > @prefix fuseki:  .
> > @prefix text:   .
> > @prefix skos:   .
> > 
> > ja:DatasetTxnMem  rdfs:subClassOf  ja:RDFDataset .
> > ja:MemoryDataset  rdfs:subClassOf  ja:RDFDataset .
> > ja:RDFDatasetOne  rdfs:subClassOf  ja:RDFDataset .
> > ja:RDFDatasetSink  rdfs:subClassOf  ja:RDFDataset .
> > ja:RDFDatasetZero  rdfs:subClassOf  ja:RDFDataset .
> > 
> > tdb2:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
> > tdb2:DatasetTDB2  rdfs:subClassOf  ja:RDFDataset .
> > 
> > tdb2:GraphTDB  rdfs:subClassOf  ja:Model .
> > tdb2:GraphTDB2  rdfs:subClassOf  ja:Model .
> 
> Out of curiosity - why all these triples? They are built-in,or at least 
> should be. if they aren't then system initialization got broken - a 
> common cause is repackafing the code without include the service files 
> in META-INF/services/
> 
> > 
> >  rdfs:subClassOf  ja:RDFDataset .
> > 
> > 
> >  rdfs:subClassOf  ja:Model .
> > 
> > text:TextDataset
> >  rdfs:subClassOf  ja:RDFDataset .
> > 
> > :service_tdb_all  a   fuseki:Service ;
> >  rdfs:label"TDB2+text permissions" ;
> >  fuseki:dataset:text_dataset ;
> >  fuseki:name   "permissions" ;
> >  fuseki:serviceQuery   "query" , "" , "sparql" ;
> >  fuseki:serviceReadGraphStore  "get" ;
> >  fuseki:serviceReadQuads   "" ;
> >  fuseki:serviceReadWriteGraphStore "data" ;
> >  fuseki:serviceReadWriteQuads  "" ;
> >  fuseki:serviceUpdate  "" , "update" ;
> >  fuseki:serviceUpload  "upload" .
> > 
> > :text_dataset a text:TextDataset ;
> >  text:dataset :tdb_dataset_readwrite ;
> >  text:index :index_lucene .
> > 
> > :tdb_dataset_readwrite
> >  a tdb2:DatasetTDB2 ;
> >  tdb2:unionDefaultGraph true ;
> >  tdb2:location  "/tmp/fuseki/databases/permissions" .
> > 
> > :index_lucene a text:TextIndexLucene ;
> >  text:directory  ;
> >  text:entityMap :entity_map ;
> >  text:analyzer [ a text:StandardAnalyzer ] ;
> >  text:queryAnalyzer [ a text:StandardAnalyzer ] ;
> >  text:multilingualSupport true ;
> >  text:storeValues true .
> > 
> > 
> > # Text index configuration
> > :entity_map a text:EntityMap ;
> >  text:entityField  "uri" ;
> >  text:graphField   "graph" ;
> >  text:defaultField

Re: SPARQL Update does not changes the triple values

2020-04-20 Thread Andy Seaborne

Hi Silvio,

You have:

>  tdb2:unionDefaultGraph true ;

so the default graph for query is the union of the names graph and not 
the real default graph.


WHERE {...} will be over the query union of the names graph.

That isn't a real graph - its calculated on demand.

Updates do go to the real storage default graph ( it has the fake name 
 but isn't part of the union of named graphs.


Either direct the DELETE / INSERT to a named graph
or don't use "tdb2:unionDefaultGraph true".

Andy





On 20/04/2020 13:40, Silvio Domingos wrote:

Hi everyone,

I'm trying to execute a SPARQL update on fuseki 3.14.0
I have a output success, but the triples are not updated. It means, they remain 
with the previous value.

Find here the example I'm using in the update:

DELETE
  {    
 ?o . }
INSERT
  {    
  "closed" . }
WHERE
  {    
 ?o . }

Later you can select the value by running:


SELECT *
WHERE {
    
 ?object
}
LIMIT 25

So, I also have tested different combinations using DELETE/INSERT DATA:

DELETE DATA {  
 "undefined" };
INSERT DATA {  
 "running" }

Moreover, I'm using TDB2 with lucene index

@prefix :   .
@prefix rdf:    .
@prefix tdb2:   .
@prefix ja: .
@prefix rdfs:   .
@prefix fuseki:  .
@prefix text:   .
@prefix skos:   .

ja:DatasetTxnMem  rdfs:subClassOf  ja:RDFDataset .
ja:MemoryDataset  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetOne  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetSink  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetZero  rdfs:subClassOf  ja:RDFDataset .

tdb2:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb2:DatasetTDB2  rdfs:subClassOf  ja:RDFDataset .

tdb2:GraphTDB  rdfs:subClassOf  ja:Model .
tdb2:GraphTDB2  rdfs:subClassOf  ja:Model .


Out of curiosity - why all these triples? They are built-in,or at least 
should be. if they aren't then system initialization got broken - a 
common cause is repackafing the code without include the service files 
in META-INF/services/




 rdfs:subClassOf  ja:RDFDataset .


 rdfs:subClassOf  ja:Model .

text:TextDataset
 rdfs:subClassOf  ja:RDFDataset .

:service_tdb_all  a   fuseki:Service ;
 rdfs:label"TDB2+text permissions" ;
 fuseki:dataset:text_dataset ;
 fuseki:name   "permissions" ;
 fuseki:serviceQuery   "query" , "" , "sparql" ;
 fuseki:serviceReadGraphStore  "get" ;
 fuseki:serviceReadQuads   "" ;
 fuseki:serviceReadWriteGraphStore "data" ;
 fuseki:serviceReadWriteQuads  "" ;
 fuseki:serviceUpdate  "" , "update" ;
 fuseki:serviceUpload  "upload" .

:text_dataset a text:TextDataset ;
 text:dataset :tdb_dataset_readwrite ;
 text:index :index_lucene .

:tdb_dataset_readwrite
 a tdb2:DatasetTDB2 ;
 tdb2:unionDefaultGraph true ;
 tdb2:location  "/tmp/fuseki/databases/permissions" .

:index_lucene a text:TextIndexLucene ;
 text:directory  ;
 text:entityMap :entity_map ;
 text:analyzer [ a text:StandardAnalyzer ] ;
 text:queryAnalyzer [ a text:StandardAnalyzer ] ;
 text:multilingualSupport true ;
 text:storeValues true .



# Text index configuration
:entity_map a text:EntityMap ;
 text:entityField  "uri" ;
 text:graphField   "graph" ;
 text:defaultField "pref" ;
 text:uidField "uid" ;
 text:langField"lang" ;
 text:map (
  # skos:prefLabel
  [ text:field "pref" ;
text:predicate skos:prefLabel ;
  ]
  # skos:altLabel
  [ text:field "alt" ;
text:predicate skos:altLabel ;
  ]
  # skos:hiddenLabel
  [ text:field "hidden" ;
text:predicate skos:hiddenLabel ;
  ]
  ) .
Any help is very appreciated,

Best Regards,
Silvio



SPARQL Update does not changes the triple values

2020-04-20 Thread Silvio Domingos
Hi everyone,

I'm trying to execute a SPARQL update on fuseki 3.14.0
I have a output success, but the triples are not updated. It means, they remain 
with the previous value.

Find here the example I'm using in the update:

DELETE 
 {   
 ?o . } 
INSERT 
 {   
  "closed" . } 
WHERE 
 {   
 ?o . } 

Later you can select the value by running:


SELECT *
WHERE {
   
 ?object
}
LIMIT 25

So, I also have tested different combinations using DELETE/INSERT DATA:

DELETE DATA {    
 "undefined" };
INSERT DATA {    
 "running" }

Moreover, I'm using TDB2 with lucene index

@prefix :   .
@prefix rdf:    .
@prefix tdb2:   .
@prefix ja: .
@prefix rdfs:   .
@prefix fuseki:  .
@prefix text:   .
@prefix skos:   .

ja:DatasetTxnMem  rdfs:subClassOf  ja:RDFDataset .
ja:MemoryDataset  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetOne  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetSink  rdfs:subClassOf  ja:RDFDataset .
ja:RDFDatasetZero  rdfs:subClassOf  ja:RDFDataset .

tdb2:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb2:DatasetTDB2  rdfs:subClassOf  ja:RDFDataset .

tdb2:GraphTDB  rdfs:subClassOf  ja:Model .
tdb2:GraphTDB2  rdfs:subClassOf  ja:Model .


rdfs:subClassOf  ja:RDFDataset .


rdfs:subClassOf  ja:Model .

text:TextDataset
rdfs:subClassOf  ja:RDFDataset .

:service_tdb_all  a   fuseki:Service ;
rdfs:label"TDB2+text permissions" ;
fuseki:dataset:text_dataset ;
fuseki:name   "permissions" ;
fuseki:serviceQuery   "query" , "" , "sparql" ;
fuseki:serviceReadGraphStore  "get" ;
fuseki:serviceReadQuads   "" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadWriteQuads  "" ;
fuseki:serviceUpdate  "" , "update" ;
fuseki:serviceUpload  "upload" .

:text_dataset a text:TextDataset ;
text:dataset :tdb_dataset_readwrite ;
text:index :index_lucene . 

:tdb_dataset_readwrite
a tdb2:DatasetTDB2 ;
tdb2:unionDefaultGraph true ;
tdb2:location  "/tmp/fuseki/databases/permissions" .

:index_lucene a text:TextIndexLucene ;
text:directory  ;
text:entityMap :entity_map ;
text:analyzer [ a text:StandardAnalyzer ] ;
text:queryAnalyzer [ a text:StandardAnalyzer ] ;
text:multilingualSupport true ;
text:storeValues true .
   

# Text index configuration 
:entity_map a text:EntityMap ;
text:entityField  "uri" ;
text:graphField   "graph" ;
text:defaultField "pref" ;
text:uidField "uid" ;
text:langField"lang" ;
text:map (
 # skos:prefLabel
 [ text:field "pref" ;
   text:predicate skos:prefLabel ;
 ]
 # skos:altLabel
 [ text:field "alt" ;
   text:predicate skos:altLabel ;
 ]
 # skos:hiddenLabel
 [ text:field "hidden" ;
   text:predicate skos:hiddenLabel ;
 ]
 ) . 
Any help is very appreciated, 

Best Regards,
Silvio