How to delete a specific individual from a specific class

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

How to delete a specific individual from a specific class

REPMEDDY
Hello everyone,

i have 2 classes A, B and both of them have an individual named "c".

What i want to do is to delete individual "c" from class A but NOT from class B.

How can i do it?

PS: i already have tried with destroy_entity() but that method destroys individual "c" from ALL the classes it belongs and that's NOT what i want.
Reply | Threaded
Open this post in threaded view
|

Re: How to delete a specific individual from a specific class

Jiba
Administrator
Hello,

You cannot have 2 individuals with the same IRI (same name in the same ontology).

If you have two distinct individuals (named c but in two distinct ontologies), you should use destroy_entity().

If you have a single individual c that belongs to two classes A and B, you can remove its relation to class A as follows:

c.is_a.remove(A)

Jiba