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] Jennifer Vendetti <vendetti at stanford.edu>: Re: Protege Frame API template value

vendetti at stanford.edu vendetti at stanford.edu
Thu May 22 12:25:30 PDT 2008


Dies ist eine Benachrichtigung des E-Mail-Servers von faktorM. · Mensch im
Unternehmen.

Folgende E-Mail ist eingetroffen:

  Absender:     Jennifer Vendetti <vendetti at stanford.edu>
  Betreff:      Re: [protege-discussion] Protege Frame API template
                value
  Organisation: [keine Angabe]
  Empfänger:    protege-discussion at mailman.stanford.edu
  Kopieliste:   [keine Angabe]
  Gesendet:     Donnerstag, 22. Mai 2008, 12:20:48 Uhr -0700
  Anhang:       "moz-screenshot-24.jpg"

clamav didn't found any malware; Diese Nachricht enthält HTML-Code, der von
den Sicherheitsrichtlinien nicht zugelassen wird. Die originale Darstellung
steht daher nicht zur Verfügung. Die Nachricht wird daher in unformatiertem
Format wiedergegeben. Bitte wenden Sie sich innerhalb der nächsten 90 Tage
an Ihren Administrator, falls Sie das Original benötigen!
(mailto:administrator at faktorm.de)

Vollständiger Nachrichtentext in reduzierter Formatierung:

 

 Yes, I understood that you were asking about templates values.  The code I
sent does fetch the template value for a slot at the class level.  Consider
the following example:
 


1).  Create a class called "MyClass".
 2).  Create a slot called "mySlot", give it a value type of "String", and
assign a template value of "test value".
 3).  Attach mySlot to MyClass.
 


Screenshot of the slot form:
 




Using the code for the above example:
 


KnowledgeBase kb = project.getKnowledgeBase();
 Cls cls = kb.getCls("MyClass");
 Slot slot = kb.getSlot("mySlot");
 System.out.println(cls.getTemplateSlotValue(slot));
 


.... will print out "test value", which is the template value of mySlot
attached to MyClass.  If you have multiple template values for a slot, you
can use the getTemplateSlotValues() call, which returns a Collection.
 


Jennifer
 


Len Yabloko wrote: 

 Jennifer,  

I was asking about "Template value", which is similar to "Default value",
but I did not find any call like cls.getTemplateSlotDefaultValues(slot) for
template values.  

You could do something like this: 

KnowledgeBase kb = project.getKnowledgeBase(); Cls cls =
kb.getCls("your-class-name"); Slot slot = kb.getSlot("your-slot-name");
cls.getTemplateSlotValue(slot); 

Jennifer 

Len Yabloko wrote:  

What is exact API call to get template value of slot at class level? 

Thank you.  




More information about the protege-discussion mailing list