Announcement Announcement Module
No announcement yet.
Spring Data RDF Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data RDF

    I am interested in creating a Spring Data RDF implementation.
    I have identified the RDFBeans and RDF2Go project as a reasonable starting point.

    RDFBeans used RDF2Go and provides mapping from RDF statements to annotated Java objects.
    RDF2Go provides and abstraction to multiple versions of implementations of Jena and Sesame.
    Jena and Sesame are the to widely used APIs for accessing RDF stores. Most store provide implementations of either one or both APIs.

    I have used Spring Data JPA on a recent project and understand the working as a user and I also created some custom methods etc.
    After working through the code for Spring Data JPA and Spring Data Neo4J I am still trying to figure out the various patterns. It seems as if Spring Data Commons have gone through some major changes and some new patterns have been added recently.
    I need some pointers on how to go about putting together an RDFRepository.
    What is needed to instantiate the repository implementation?
    How does the find method queries work?
    What support is provided by spring Data Commons?

    I have started some work on RDFBeans to remove the need for binding information in the data store.
    I will continue my investigation of the existing code and focus on Spring Data JPA since I understand it best along with the underlying JPA.

    Anybody who would like to collaborate please pitch in.

  • #2
    made some progress

    I created:
    • interface RDFRepository<T, ID extends Serializable> extends CrudRepository<T, ID>
    • class RDFRepositoryFactory extends RepositoryFactorySupport
    • SimpleRDFRepository<T, ID extends Serializable> implements RDFRepository<T, ID>
    • and some unit tests.

    now I'm trying to figure out the configuration part to bootstrap the factory.


    • #3
      You're on the right track already. As these questions have tended to pop up more often recently I am about to prepare an implementation guideline probably filling the black spot of the README missing in the Spring Data Commons Github repository. Give me time until early next week and you'll get a complete write-up of the interesting bits and pieces.


      • #4
        XML error

        So far I have also added
        • class RdfRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends RepositoryFactoryBeanSupport<T, S, ID>
        • class SimpleRdfRepositoryConfiguration extends RepositoryConfig<SimpleRdfRepositoryConfiguration. RdfRepositoryConfiguration, SimpleRdfRepositoryConfiguration>
        • class RdfRepositoryNameSpaceHander extends NamespaceHandlerSupport
        • class RdfRepositoryConfigDefinitionParser extends AbstractRepositoryConfigDefinitionParser<SimpleRdf RepositoryConfiguration, RdfRepositoryConfiguration>

        I have run into a very silly problem I cannot resolve with the bean XML
        <beans xmlns:xsi="" xmlns:context="" xmlns=""

        	<bean id="modelFactory" class="org.ontoware.rdf2go.RDF2Go" factory-method="getModelFactory" />
        	<rdf:repositories base-package="" model-factory-ref="modelFactory">
        org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'rdf:repositories'.

        I even added a spring.schemas file but to no avail.
        I get the same message for <repository:repositories> with xmlns:repository=""


        • #5
          Project process

          On a slightly different topic:

          At what point would SpringSource be interested in taking the project into the fold?
          How does the process work?


          • #6
            I have a working CrudRepository!
            Do you want to take a look at the code?


            • #7
              Awesome! Do you have a GitHub repo to look at it?


              • #8
                My first foray into the world of git.



                • #9
                  Cool, thanks. I'll have a look and ask around internally to find out how we're going to deal with complete module contributions from the community. I assume we'll go down a similar route as Spring Social does for their connector projects.


                  • #10
                    Now to get the QueryDSL stuff going.
                    I need to do some more investigation on SPARQL to determine how to return graphs of objects instead of simple results.


                    • #11
                      As I investigate the QueryDSL stuff I come across mysema rdfbean project. Which has done a lot of the same as I am trying with Spring Data RDF.
                      With some refactoring we should be able to incorporate rdfbean instead of RDFBeans and gain the QueryDSL support at the same time.


                      • #12
                        refactored to support mysema.rdfbean.
                        Some issues remain outstanding with basic crud.
                        RDFBeans had elegant mechanism for dealing with the subject. created explicit UID for now.
                        RDFBeans support attributes occuring many times and could map to array. mysema.rdfbean requires a collection.


                        • #13
                          very intresting topic, is there a working example app?

                          thank you