Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] fetching properties

Thomas Russ tar at ISI.EDU
Wed Mar 4 13:52:08 PST 2009

On Mar 4, 2009, at 1:12 PM, Peter Mac wrote:

> Hello:
> 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  
> than
> one range.  Then I tried the following:
> OWLIndividual.getPossibleRDFProperties();
> Which not surprisingly gave me all the possible properties for that
> instance plus properties like:
> DefaultOWLDatatypeProperty(owl:versionInfo)
> DefaultRDFProperty(rdfs:member)
> My question is, how do I only return the properties which the user  
> would
> 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"  
> tab
> in Protege?

Look at the following methods in OWLModel:


More information about the protege-owl mailing list