On 17/01/17 13:02, Jos Lehmann wrote:
Hi there

I am copying Classes and/or Instances as well as their properties from one 
ontology to another.

To get the list of Classe and/or Instance properties from the source ontology I 
use listProperties()

But this gives much more than I need: i.e. superproperties, as well as other 
stuff, which clutters my copy ontology.

I have tried to filter out undesired properties by recursive while calls on 
Next(), or by trying to find a cut-off in the property list. But these 
solutions are not general enough.

I would like to just get the asserted properties when querying the source 
ontology. Is that possible?

Sounds like you have an OntModel with inference, create one without inference or access the baseModel (bypassing the inference).

In the absence of any inference then Resource#listProperties will just list the asserted properties (irrespective of what type of property).

Dave

Reply via email to