Search Mailing List Archives
[protege-owl] fetching properties
tar at ISI.EDU
Wed Mar 4 13:52:08 PST 2009
On Mar 4, 2009, at 1:12 PM, Peter Mac wrote:
> I am trying to make a simple interface for our ontology. I'm having
> trouble fetching properties that have more than one domain and more
> one range. Then I tried the following:
> Which not surprisingly gave me all the possible properties for that
> instance plus properties like:
> My question is, how do I only return the properties which the user
> be interested in editing, a la the Protege Individual Editor screen?
There are a couple of choices.
One would be figure out what "standard" properties there are that you
don't want and filter them out. That is pretty straight-forward and
Another would be to create your own meta-class for the properties that
you want to present to the user in your interface. This would be a
subclass of owl:Property. Make all of the properties you want to show
also be instances of that meta-class. Then you could use that for
filtering and have the filtering driven by ontology information.
There is also the isVisible() method for figuring out if a property
(or any other RDFResource) has been declared to be visible or not in
the user interface.
> My other question is how do I fetch all the properties of an ontology,
> again as would be displayed by the Property Browser under the "All"
> in Protege?
Look at the following methods in OWLModel:
More information about the protege-owl