简体   繁体   中英

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?

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.

Another hardcore solution would be to create the pages of the website in RDF (serialized in RDF/XML), and use XSL to generate the HTML version on demand for each page. It really depends on the size of your website.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM