Discussion:
[protege-user] Anonymous individual exception in OntoGraf
Steve Vestal
2017-09-29 23:42:46 UTC
Permalink
When visualizing a model using OntoGraf I got:

An error occurred whilst creating the view
ClassCastException:
uk.ac.manchester.cs.owl.owlapi.OWLAnonymousIndividualImpl cannot be cast
to org.semanticweb.owlapi.model.OWLNamedIndividual

There are expected to be anonymous individuals (blank nodes) in this
model.  I can see them when I go to the Classes tab, select the class,
and look at the Individuals that are shown there.  The reasoner launches
and, at first glance, shows what I expected.

This raised the question, how can I view all triples/relations/instances
for a given property?  When I go to the Object properties tab and select
a property, then I can see the usages in the declared model, but I
cannot see the entailed ones.  The only way I have found so far is to go
to the Individuals tab and select an individual, at which point I can
see all triples for each property for that particular individual,
including the entailed ones.  Blank nodes don't show up in the list of
Individuals visible in the Individuals Tab, and so that method doesn't
work (although blank nodes do appear when the Classes tab is used to
display individuals in a selected class).

If anyone has a few words of advice on how to best use Protege with
models having blank nodes and entailed property triples/relations, I'd
appreciate that.
Matthew Horridge
2017-10-05 19:43:01 UTC
Permalink
Hi Steve,

I’m sorry but Protege doesn’t really deal well with displaying anonymous individuals. In addition to this, none of the reasoners supply results containing anonymous individuals (which is why you can’t see them in the result view).

I’m not familiar with the OntoGraf code but it looks like it’s performing an unchecked cast i.e. it always assumes a named individual and this causes the class cast exception.

Out of interest, how are you using anonymous individuals and do you have any control over this?

Cheers,

Matthew
Post by Steve Vestal
An error occurred whilst creating the view
uk.ac.manchester.cs.owl.owlapi.OWLAnonymousIndividualImpl cannot be cast
to org.semanticweb.owlapi.model.OWLNamedIndividual
There are expected to be anonymous individuals (blank nodes) in this
model. I can see them when I go to the Classes tab, select the class,
and look at the Individuals that are shown there. The reasoner launches
and, at first glance, shows what I expected.
This raised the question, how can I view all triples/relations/instances
for a given property? When I go to the Object properties tab and select
a property, then I can see the usages in the declared model, but I
cannot see the entailed ones. The only way I have found so far is to go
to the Individuals tab and select an individual, at which point I can
see all triples for each property for that particular individual,
including the entailed ones. Blank nodes don't show up in the list of
Individuals visible in the Individuals Tab, and so that method doesn't
work (although blank nodes do appear when the Classes tab is used to
display individuals in a selected class).
If anyone has a few words of advice on how to best use Protege with
models having blank nodes and entailed property triples/relations, I'd
appreciate that.
_______________________________________________
protege-user mailing list
https://mailman.stanford.edu/mailman/listinfo/protege-user
Loading...