Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Spring Data RDF

  1. #1
    Join Date
    Feb 2006
    Location
    Randburg, South Africa
    Posts
    12

    Question 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. #2
    Join Date
    Feb 2006
    Location
    Randburg, South Africa
    Posts
    12

    Default 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. #3
    Join Date
    Apr 2006
    Location
    Dresden, Germany
    Posts
    483

    Default

    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. #4
    Join Date
    Feb 2006
    Location
    Randburg, South Africa
    Posts
    12

    Default 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
    Code:
    <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns="http://www.springframework.org/schema/beans"
    	xmlns:rdf="http://www.springframework.org/schema/data/rdf"
    	xsi:schemaLocation="http://www.springframework.org/schema/data/rdf http://www.springframework.org/schema/data/rdf/spring-rdf-1.0.xsd
    		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
    	<bean id="modelFactory" class="org.ontoware.rdf2go.RDF2Go" factory-method="getModelFactory" />
    	<rdf:repositories base-package="org.springframework.data.rdf.simple" model-factory-ref="modelFactory">
    	</rdf:repositories>
    </beans>
    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="http://www.springframework.org/schema/data/repository"

  5. #5
    Join Date
    Feb 2006
    Location
    Randburg, South Africa
    Posts
    12

    Default 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. #6
    Join Date
    Feb 2006
    Location
    Randburg, South Africa
    Posts
    12

    Default

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

  7. #7
    Join Date
    Apr 2006
    Location
    Dresden, Germany
    Posts
    483

    Default

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

  8. #8
    Join Date
    Feb 2006
    Location
    Randburg, South Africa
    Posts
    12

    Default

    My first foray into the world of git.

    git://github.com/corneil/spring-data-rdf.git

  9. #9
    Join Date
    Apr 2006
    Location
    Dresden, Germany
    Posts
    483

    Default

    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. #10
    Join Date
    Feb 2006
    Location
    Randburg, South Africa
    Posts
    12

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •