I want to develop a triple store for Jena. How can I integrate it to Jena?

Now I have these references:

1. Jena, TDB,SDB source code

2. The SPI portion of Jena api document

3. Jena document, specifically I think it is about assemblor 4. hbase-rdf project source code

5. JenaSesameModel source code

As my understanding, I think I should:

1.implement some of the interface in SPI package:

  1. Write my triple store and call triple store from SPI implementation in point 1

  2. Write assembler to assemble my class to Jena and create them in this way:

    Model spec = FileManager.get().loadModel( "examples.ttl" ); Resource root = spec.createResource( spec.expandPrefix( "eg:opening-example" ) ); Model m = Assembler.general.openModel( root );

Is that right? Are there any other information? Thank you.

asked 11 Jan '13, 14:11

Yan's gravatar image

accept rate: 0%

If you just want triples, you only need to implement Graph and there is GraphBase that provides defaults for most things.

If you want quads/named graph, implement DatasetGraph (many partial implementations - choose the one for a base class that fits your style, e.g. separate graphs vs quads).

Everything works at that point.

If you want performance for SPARQL, you also need to implement some of the operations in OpExecutor to exploit the internal abilities of your store.

An assemblers is a bonus - it would allow you to plug into Fuseki.


answered 11 Jan '13, 15:56

AndyS's gravatar image

AndyS ♦
accept rate: 31%

Thank you for your answer. But if I just implement Graph without assemblers and there are many previous implementations, how does Jena find my Graph class when initiating a Model instance ?

(11 Jan '13, 16:52) Yan Yan's gravatar image

You create it anyway you want then call ModelFactory.createModelForGraph(yourGraph)

(12 Jan '13, 09:15) AndyS ♦ AndyS's gravatar image

I found Jena SPI in action and advised to implement OpExecutor, but I am not sure about it because it was in 2011 and I think the interface may have been changed a lot.


answered 11 Jan '13, 15:04

Yan's gravatar image

accept rate: 0%

edited 11 Jan '13, 15:05


Not really, the interface is pretty stable over time, for the most part and the basic approach should be the same. Be sure to check out the examples in the ARQ distribution, they helped me a lot.

(12 Jan '13, 14:46) harschware ♦ harschware's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 11 Jan '13, 14:11

Seen: 800 times

Last updated: 12 Jan '13, 14:46