Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] String return instead of a Slot when setting ":SLOT" slot after reloading an ontology

Samson Tu swt at
Mon Sep 4 12:19:05 PDT 2006

Hans.Schevers at wrote:

I am not sure what you are trying to do. :NAME is a core Protege system 
slot. It is not an instance of rdf:Property. Using Protege's core API to 
assert it as the value of slotProperty, it seems to me, violates the 
range restriction of slotProperty. I am not surprised that Protege can't 
save and reload the project properly.


> Dear all,
> Just for demonstrating purposes I have created an OWL ontology containing a class 'AClass' with a property "slotProperty" with range rdf:Property.
> Storing the slot ":Name" in the slotProperty works until you save and reload the whole ontology. After saving the slotProperty value for ":Name" becomes a String instead of a DefaultSlot. Again before saving a defaultSlot is returned. 
> some code snippets:
> Slot nameSlot = kb.getSlot(":NAME" );
> Slot slot = kb.getSlot("slotProperty" );
> instance.setDirectOwnSlotValue(slot,nameSlot );
> instance.getDirectOwnSlotValue(slot )// this will return a DefaultSlot so that is correct
> // after saving the ontology and retrieving the slotValue  
> instance.getDirectOwnSlotValue(slot)// this will return a String!
> In addition the protégé userinterface is not displaying the ":NAME" slot. 
> Creating a work around this is not too difficult however I hope that I can use the ":NAME" slot in the way as described above as I feel that the ":NAME" slot is bit of a (hidden) system slot
> Any comments on this?

Samson Tu                    email: swt at
Senior Research Scientist    web:
Stanford Medical Informatics phone: 1-650-725-3391
Stanford University          fax: 1-650-725-7944

More information about the protege-owl mailing list