[protege-owl] Code generation, EMF export has @modelnull tag, etc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[protege-owl] Code generation, EMF export has @modelnull tag, etc

Nikolaj Berntsen
I am playing around with a domain model in protege-owl. I have decided
that I like the protege way of doing things and I think I can work
around the quirks there are.

Now I want to work with the owl model from java. Is there any
preferred/recommended way of doing that? I need to work with the domain
objects and serialise it to RDF. I either need to store the domain
objects in a database, or perhaps I should store it directly as RDF?  In
the database. I have previously used POJOs and Hibernate for database
work and EMF with xml serialisation.

In the menu Code, I have some export possiblities, which I comment
below, as well as ask some questions.

EMF
---------------
EMF code generation generates valid java code, but the markup has
errors, e.g.

    /**
     * Generated from property #keyword
     * @modelnull
     */
    String getKeyword();

where null seems to indicate that I should set something somewhere. Any
ideas?

Protege-OWL
---------------
The option Generate Protege-OWL code generates code that seems to
require protege.jar which comes with the windows installation of
protege, and protege-owl.jar in the plugins directory. There is a minor
code generation error with duplication of methods ihn a class called
OWLList_

    // Property
http://www.co-ode.org/ontologies/meta/2005/06/15/meta.owl#hasNext

    OWLList getHasNext();
[snip]

    // Property
http://www.co-ode.org/ontologies/meta/2005/06/15/meta.owl#hasNext

    OWLList getHasNext();
[snip]

Schema
--------------------------
jena.jar needs to be in the classpath for the generated class to validate.


Kazuki java classes
--------------------------
Kazuki generation was a bit trouble some, but I generated to an eclipse
project (under src, with proper jars under lib), it worked out of the
box. kazuki requires kazuki.jar to compile.

In order for kazuku (http://projects.semwebcentral.org/projects/kazuki/)
generation to work.

No question really, I just state what I had to do and where kazuki lives
on the net, to possible help other newcommers.


I use protege 3.2beta build 318.

Btw. what is the release schedule?


Cheers,
/\/
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: Code generation, EMF export has @modelnull tag, etc

Nikolaj Berntsen

>EMF
>---------------
>EMF code generation generates valid java code, but the markup has
>errors, e.g.
>
>    /**
>     * Generated from property #keyword
>     * @modelnull
>     */
>    String getKeyword();
>
>where null seems to indicate that I should set something somewhere. Any
>ideas?
>
More questions (into the void, no responses as of yet):

one of the generated files is this

public interface meta_OWLList {

    /**
     * Generated from property #hasListProperty
     * @modelnull
     */
    java.util.List getMeta_hasListProperty();
}

it has the same problem @modelnull, that I wrote earlier, but since it
is not my model, I am not sure what to replace null with, I suspect it
is ' type="some.thing"' but I am not sure what this some.thing is.

/\/

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html