Inconsistent treatment of subslots of :DIRECT-TEMPLATE-SLOTS

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

Inconsistent treatment of subslots of :DIRECT-TEMPLATE-SLOTS

Richard Dunlap

As part of the implementation of a set of metaclasses to support a
particular knowledge representation language in Protege, I found it
natural and desirable to introduce subslots of :DIRECT-TEMPLATE-SLOTS.
I have since discovered the following interesting behavior; apparently,

getOwnSlotValues(getKnowledgeBase().getSlot(":DIRECT-TEMPLATE-SLOTS"))

returns a collection of all direct (i.e. not-inherited from a
superclass) slots contained within :DIRECT-TEMPLATE-SLOTS or a subslot,
while

getDirectTemplateSlots()

returns a collection of all direct (i.e. not-inherited) slots contained
within :DIRECT-TEMPLATE-SLOTS, but *not* within a subslot.

This is but one example of several such inconsistencies observed between
accessing :DIRECT-TEMPLATE-SLOTS through the generic slots methods vs.
through the hard-wired methods, and it causes a variety of problems when
subclassing and instantiating classes making use of the subslots.  I can
see why this is happening in the SimpleFrameStore -- my question is, is
this a bug or a feature?

Thanks!

-- Dr. Richard Dunlap
    Applied Systems Intelligence, Inc.

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Inconsistent treatment of subslots of :DIRECT-TEMPLATE-SLOTS

Tania Tudorache

Richard,

I have asked Ray Ferguson exactly this question last year.  His answer
was that when implementing Protege he didn't think that anybody would
make subslots of :DIRECT-TEMPLATE-SLOT. So, I think this situation has
not been considered in the implementation.

I have added a feature request in our bugzilla.
http://171.65.65.92/bugzilla/show_bug.cgi?id=66

At first sight, the changes in the code seem little, but we will have to
run some tests to see if it does not have other unexpected effects.

Tania


Richard Dunlap wrote:

>As part of the implementation of a set of metaclasses to support a
>particular knowledge representation language in Protege, I found it
>natural and desirable to introduce subslots of :DIRECT-TEMPLATE-SLOTS.
>I have since discovered the following interesting behavior; apparently,
>
>getOwnSlotValues(getKnowledgeBase().getSlot(":DIRECT-TEMPLATE-SLOTS"))
>
>returns a collection of all direct (i.e. not-inherited from a
>superclass) slots contained within :DIRECT-TEMPLATE-SLOTS or a subslot,
>while
>
>getDirectTemplateSlots()
>
>returns a collection of all direct (i.e. not-inherited) slots contained
>within :DIRECT-TEMPLATE-SLOTS, but *not* within a subslot.
>
>This is but one example of several such inconsistencies observed between
>accessing :DIRECT-TEMPLATE-SLOTS through the generic slots methods vs.
>through the hard-wired methods, and it causes a variety of problems when
>subclassing and instantiating classes making use of the subslots.  I can
>see why this is happening in the SimpleFrameStore -- my question is, is
>this a bug or a feature?
>
>Thanks!
>
>-- Dr. Richard Dunlap
>    Applied Systems Intelligence, Inc.
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html