URIImpl

6 views
Skip to first unread message

Laurent

unread,
Mar 11, 2010, 9:46:39 AM3/11/10
to RDF2Go and RDFReactor (part of semweb4j)
Dear all,

I have a problem with RDF2Go and URIImpl meaning :

In Sesame API, URIImpl is checked as a java URL. In RDF2Go
implementation, I see that URIImpl is checked at construction as java
URI. Java URI respect the URI RFC (http://www.ietf.org/rfc/
rfc2396.txt) which says among other that relative path is an URI.

The problem is the following :

// Using RDF2Go APi
URI myURI = new URIImpl("oooops");
// No exception with RDF2Go API, Exception with Sesame API

When URIImpl is created I get no exception with RDF2Go for oooops
value because it is a URI conform to RFC2396. Now, if I use it for a
query, when dataStore handle query, I will get exception at the
datastore level.
Suppose I send queries through the network, I will need to send query
in order to detect error at datastore level whereas I can detect it
when the URI is created if the verification is correct and throws
exception.

Who has wrong ? Sesame or RDF2Go ?

Kind Regards

Laurent

Max Voelkel (FZI Karlsruhe)

unread,
Mar 21, 2010, 12:06:45 PM3/21/10
to Laurent, RDF2Go and RDFReactor (part of semweb4j)
Hi, unfortunately, the triple store vendors do not  use the same rules for URIs. I don't remember the details. Anyway, instead of re-implementing URI-syntax rules, RDF2Go uses the underlying triple store.

The correct way to do this is Model.createURI(... ) as defined in [1]

[1] http://mavenrepo.fzi.de/semweb4j.org/site/rdf2go.api/apidocs/org/ontoware/rdf2go/model/ModelValueFactory.html#createURI%28java.lang.String%29

Regards,
Max


--
You received this message because you are subscribed to the Google Groups "RDF2Go and RDFReactor (part of semweb4j)" group.
To post to this group, send email to semw...@googlegroups.com.
To unsubscribe from this group, send email to semweb4j+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/semweb4j?hl=en.




--
      Max Völkel
      voe...@fzi.de | http://Xam.de
--
FZI Forschungszentrum Informatik an der Universität Karlsruhe
Haid-und-Neu-Str. 10-14, D-76131 Karlsruhe
Tel.: +49-721-9654-0, Fax: +49-721-9654-959
Stiftung des bürgerlichen Rechts, Stiftung Az: 14-0563.1 Regierungspräsidium Karlsruhe
Vorstand: Prof. Dr.-Ing. Rüdiger Dillmann, Dipl. Wi.-Ing. Michael Flor,
Prof. Dr. rer. nat. Dr. h.c. Wolffried Stucky, Prof. Dr. rer. nat. Rudi Studer
Vorsitzender des Kuratoriums: Ministerialdirigent Günther Leßnerkraus

Laurent

unread,
Mar 22, 2010, 4:59:59 AM3/22/10
to RDF2Go and RDFReactor (part of semweb4j)
Ok, but suppose I have two machines A and B, and the repository (so,
the model too) is on B. It supposes I retrieve the model from B in
order to create an URI on A. It is really not practical or effective.
Is there no way in order to perform check at creation or with a static
method ?

On 21 mar, 17:06, "Max Voelkel (FZI Karlsruhe)" <voel...@fzi.de>
wrote:


> Hi, unfortunately, the triple store vendors do not  use the same rules for
> URIs. I don't remember the details. Anyway, instead of re-implementing
> URI-syntax rules, RDF2Go uses the underlying triple store.
>
> The correct way to do this is Model.createURI(... ) as defined in [1]
>

> [1]http://mavenrepo.fzi.de/semweb4j.org/site/rdf2go.api/apidocs/org/onto...


>
> Regards,
> Max
>
>
>
> On Thu, Mar 11, 2010 at 15:46, Laurent <laurent.pellegr...@gmail.com> wrote:
> > Dear all,
>
> > I have a problem with RDF2Go and URIImpl meaning :
>
> > In Sesame API, URIImpl is checked as a java URL. In RDF2Go
> > implementation, I see that URIImpl is checked at construction as java
> > URI. Java URI respect the URI RFC (http://www.ietf.org/rfc/

> > rfc2396.txt <http://www.ietf.org/rfc/%0Arfc2396.txt>) which says among


> > other that relative path is an URI.
>
> > The problem is the following :
>
> > // Using RDF2Go APi
> > URI myURI = new URIImpl("oooops");
> > // No exception with RDF2Go API, Exception with Sesame API
>
> > When URIImpl is created I get no exception with RDF2Go for oooops
> > value because it is a URI conform to RFC2396. Now, if I use it for a
> > query, when dataStore handle query, I will get exception at the
> > datastore level.
> > Suppose I send queries through the network, I will need to send query
> > in order to detect error at datastore level whereas I can detect it
> > when the URI is created if the verification is correct and throws
> > exception.
>
> > Who has wrong ? Sesame or RDF2Go ?
>
> > Kind Regards
>
> > Laurent
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "RDF2Go and RDFReactor (part of semweb4j)" group.
> > To post to this group, send email to semw...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > semweb4j+u...@googlegroups.com<semweb4j%2Bunsu...@googlegroups.com>


> > .
> > For more options, visit this group at
> >http://groups.google.com/group/semweb4j?hl=en.
>
> --
>       Max Völkel

>       voel...@fzi.de |http://Xam.de

Max Völkel (GMail)

unread,
Mar 22, 2010, 6:22:01 AM3/22/10
to Laurent, RDF2Go and RDFReactor (part of semweb4j)
To be sure that the underlying triple store will accept a URI, it must be created by this triple store.
Due to the way Java interfaces work, we cannot use a static methode.
The model instance serves as a Factory for all kinds or objects (URI, BlankNode, Literal,...).

I suppose creating a Model instance on machine A is not too much overhead. It is just required that machine A uses the same underlying triple store as machine B, I mean, the same implementation classes, not necessary the same instance.

If even creating a Model instance (which can remain empty) is too much overhead, we could add a "Factory" which you can get via RDF2Go.

Regards,
Max

To unsubscribe from this group, send email to semweb4j+u...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/semweb4j?hl=en.




--
      Max Völkel
      voe...@fzi.de | http://Xam.de
Reply all
Reply to author
Forward
0 new messages