I'm not aware of a good, definitive source for an introduction to
SPARQL. (Anyone have suggestions?) However there are a lot of
resources around (Google search recommended).

There's always the standard: http://www.w3.org/TR/rdf-sparql-query/

The Jena ARQ page also has some Documentation and examples:
http://jena.sourceforge.net/ARQ/

SPARQL became a W3C recommendation in Jan 2008, but the basics were
pretty well-established long before that, so anything from 2005 on
will be pretty accurate.

-- Scott

On Jan 22, 1:07 pm, Scott Henninger <[email protected]>
wrote:
> Forgot to add that if you use INSERT instead of CONSTRUCT in the
> example I gave, then the triple would be asserted directly.  I.e.
> CONSTRUCT only returns the triples.  Just to be clear, the reason for
> the difference is that CONSTRUCT is part of the current SPARQL
> standard, and INSERT is an add-on from the Jena ARQ.
>
> -- Scott
>
> On Jan 22, 12:43 pm, Joseph Shea <[email protected]> wrote:
>
> > Hello and thank you for the reply. That sort of helped...I'm able to
> > get the correct results from that query that I posted earlier, but the
> > problem is that I don't know how to actually change the string field
> > to a date field. Honestly, I'm not too familiar with TopBraid and
> > SPARQL, but I figure that this would be a good way to learn.
>
> > As for the "Converting a string to a class", my explanation was rather
> > poor. I'll try to use an example. Say I have a collection of surveys
> > that are instances of class "Survey". These surveys have names or ID
> > numbers on them (some unique identifier) and I want to use the surveys
> > to populate the class "Person". Hopefully that makes sense.
>
> > Thank you for any and all help.
>
> > On 1/22/09, Holger Knublauch <[email protected]> wrote:
>
> > > Hi Joseph,
>
> > > BTW SPARQL has a built-in feature to convert between XSD datatypes, e.g.
>
> > >    LET (?string := "2008-01-02") .
> > >    LET (?date := xsd:date(?string))
>
> > > binds ?date with "2008-01-02"^^xsd:date.
>
> > > I don't know what you mean with converting a date to a class, but you
> > > can convert a URI string to a class using the function smf:resource(?
> > > uri). You could then use smf:buildURI() to construct a valid URI from
> > > a date.
>
> > > I hope that helps, if not please clarify.
>
> > > Holger
>
> > > On Jan 22, 2009, at 6:45 AM, Joseph Shea wrote:
>
> > >> Hello all. I'm relatively new to TopBraid. I'm trying to convert
> > >> strings into classes, or even dates for that matter....I'm not really
> > >> sure how to do that, but I tried converting a string into a date, and
> > >> the following SPARQL query seemed to have done the job, though it was
> > >> never changed. Any advice on this, or how to convert strings into
> > >> classes? (Websites and tutorials would also be appreciated)
>
> > >> SELECT  *
> > >>        WHERE {
> > >>                ?person :HasBirthdate ?Birthdate .
> > >>                LET (?newBirthdate := smf:cast(?Birthdate, xsd:date)) .
> > >>        }
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to