[Xesam] Rewriting the build tools

Ivan Frade ivan.frade at gmail.com
Wed Jul 22 03:27:07 PDT 2009


Hi,

In some platforms  (specially mobile world) there is no java. We could
depend on java IF there were tools that we cannot have/use in other
languages. Taking a quick look to the documentation you wrote i think there
is nothing we cannot do in plain C.

My comments:


On Tue, Jul 21, 2009 at 6:06 PM, Antoni Mylka <antoni.mylka at gmail.com>wrote:


>
> 1. RDFS2Tex - the doc generator. It has two "renderers": one that
> outputs LaTeX and one that ouputs HTML.
>
> Input:
>  - a directory containing rdf files,
>  - the namespace to document
>  - a list of "local" namespaces (inside NIE, like NFO, NMO, NCO...)
> Output:
>  - a html file with the documentation of classes and properties
>    from the given namespace,
>  - all references to entities from "local" namespaces are turned to
>    links, external entities are not turned to links
> Algorithm:
>  - take triples from all files into a single model
>  - apply RDFS inference to get all sub/superclasses and
>    sub/superproperties
>  - iterate over all classes from the given namespace and generate
>    output
>  - iterate over all properties from the given namespace and generate
>    output
> Rewriting
>  - could probably be much clearer with a reasonable object model and
>    a template engine, i.e. with ruby/redland and erb, or with
>    java/velocity
>  - if in java, it could be ported to sesame to drop the number of jars
>    in the 'lib' folder from 18 to 3 (sesame and two slf4j jars)
>  - but requires RDFS inference to work properly, otherwise you won't
>    get those full lists of (sub|super)(classes|properties), AFAIK
>    redland doesn't have this and using virtuoso seems like overkill
> Quality:
>  - mediocre, it cries for a template engine, but it seems to work
>

I did something similar to this in C + Redland [1]. It uses two turtle files
(X.ontology, X.description) and the same algorithm. I stopped doing it
waiting for this documentation discussion, so it is not complete (it
generates proper links to classes/properties with "real URIs" [the uri of
the resource points to a valid HTML with the documentation]).

You can use a proper data model to get the direct super/sub
class/properties, and then you dont need "RDFS inference" anymore. The
problem is that you cannot easily find "all superclasses of class X", but
anyway this is only useful to get "all properties available for class X" and
AFAICS this information is not available in the HTML documents.


2. RDFS2NRL - an ugly hack, seems obsolete now
>
> Quality
>   - works, but is obsolete in the XESAM/OSCAF setup
>

> 3,4,5. the converters are completely obsolete, should be deleted
>


>
> 6. Another tool we developed in NEPOMUK is the nrlvalidator (which
> requires unionsail and infsail). There is some CLI interface, but it was
> meant to be accessed with a java API. They currently live within the
> aperture-tools package in the aperture sourceforge repository.
>

 I wrote something similar [2]. It is call data-validator, and i use it to
validate my test-data generators against the ontology.

 It is written in C + Redland, and at the moment it doesn't validate data
errors, but it should be easy to fix that.


>
> Rewriting:
>    - very difficult, would require a rule-based inference engine,
>      there is one in Jena, and infsail is a port from the Jena-one
>      to sesame made by Gunnar Grimnes from DFKI. IMHO nearly impossible
>      with redland, dunno about virtuoso, or CWM


Maybe not all the ultra-fancy validations can be done with redland, but at
least all the common mistakes generating data i have found while testing
tracker, are
detected with my pet-validator.

   - it's IMHO important because such a tool would be the only way
>      to ensure we deliver on the backward-compatiblity promise


I never used it for that. But it is a good use-case.

Regards,

Ivan

[1] http://git.gnome.org/cgit/tracker/tree/utils/services/ttl2html.c
[2] http://git.gnome.org/cgit/tracker/tree/utils/services/data-validator.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xesam/attachments/20090722/bf302789/attachment.html 


More information about the Xesam mailing list