Re: Replacing URIs via SPARQL update

hi, 

you can also create a custom sparql function to filter for certain
namespaces.

here are two examples for openrdf sesame [1] [2].
i'm pretty sure such function are also easily implemented with other
stores..

wkr turnguard

[1] http://www.openrdf.org/forum/mvnforum/viewthread?thread=1816
[2]
http://rivuli-development.com/further-reading/sesame-cookbook/creating-custom-sparql-functions/


On Thu, 2012-08-16 at 15:28 +0200, Carsten Keßler wrote:
> Dear all,
> 
> 
> is it possible to replace URIs in a store, similar to the approach in
> example 5 given here:
> http://www.w3.org/TR/sparql11-update/#deleteInsert ?
> 
> 
> The catch is that I don't want to replace single URIs, but all URIs in
> a certain namespace. Say I have 
> 
> 
> http://some.domain.org/myClassA
> http://some.domain.org/myClassB
> http://some.domain.org/myPropertyA
> http://some.domain.org/myPropertyB
> etc.
> 
> 
> and I want to change them all to  
> 
> 
> http://another.domain.org/myClassA
> http://another.domain.org/myClassB
> http://another.domain.org/myPropertyA
> http://another.domain.org/myPropertyB
> etc.
> 
> 
> Finding the URIs to replace via FILTER and regex is no problem, but
> I'm wondering whether there is a way to make sure that the
> class/property-specific parts of the URIs are maintained and copied
> over to the new URIs?
> 
> 
> Any ideas appreciated!
> 
> 
> Thanks,
> Carsten
> 
> 
> ---
> Carsten Keßler  |  http://carsten.io
> 
> 
> Semantic Interoperability Lab | http://musil.uni-muenster.de
> Institute for Geoinformatics | http://ifgi.uni-muenster.de
> University of Münster | http://www.uni-muenster.de
> 
> 
> 
> 

-- 
| Jürgen Jakobitsch, 
| Software Developer
| Semantic Web Company GmbH
| Mariahilfer Straße 70 / Neubaugasse 1, Top 8
| A - 1070 Wien, Austria
| Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22

COMPANY INFORMATION
| web       : http://www.semantic-web.at/
| foaf      : http://company.semantic-web.at/person/juergen_jakobitsch
PERSONAL INFORMATION
| web       : http://www.turnguard.com
| foaf      : http://www.turnguard.com/turnguard
| g+        : https://plus.google.com/111233759991616358206/posts
| skype     : jakobitsch-punkt
| xmlns:tg  = "http://www.turnguard.com/turnguard#"

Received on Friday, 17 August 2012 18:23:57 UTC