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-discussion] getting "view slot at class"

Jonathan Carter jonathan.carter at e-asolutions.com
Mon Jan 12 08:03:40 PST 2009


I mean getDirectTemplateSlots(), sorry

Jonathan
__________________________________________
Jonathan Carter - Head of Technical Architecture
Enterprise Architecture Solutions Ltd
__________________________________________

Assess your EA maturity at:
www.enterprise-architecture.com/EAvaluator
__________________________________________

On 12 Jan 2009, at 15:55, Jonathan Carter wrote:

> Hi Laszlo,
>
> If you use the getDirectTemplates() method on the class instead of  
> getVisibleTemplateSlots(), then you get the slots as they are  
> defined at that class - the "view at class" level that you describe.  
> This works for getting and setting the slot at the class.
> Worth a try, although I couldn't find a  
> getDirectVisibleTemplateSlots() method, so maybe this won't give you  
> exactly what you're after.
>
> Certainly, when I've used the API, doing a  
> Cls.setDirectTemplateSlot() has worked in the same way as the "view  
> slot at class" GUI dialog. This use of "direct" appears in the  
> Instances as well, so that you can separate the actual instances as  
> opposed to instances of the class AND subclasses.
>
> Hope this helps
>
> Jonathan
> __________________________________________
> Jonathan Carter - Head of Technical Architecture
> Enterprise Architecture Solutions Ltd
> _________________________________________
>
> Assess your EA maturity at:
> www.enterprise-architecture.com/EAvaluator
> __________________________________________
>
> On 12 Jan 2009, at 15:20, Jabba Laci wrote:
>
>> Hi,
>>
>> Using the Protege API, how can I access the slot view at class? I  
>> have
>> a slot whose "top-level view" and "slot view at class" are different,
>> i.e. the slot is locally modified in a subclass. Here is what I  
>> tried:
>>
>> private static void extractSlots(Cls cls) {
>>      Iterator<Slot> it = cls.getVisibleTemplateSlots().iterator();
>>      Slot slot;
>>      while (it.hasNext()) {
>>         slot = it.next();
>>         TraverseSlot.process(slot);
>>      }
>> }
>>
>> However, this code extracts the global properties of a slot. How to
>> get the local properties?
>>
>> Thanks in advance,
>>
>> Laszlo
>> _______________________________________________
>> protege-discussion mailing list
>> protege-discussion at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>>
>> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20090112/9d1ada93/attachment.html>


More information about the protege-discussion mailing list