--
You received this message because you are subscribed to the Google Groups "VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo-tech+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/c62b3f06-663a-4798-98ab-5bc6a7fdc2de%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo...@googlegroups.com.
--------------------------------------------------------------------------------------------------------------------------------------------- | pred | obj | graph | ============================================================================================================================================= | <http://www.w3.org/2000/01/rdf-schema#label> | "Directeur.trice de recherches"@fr | <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> | | <http://www.w3.org/2000/01/rdf-schema#label> | "Research professor"@en | <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> | ---------------------------------------------------------------------------------------------------------------------------------------------
RDF::Statement(statement.subject, RDF::RDFS.label, statement.object.to_s),
RDF::Statement(statement.subject, RDF::RDFS.label, RDF::Literal.new(statement.object.to_s)),
RDF::Statement(statement.subject, RDF::RDFS.label, RDF::Literal.new(statement.object.to_s, language: :fr)),
RDF::Statement(statement.subject, RDF::RDFS.label, RDF::Literal.new(statement.object.to_s, language: :fr, datatype: RDF.langString)
RDF::Statement(statement.subject, RDF::RDFS.label, '"'+statement.object.to_s+'"@fr')
Vivo update API doesn't seem to support the "DELETE WHERE" clause, which would be very convenient.
Joachim
Hi Joachim,
Not sure what might have happened with your initial CONSTRUCT-based deletion. The usual culprit when statements with literal values fail to delete is a character encoding mismatch somewhere between client and VIVO or VIVO and triple store, but the literals you show seem to include only ASCII characters where this wouldn’t likely be the issue.
I have used DELETE WHERE without problems. One thing I would double check is that you’re explicitly specifying the graph to query and modify, in this case kb-2. You should be able to do this by adding WITH <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> to the top of the query, but looking at my own code I see that I actually use the explicit form, e.g.
DELETE {
GRAPH <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> { <uri:something> ?p ?o }
} WHERE {
GRAPH <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> { <uri:something> ?p ?o }
}
Brian
To unsubscribe from this group and stop receiving emails from it, send an email to
vivo-tech+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/vivo-tech/97bd557c-d387-44c1-a45d-e700803d4405%40googlegroups.com.
Hi Joachim,
Not sure what might have happened with your initial CONSTRUCT-based deletion. The usual culprit when statements with literal values fail to delete is a character encoding mismatch somewhere between client and VIVO or VIVO and triple store, but the literals you show seem to include only ASCII characters where this wouldn’t likely be the issue.
I have used DELETE WHERE without problems. One thing I would double check is that you’re explicitly specifying the graph to query and modify, in this case kb-2. You should be able to do this by adding WITH <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> to the top of the query, but looking at my own code I see that I actually use the explicit form, e.g.
DELETE {
GRAPH <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> { <uri:something> ?p ?o }
} WHERE {
GRAPH <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> { <uri:something> ?p ?o }
}
Brian
From: vivo...@googlegroups.com <vivo...@googlegroups.com> On Behalf Of J. Dornbusch
Sent: Thursday, April 9, 2020 9:13 AM
To: VIVO Tech <vivo...@googlegroups.com>
Subject: Re: [vivo-tech] How to remove people from Vivo
Hi Benjamin
Following your advice I have written custom Sparql CONSTRUCT requests for the removal of people. It works well except that a few labels remain on "ghost" objects.
---------------------------------------------------------------------------------------------------------------------------------------------| pred | obj | graph |=============================================================================================================================================
| <http://www.w3.org/2000/01/rdf-schema#label> | "Research professor"@en | <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> |---------------------------------------------------------------------------------------------------------------------------------------------
I tried to rebuild the "label" statements provided by the Sparql CONSTRUCT query.
But whatever I send to DELETE DATA through my Sparql client (Ruby) has no effect on those labels :
<http://data.ehess.fr/individual/xxxxxxxxxxx> <http://www.w3.org/2000/01/rdf-schema#label> "Directeur.trice de recherches" .
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/97bd557c-d387-44c1-a45d-e700803d4405%40googlegroups.com.
Interesting. So it’s not even getting to the point of trying to process your query, since it isn’t finding it in the first place. Looking at the SparqlUpdateApiController I see that it’s expecting the update string to be sent as the value of the „update” parameter and throwing an exception if it’s not found. That is, it appears that VIVO only supports the „update via URL-encoded POST” option described in the 1.1 spec https://www.w3.org/TR/sparql11-protocol/#update-operation and not the second „update via POST directly” option. The former (application/x-www-form-urlencoded with explicit update parameter) is the only way I’ve ever done it.
First, however, are you sure your client is even trying to do an update rather than a query? The content type for direct POST updates is listed as „application/sparql-update”, not „application/sparql-query".
To unsubscribe from this group and stop receiving emails from it, send an email to
vivo-tech+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/vivo-tech/f8ad236b-2f81-411b-a0f1-14511b66c977%40googlegroups.com.
This example removes the modified statement.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/VI1P194MB0302EC7C3D0F7400F5C3F45BD2C10%40VI1P194MB0302.EURP194.PROD.OUTLOOK.COM.