Search Mailing List Archives
[protege-discussion] Metaclass mismatch resulting from drag and drop
tar at ISI.EDU
Tue Jan 30 16:13:19 PST 2007
On Jan 30, 2007, at 2:16 PM, Richard Dunlap wrote:
> Build two sibling subclasses of :STANDARD-CLASS, call them :CLASS-1
> :CLASS-2. Build an instance of each metaclass, Class 1-1 and Class
> and build a subclass of each of those classes, Class 1-2 and Class
> Now, drag and drop Class 1-2 as a subclass of Class 2-1 and Class
> 2-2 as
> a subclass of Class 1-1. Note that we now have an instance
> of :CLASS-1
> with a subclass that is an instance of :CLASS-2, and vice versa.
> is likely to ensue; even more mayhem may occur if I drag and drop
> 2-1 under Class 2-2. If I do this mischeviously, I deserve what I
> but this can also happen when a user inadvertently drags a class on
> Classes view, and might sensibly happen intentionally while editing
> class structure in an ontology.
> A suggestion: if a drag and drop would result in an inconsistency
> between a child's metaclass and a parent's metaclass, ask the user if
> he/she really wants to do this and, if so, change the child's
> (and the metaclass of all its children, if it was the root of a tree).
It isn't at all clear to me why this would need to lead to mayhem.
There doesn't seem to be any reason why subclasses need to share
the metaclass of their parent. The meta-class is specific to the
actual class object itself and isn't one of the things that is
inherited by subclasses, so having such differences isn't necessarily
For example, suppose one wanted to use metaclasses to track the
whether a particular class was supposed to be abstract or concrete.
Changing the superclass link shouldn't necessarily affect whether
one wants the class in question to change its metaclass. So, it
doesn't really appear that inconsistency is a result of just having
a different metaclass than a parent class. That would make any
sort of warning a bit questionable.
(Yes, such an Abstract/Concrete distinction could be done with some
meta-annotation, but it seemed like a simple example).
More information about the protege-discussion