Search code examples
javaphprdfjenasemantic-web

Storing all data of a website on Apache Jena as RDF?


I am trying to build a web site build on semantic technologies. It is a CMS, to make it simple lets say it's a blog. I need to be able to do simple CRUD operations. All data will be saved on Jena like blog posts, user informations, blog categories etc.

I have a php system. Here is the path what i am planing to follow:

  1. Use Apache Jena as RDF Store
  2. Use Apache Jena for storing and retrieving the data.
  3. Write a web service on java
  4. Communicate through web service with PHP in JSON format to view, control the data.

My main focus is to build a web site on semantic technologies. Is there anything wrong with my approach?

If not the main question is when a user made a blog post how will i create a relation with the blog post and user. With mysql it was just a froeign key. How can i make a relations on Jena between new blog post and existing user?


Solution

  • I can't see anything wrong with your approach. Maybe I would suggest to use JSON-LD as an interchange format, because Jena can read it and write it directly instead of having to create your own converters to RDF (see https://jena.apache.org/documentation/io/).

    Regarding the modeling question, I strongly recommend to have a look at the SIOC vocabulary (http://rdfs.org/sioc/spec/), which aims to represent exactly what you are looking for, and more.