[protege-owl] using the generated code with properties

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

[protege-owl] using the generated code with properties

Nikolaj Berntsen
Hi,

With protege 3.2 build 322 I have created an ontology and exported it to
code (schema + protege-owl). My ontology is supposed to include dublin
core properties.

I cannot see any reference to my defined properties, nor can I find the
references to the dublin core properties I seek to have access to, anywhere.

I was hoping to get methods like (in order to have easy typed
development in java)

    Book.setDCTitle(String)
or at least do something like
    Book.addProperty(Schema.DC_TITLE, "some title")

assuming I created a Book class in protege.

Am I missing out on anything? Not looking properly? Expecting too much?

My main source of information is:
http://protege.stanford.edu/plugins/owl/api/guide.html, are there more
guides/examples?

Cheers,
/\/ikolaj

--
Cheers,
/\/ikolaj Berntsen
--
Mobile People A/S
Toldbodgade 31, 2 sal, DK-1253 Copenhagen K
T: +45 7025 2722 F: 70 25 27 23 M: +45 3054 2207

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

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: using the generated code with properties

Nikolaj Berntsen
I have found the reason for not being able to find properties in the
generated code.

A property needs to have a more specific domain than just owl thing. If
I add properties to any class I create myself, they show up in the
created code, both as getters, setters and adders, as well as in the
generated schema.

I am still not sure how I should most easily access properties attached to owl:thing (e.g. dublin core) in my code.

Cheers,
/\/

>Hi,
>
>With protege 3.2 build 322 I have created an ontology and exported it to
>code (schema + protege-owl). My ontology is supposed to include dublin
>core properties.
>
>I cannot see any reference to my defined properties, nor can I find the
>references to the dublin core properties I seek to have access to, anywhere.
>
>I was hoping to get methods like (in order to have easy typed
>development in java)
>
>    Book.setDCTitle(String)
>or at least do something like
>    Book.addProperty(Schema.DC_TITLE, "some title")
>
>assuming I created a Book class in protege.
>
>Am I missing out on anything? Not looking properly? Expecting too much?
>
>My main source of information is:
>http://protege.stanford.edu/plugins/owl/api/guide.html, are there more
>guides/examples?
>
>Cheers,
>/\/ikolaj
>
>  
>


--
Cheers,
/\/ikolaj Berntsen
--
Mobile People A/S
Toldbodgade 31, 2 sal, DK-1253 Copenhagen K
T: +45 7025 2722 F: 70 25 27 23 M: +45 3054 2207

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

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: using the generated code with properties

Holger Knublauch
> I am still not sure how I should most easily access properties attached to owl:thing (e.g. dublin core) in my code.

In these cases you probably need to fall back to the default methods
(which are inherited by your classes), e.g. getPropertyValues or so.

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

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: using the generated code with properties

Nikolaj Berntsen
Holger Knublauch wrote:

>> I am still not sure how I should most easily access properties
>> attached to owl:thing (e.g. dublin core) in my code.
>
>
> In these cases you probably need to fall back to the default methods
> (which are inherited by your classes), e.g. getPropertyValues or so.

Sorry, I meant, how can I most cleanly and easily attach e.g. dublin
core properties to a class I make. E.g. if I wanted to attach a dc:title
to the profileData instead of gender as shown below:

        JenaOWLModel owlModel = ProtegeOWL.createJenaOWLModel();    
        RDFProperty gender = spModel.createRDFProperty("gender");
        OWLNamedClass profileDataClass =
spModel.createOWLNamedClass("ProfileData");
        OWLIndividual knbProfileDataIndividual =
profileDataClass.createOWLIndividual("knbProfileData");
        knbProfileDataIndividual.addPropertyValue(gender, "male");

would I just use

        RDFProperty dcTitle = spModel.createRDFProperty("dc:title");

(somehow seems like a hack to me caused by lack of understanding ;-( ),
or is there some place to get a "final static RDFProperty dcTitle = ..."
from?

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

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Put in a file the hierarchy/taxonomy subclasses?

Tang, Steven N. (US SSA)
In reply to this post by Holger Knublauch
Hi,
 
Is there a way to cut and paste (or put in a file) the asserted hierarchy (taxonomy subclasses) under the tab 'OWL Classes' and e-mail it to someone?  Can I also print it?  Under file -> export to format 'html' is not highlighted so I can't select it.  The other options are 'clips', 'N-triple', 'N3', 'OWL', 'Tutle'.  Thanks.
 
Steve
 

         


winmail.dat (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[protege-owl] Put in a file the hierarchy/taxonomy subclasses?

Tang, Steven N. (US SSA)

 

        Hi,
         
        Is there a way to cut and paste (or put in a file) the asserted hierarchy (taxonomy subclasses) under the tab 'OWL Classes' and e-mail it to someone?  Can I also print it?  Under file -> export to format 'html' is not highlighted so I can't select it.  The other options are 'clips', 'N-triple', 'N3', 'OWL', 'Turtle'.  Thanks.
         
        Steve
         

                 

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