Apache Isis and RDF – could be…

An interesting question came in on the Apache Isis mailing list, regarding Isis and its support for building apps that interact with RDF and semantic web technologies:

I’m currently developing some kind of knowledge management application using RDF and such semantic web related technologies. I’ve found Isis and thought it will be great to use it as a a front end while developing and maybe I think it as a service layer given the REST functionality that is provided.

The question is given that I have no previous knowledge of the object types and the properties I should handle because the schema is dynamic, I wonder if it will be worth trying to develop some kind of Dynamic Object Model adapter layer over my model and to provide it to Isis so this model and its persistence leverages the benefits of using the framework. I also should handle context/interaction/actions which should be provided as operations but they are also modeled in an ontological fashion so I should adapt this too.

It occurred to me that this might be something that Isis could support. Here’s my reply, at any rate:

I must admit I don’t think I completely grok what you are aiming to do, but let me do my best.

Isis, as you know, currently builds its metamodel from pojos, and this metamodel is built up using a registry of FacetFactory classes, all combined together in the ProgrammingModel (the default being org.apache.isis.progmodels.dflt.ProgrammingModelFacetsJava5). All interactions through the UI are using this API, and most of the object stores do also.

I think it would be fairly easy to reflect upon something other than pojos – in your case RDF thingies – by providing a different ProgrammingModel implementation with a different set of FacetFactories.

One limitation is that the metamodel is deemed to be immutable after initialization. So if you are inventing different RDF structures while the app is running, then Isis wouldn’t be able to pick this up. (I have thought of changing this actually, and providing a way to ask Isis to rebuild its metamodel. It occurred to me that that would be a useful feature if using a tool such as JRebel. However, I haven’t done anything on this).

So, I dunno if the above is useful, but it might direct your investigations a little. One other detail while I remember it: in the set of FacetFactorys in ProgrammingModel, you need to ensure that there is at least one that implements the special PropertyOrCollectionIdentifyingFacetFactory interface. These are called first and – as their name suggests – are used to identify the properties and collections on which all the other FacetFactorys then act. (There isn’t an ActionIdentifyingFacetFactory because any public methods that are not properties or collections are deemed to be actions).

If this little interaction leads to anything of interest, I’ll follow up with a post here.

About these ads

Posted on May 24, 2012, in Uncategorized and tagged , , . Bookmark the permalink. 2 Comments.

  1. Hi Dan,

    did this get picket up? Since you’re supporting jRebel now, I figured chances are you might. Instead of using RDF thingies, I’m gonna have to use an entirely dynamic entity model defined on a database, which also might also get changed frequently – so being able to rebuild the metamodel would be quite crucial.

    If it’s not possible, does Isis offer a plugin/extension mechanism that would allow changing this?


    • Hi John,
      Nothing has been done on Isis and RDF, but the JRebel support does mean that we do now have the ability to rebuild the Isis metamodel.
      If you have further questions, suggest you route them via the Isis mailing lists.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 292 other followers