ABI-Team-30 / Fresnel-Forms

A Protégé plugin for generating and adapting MediaWiki user interfaces for source ontologies
http://is.cs.ou.nl/OWF/index.php5/Fresnel_Forms
3 stars 1 forks source link

Define proxy Jena model with fresnel utility functions to relieve fresnel2wiki from fresnel semantics. #36

Closed AlexMekkering closed 9 years ago

AlexMekkering commented 9 years ago

To simplify implementation of fresnel2wiki, we should create helper functions for fresnel semantics. These fresnel semantics will be applied to the Jena model, so a Jena (Proxy) class for providing these helper functions will suffice.

A first candidate for a helper function will be one that returns a list of most specific Format properties for a specific Property and a Lens (which can be absent (null). This method will check all Formats which apply to a Property and an optional Lens. The specificity of Formats is defined as follows (with increasing specificity):

A second candidate for a helper function will be one that returns only showns properties (so properties which are defined in fresnel:showProperties, but not in fresnel;hideProperties.

AlexMekkering commented 9 years ago

Implemented in r268 and r269:

There are also some more trivial helper methods (helping the helper methods described above :smile:), so please check the JavaDoc.

@jheijning, can you review this? Changes in r268 seem to be quite a lot, but the real changes are quite limited, though a lot has been restructured.

jbachh commented 9 years ago

In JenaFresnelModelTest you construct a new testLens with related properties. I haven't been able to replicate the test with the domain variable in Fresnel2wiki.execute() (to replace the makePropertiesList(domain) method (for #37 ). Probably I just do not understand something correctly.

For the rest code review looks good.

jbachh commented 9 years ago

Two hours later: Eureka! I was using domains instead of lenses, that's why jenaFresnelModel.getPropertiesToDisplay(lens); didn't work. Now everything looks a lot tighter!

jbachh commented 9 years ago

if it's up to me: closed!