Peter Ansell wrote:
----- Original Message ----

From: Kingsley Idehen <kide...@openlinksw.com>
To: Peter Ansell <p_ans...@yahoo.com>
Cc: virtuoso-users@lists.sourceforge.net
Sent: Tuesday, 17 February, 2009 12:25:17 AM
Subject: Re: [Virtuoso-users] constructing URI's from literals

Peter Ansell wrote:
----- Original Message ----
From: Kjetil Kjernsmo To: virtuoso-users@lists.sourceforge.net
Sent: Monday, 16 February, 2009 6:01:17 PM
Subject: Re: [Virtuoso-users] constructing URI's from literals

On Monday 16 February 2009 06:23:59 Peter Ansell wrote:
Hi,

Is there anyway with SPARQL and Virtuoso to create a URI in a result when
it is stored as a literal in the triplestore?
I don't know if Virtuoso has something, but looking at
http://www.w3.org/TR/rdf-sparql-query/#FunctionMapping
it appears that you cannot cast from string to URI, only from URI to string.
I was hoping that wasn't the only case and that there was a virtuoso extension
to allow people to do the reverse if it is reasonable. The resulting URI would only be used in the output, ie, not in a further graph match, so it doesn't sound technically unfeasible from a naive viewpoint.
Peter,

I think Ivan's example covers the output scenario (i.e, the last CONSTRUCT example).

For instance does the following demonstrate the end product of your use case i.e., what you would like to achieve output wise e.g. a URI for a specific CNAME without changing the actual original Bio2Rdf URIs in the Quad Store, a kind of reverse re-write rule:

http://linkeddata.openlinksw.com:8891/geneid:1043922 (this URI doesn't exist in the Quad store it is simply used as the mechanism for local de-referencing of using the local data in the Quad store which has bio2rdf cname URIs).

That isn't completely what I want, but that would be useful in some cases. I was more wanting to utilise the xsd:anyURI typed literal's as the subject of RDF statements that come out as a result of a construct (or in your example it might be a describe), and was unable to do so without the Virtuoso SPARQL extensions.
If you end up with a bona fide URI without the extensions then fine :-)

My point (ditto Ivan's via example) is that an IRI is a native Virtuoso type. Thus, you can use Virtuoso functions to cast to and from the IRI type.
My research work is around providing the URI based access to multiple endpoints 
based on deconstructing the URI and figuring out what REST service the URI 
refers to (in your example with a custom URI it would be a simple construct but 
I view that as a general case of a broader framework).
My point was solely about how to perform local de-referencing by casting using a BIF function in a construct.

As for the larger aspects of your framework, I don't really know what you are trying to achieve, and will only do so once I have time to digest it from the view point of a problem that is perceived unsolvable via current Linked Data practices etc. Thus, at the current time, I don't really understand what: "...general case of a broader framework" means.

 The endpoints aren't necessarily SPARQL, and the user may not always want rdf, 
that is just part of the framework I guess. It is also nice to be able to have 
more than one function attached to a particular REST URI, for instance I want 
to automagically retrieve the tags I have put on an item whenever I dereference 
the item's URI, see the current bio2rdf servers for that functionality.
As per above, I need to understand the end game here, and that comes down to studying the problem etc.. This I can only do if you get stuck i.e., you reach points where it appeaars you cannot achieve what you desire.
If you dereference http://qut.bio2rdf.org/geneid:1043922 for instance you should get a document which contains triples related to http://bio2rdf.org/geneid:1043922 and any tags which may have been applied to that item...
What is a "tag" in your context? By this I mean what type of "Thing" is a tag? Is it formally defined by a vocabulary or ontology or just a collection of literals?

one of which I made up just now for demonstration purposes. Even though there 
is access provided to the specific mirror via that URI, in order to keep the 
URI's which people use identical I would prefer that at least some single 
domain name was used for all of the bio2rdf URI's, but if people are utilising 
the system completely privately, and understand that other people will 
generally be communicating using the http://bio2rdf.org/ URI's then it is fine 
for them to have personal optimisations IMHO.
To the degree relevant, <http://bio2rdf.org> URIs are untouched. This is why when you encounter a page that provides a local description of a Bio2Rdf resource, you get an owl:sameAs link to the entity's Bio2Rdf URI. If anything this serves to keep Bio2Rdf URI visibility. I don't understand how you can perceive this as anything else but that.
Note that currently we are having troubles with the network being overloaded 
and we don't have infrastructure to setup the mirrors in enough places so that 
the public traffic will fall sufficiently, hence the geneid may not actually 
resolve to the record if we are trying to stabilise the network by not forcing 
more requests on the geneid sparql endpoint for a little while.
The way you solve this problem is by having many replicas that do what I am trying to outline with both our EC2 AMIs and our own mirror. Localize the de-referencing and use owl:sameAs to keep the canonical URI is view. This is how you reduce the load ultimately. You will see the full effect of all of this when we put out the LOD cloud instance which has Bio2Rdf, Uniprot, NeuroCommons, DBpedia, MusicBrainz, PingTheSemanticWeb, and lots of other data sets.

Kingsley
Cheers,

Peter



      Make Yahoo!7 your homepage and win a trip to the Quiksilver Pro. Find out 
more



--


Regards,

Kingsley Idehen       Weblog: http://www.openlinksw.com/blog/~kidehen
President & CEO OpenLink Software Web: http://www.openlinksw.com





Reply via email to