[Mulgara-general] inserts and TQL

Paul Gearon gearon at ieee.org
Tue Sep 22 21:30:09 UTC 2009


I'll have to check this, but I suspect it's because of a
non-compliance with SPARQL when it comes to specifying the graph URI.
(This isn't SPARQL, but it's supposed to be an extension, so it
applies nonetheless)

SPARQL says that the graph URI should not be encoded, meaning that a
query can say something like:

http://localhost:8080/sparql/?default-graph-uri=http://sw.dbmi.pitt.edu/ctsa&query=...

However, I don't understand how this can be done, since it makes it
impossible to know where the graph URI ends, and where the query
starts. It's fine if the graph URI doesn't contain any query
parameters, but if it does then it gets confusing. Either way, it
means that you have to parse the URI for yourself (throwing away the
tools usually used for this).

The way I'm failing to deal with this at the moment, is to require
graph URIs to be encoded in the URL. I've seen unencoded graphs URIs
work, but I haven't ever tried to use an http URI without encoding
before.

Now you're not talking SPARQL, but the encoding requirement is the same. So try:

http://localhost:8080/tql/?graph=http%3A%2F%2Fsw.dbmi.pitt.edu%2Fctsa&s=http%3A%2F%2Fwww.ccmb.med.umich.edu%2Fbiositemap-CTSA-Michigan.rdf&p=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type&o=http%3A%2F%2Fbiositemaps.bioontology.org%2FbiositemapsURL

Incidentally, I just get these encodings by calling:
   java.net.URLEncoder.encode(string_to_be_encoded, "UTF-8")

Regards,
Paul

P.S. I'm at a work meeting this week, so I'll be online less than usual.

On Tue, Sep 22, 2009 at 4:43 PM, Chuck Borromeo <cborromeo3 at yahoo.com> wrote:
> Hello,
>  I am running into an error attempting to insert data into mulgara.  I created 2 graphs in mulgara: http://sw.dbmi.pitt.edu and http://testgraph.  I created the http://sw.dbmi.pitt.edu through the webui interface by loading an RDF file into the graph.  The other graph I created using REST and TQL commands (create <http://testgraph>).
>
> I am trying to use TQL to insert a triple into the http://sw.dbmi.pitt.edu graph.  Here is my URL:
>
> http://localhost:8080/tql/?graph=http://sw.dbmi.pitt.edu/ctsa&s=http://www.ccmb.med.umich.edu/biositemap-CTSA-Michigan.rdf&p=http://www.w3.org/1999/02/22-rdf-syntax-ns#type&o=http://biositemaps.bioontology.org/biositemapsURL
>
> However, I get this error message:
>
> Error 500 Unable to create triple: Could not commit modify: sw.dbmi.pitt.edu
>
> If I use the exact same command on the http://testgraph graph the insert works fine.  Is there a difference between the graphs based on how they were created?
>
> Thanks,
> Chuck
>
>
>
>
> _______________________________________________
> Mulgara-general mailing list
> Mulgara-general at mulgara.org
> http://mulgara.org/mailman/listinfo/mulgara-general
>



More information about the Mulgara-general mailing list