Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the Best Practices in developing semantic application using Jena & RDF

Semantic Web: Best Practices

I am new to Semantic Web, in my application, I'm using Protege,RDF,SPARQL,Jena,Virtuaso. My concern is, in popular Java Frameworks (like Hibernate), we have POJO layer, in this Semantic Web application can I have the same thing? is it a good practice? I want to know, Jena is providing me the connection of RDF and Model, but what are the best practices to design the whole application? In front end I will use simple HTML and JS, so servlets will be there. Also, I want to know the standards of representing an ontology created in Protege in Java (without using OntModel, because I am not using OWL).

like image 782
pc_ Avatar asked Oct 05 '11 04:10

pc_


1 Answers

As in any Web application you will have to make architectural decisions for three or more layers.

Storage layer

Most of the tools for ontology manipulation (Jena, Virtuoso, Sesame, Protege) offers a number of ways to store your data: in-process (in memory) models, RDB model (in RDBMS of your choice), native format storage. The choice depends on your environment constrains and performance/scalability requirements.

Manipulation layer

Selecting a solution here brings always some trade-off between level of abstraction and expressiveness. This is because it's hard to map all ontology constructs to object-oriented constructs.

Given that you may choose between:

  • Jastor or JenaBean that generates Java POJO classes corresponding to your ontology classes, and
  • Jena Model/OntModel, or Protege API to minipulate RDF, OWL, and frame-based ontologies on a lower level.

Jastor wraps Jena OntModel or Model but hides Jena internals from you, so if you find it limited you may always extend it. Note, Jastor seems not to be maintained any more.

Representation layer

Manipulation layer technologies let's you hide ontology internals from the representation view, so you may use traditional technologies like JSP to produce HTML output. Still, for some problems it may be convenient for you to emit model in RDF/XML format and apply XSL(T)-like transformation to it. I found rx4RDF, a Python-based tool, useful for supporting this kind of transformations.

Disclaimer: I worked 6 years ago with the mentioned technologies. Things may have changed in the meantime. Hence:

  • I encourage you to see architectures of different existing Semantic Web applications and find the one that suits your problem. For instance here.
  • Although lot's of work has been done in the field of Semantic Web tooling, this is still nichè technology. To target better your question, you may try to ask your question on product mailing lists and research fora.
  • Also, W3C maintains pretty long list of tools for RDF processing.
like image 88
dzieciou Avatar answered Sep 20 '22 01:09

dzieciou