Quantcast

ANN: Groovy SPARQL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

ANN: Groovy SPARQL

Al Baker
Hello all,

I just created a simple Groovy SPARQL API for semantic web style applications, e.g. querying dbpedia.  Groovy was well suited to smoothing over a number of issues that make semantic web programming more difficult, Groovy improved this with features such as mixed type maps, type coercion, and introducing closure calls around common operations.  The end result is being able to query SPARQL endpoints in just a few lines of Groovy code.

This is my first open source project, and hope to expand upon it with a GORM - RDF/SPARQL plug-in, or simple perhaps a simple 'SPARQL' plugin for starters.  It was also a weekend of work, so downloaders beware.

Here is where you can find it:

Blog announcement: http://linkedjava.blogspot.com/
Github page: https://github.com/AlBaker/GroovySparql

Here is my TODO list to grow this capability:
  • Fluent DSL, leveraging Groovy 1.8 features 
  • Pure Java "Templates" for Jena/SPARQL similar to JdbcTemplate/jmsTemplate in Spring
  • Object marshalling and GORM / Spring Data support
  • Sparql / RDF Builder -- still deciding if this is necessary or not, or if it'll fall naturally into the DSL
  • Grails plug-in for the above
  • Testing with triples stores Jena TDB, Stardog, and AllegroGraph being the first three
If anyone is willing to point me in the direction, I could use more information on:

- Open source infrastructure: if this gets some interest, and the code tightens up a bit, I would love to propose it as a "Groovy module" once Groovy core becomes modularized (e.g. presumably SQL would move into a module, a SPARQL could be another).  Is there a way to go about doing this?

- Spring Data internals -- started looking at the various peristers and such, but it's a bit like boiling the ocean.  Checking out into STS 2.70M2 with Gradle support builds about 60% of the projects, but the others have errors.  So right now it's slow going to discern the purpose of each of the API calls and understanding the 'core' of what must be implemented.
 

Regards,
Al Baker

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ANN: Groovy SPARQL

Al Baker
Groovy SPARQL 0.2 is now released, providing an RDF Builder DSL for creating RDF (Jena Models, N3, Turtle, XML, etc)

Now that there are basics on querying and creating RDF data, that'll be enough to create an initial Grails plugin for linked data.  Also thinking of a Gaelyk "RDFizer" that can be used to create little "RDF beacons" that web developers can use to put up appspot "RDF" nodes linked to their sites.

http://linkedjava.blogspot.com/2011/07/groovy-sparql-02-available.html

I know folks are busy working towards Grails 2.0 and Spring Data 1.0, but if someone has a minute to answer some questions on Spring data, then a spring-datastore-jena and GORM plugin are not far behind:

Questions posted on the Spring Forum:  http://forum.springsource.org/showthread.php?111650-Spring-Jena-project-started

Enjoy!

Al Baker


On Mon, Jun 27, 2011 at 1:55 AM, Al Baker <[hidden email]> wrote:
Hello all,

I just created a simple Groovy SPARQL API for semantic web style applications, e.g. querying dbpedia.  Groovy was well suited to smoothing over a number of issues that make semantic web programming more difficult, Groovy improved this with features such as mixed type maps, type coercion, and introducing closure calls around common operations.  The end result is being able to query SPARQL endpoints in just a few lines of Groovy code.

This is my first open source project, and hope to expand upon it with a GORM - RDF/SPARQL plug-in, or simple perhaps a simple 'SPARQL' plugin for starters.  It was also a weekend of work, so downloaders beware.

Here is where you can find it:

Blog announcement: http://linkedjava.blogspot.com/
Github page: https://github.com/AlBaker/GroovySparql

Here is my TODO list to grow this capability:
  • Fluent DSL, leveraging Groovy 1.8 features 
  • Pure Java "Templates" for Jena/SPARQL similar to JdbcTemplate/jmsTemplate in Spring
  • Object marshalling and GORM / Spring Data support
  • Sparql / RDF Builder -- still deciding if this is necessary or not, or if it'll fall naturally into the DSL
  • Grails plug-in for the above
  • Testing with triples stores Jena TDB, Stardog, and AllegroGraph being the first three
If anyone is willing to point me in the direction, I could use more information on:

- Open source infrastructure: if this gets some interest, and the code tightens up a bit, I would love to propose it as a "Groovy module" once Groovy core becomes modularized (e.g. presumably SQL would move into a module, a SPARQL could be another).  Is there a way to go about doing this?

- Spring Data internals -- started looking at the various peristers and such, but it's a bit like boiling the ocean.  Checking out into STS 2.70M2 with Gradle support builds about 60% of the projects, but the others have errors.  So right now it's slow going to discern the purpose of each of the API calls and understanding the 'core' of what must be implemented.
 

Regards,
Al Baker


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ANN: Groovy SPARQL

Graeme Rocher-4
Administrator
Hi Al,

Answers to your questions:

1. spring-data-mapping and spring-data-commons, and the common parts
of spring data graph - will these be merged at some point?

Yes at some point in the future they will be, the mapping support is
primarily being evolved for Grails, and then when its mature enough
will be evolved for Spring


2. spring-data-mapping appears to have all the hooks in it for the
object marshalling, and being able to generate both Java and GORM
support, which is what I'd like to get working with Jena/RDF data

It does, but for 1.0 we are targeting only GORM, with Java support coming later


Is there a good way to build another implementation other than forking
the entire spring-data-mapping repo? I've looked around the Spring
maven repos and such, and I don't see any jars published yet.

The best way is to fork the repo currently. Or checkout the current
repo and install into your local maven cache. We do have releases
published at repo.grails.org but they are probably quite out of date

3. The subclass discriminator in spring-data-mapping, it looks like
most implementations identify a place in their underlying data stores
to store the class name, and then the higher level abstractions of
EntityPersister use that to resolve child classes?


Correct

4. In spring-data-mapping EntityPerister, if the underyling data store
provides indexes - can you return null PropertyIndexers?

Yes

5. AssociationIndexer is used for maintaining an index for the various
associations (1:m, m:m, etc)? A lot of the implementations return type
Object for the keys - can you provide an example of what is an actual
key - string/integer column in SQL, string key in mongodb, etc?

Best thing to do is look at the other implementations. For example
MongoDB implementation supports ObjectId, String or Long for ids


6. What is the 'family' on persistent entities? is this similar to a
schema governing a table set within a logical RDBMS? Can family be
null?

Yes

7. Is there a test suite for spring-data-mapping? The individual sub
projects don't have any JUnit, am I looking in the right place? I'm
starting to implement some of these interfaces, and I can get the top
level gradle build to compile, but I'd like to actually see some of
these interfaces in action and run through some tests (which would
also be helpful for debugging/learning as well).

Yes there is a TCK that is defined in
https://github.com/SpringSource/spring-data-mapping/tree/master/grails-datastore-gorm-tck

This gets run against every project when you run ./gradlew test as
long as it provides a Setup.groovy. See for example

https://github.com/SpringSource/spring-data-mapping/blob/master/grails-datastore-gorm-mongo/src/test/groovy/org/grails/datastore/gorm/Setup.groovy

Cheers

On Wed, Jul 13, 2011 at 9:47 AM, Al Baker <[hidden email]> wrote:

> Groovy SPARQL 0.2 is now released, providing an RDF Builder DSL for creating
> RDF (Jena Models, N3, Turtle, XML, etc)
>
> Now that there are basics on querying and creating RDF data, that'll be
> enough to create an initial Grails plugin for linked data.  Also thinking of
> a Gaelyk "RDFizer" that can be used to create little "RDF beacons" that web
> developers can use to put up appspot "RDF" nodes linked to their sites.
>
> http://linkedjava.blogspot.com/2011/07/groovy-sparql-02-available.html
>
> I know folks are busy working towards Grails 2.0 and Spring Data 1.0, but if
> someone has a minute to answer some questions on Spring data, then a
> spring-datastore-jena and GORM plugin are not far behind:
>
> Questions posted on the Spring Forum:
> http://forum.springsource.org/showthread.php?111650-Spring-Jena-project-started
>
> Enjoy!
>
> Al Baker
>
>
> On Mon, Jun 27, 2011 at 1:55 AM, Al Baker <[hidden email]> wrote:
>>
>> Hello all,
>>
>> I just created a simple Groovy SPARQL API for semantic web style
>> applications, e.g. querying dbpedia.  Groovy was well suited to smoothing
>> over a number of issues that make semantic web programming more difficult,
>> Groovy improved this with features such as mixed type maps, type coercion,
>> and introducing closure calls around common operations.  The end result is
>> being able to query SPARQL endpoints in just a few lines of Groovy code.
>>
>> This is my first open source project, and hope to expand upon it with a
>> GORM - RDF/SPARQL plug-in, or simple perhaps a simple 'SPARQL' plugin for
>> starters.  It was also a weekend of work, so downloaders beware.
>>
>> Here is where you can find it:
>>
>> Blog announcement: http://linkedjava.blogspot.com/
>> Github page: https://github.com/AlBaker/GroovySparql
>>
>> Here is my TODO list to grow this capability:
>>
>> Fluent DSL, leveraging Groovy 1.8 features
>> Pure Java "Templates" for Jena/SPARQL similar to JdbcTemplate/jmsTemplate
>> in Spring
>> Object marshalling and GORM / Spring Data support
>> Sparql / RDF Builder -- still deciding if this is necessary or not, or if
>> it'll fall naturally into the DSL
>> Grails plug-in for the above
>> Testing with triples stores Jena TDB, Stardog, and AllegroGraph being the
>> first three
>>
>> If anyone is willing to point me in the direction, I could use more
>> information on:
>>
>> - Open source infrastructure: if this gets some interest, and the code
>> tightens up a bit, I would love to propose it as a "Groovy module" once
>> Groovy core becomes modularized (e.g. presumably SQL would move into a
>> module, a SPARQL could be another).  Is there a way to go about doing this?
>>
>> - Spring Data internals -- started looking at the various peristers and
>> such, but it's a bit like boiling the ocean.  Checking out into STS 2.70M2
>> with Gradle support builds about 60% of the projects, but the others have
>> errors.  So right now it's slow going to discern the purpose of each of the
>> API calls and understanding the 'core' of what must be implemented.
>>
>>
>> Regards,
>> Al Baker
>>
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...