Search Mailing List Archives
[protege-discussion] Setting the display name for a class (BrowserSlotPattern) - Does it work on a remote project?
Tania Tudorache
tudorache at stanford.edu
Thu Mar 12 14:58:49 PDT 2009
Hi Ron,
A ProtegeJob to change the browser slot could look like below. If you
still have problems, please send me your implementation of the protege
job and what is not working.
Tania
------------------
class ChangeBrowserText extends ProtegeJob {
private Cls cls;
private Slot browserSlot;
public ChangeBrowserText(KnowledgeBase kb, Cls cls, Slot
newBrowserSlot) {
super(kb);
this.cls = cls;
this.browserSlot = newBrowserSlot;
}
@Override
public Object run() throws ProtegeException {
cls.setDirectBrowserSlot(browserSlot);
return null;
}
@Override
public void localize(KnowledgeBase kb) {
super.localize(kb);
LocalizeUtils.localize(cls, kb);
LocalizeUtils.localize(browserSlot, kb);
}
}
-----------------
Ron Schultz wrote:
> Tania,
>
> I I thought the ProtegeJob was straightforward, but my attempts to
> modify the browserSlot using the ProtegeJob class is not as obvious
> as I thought. The examples on the Wiki only got me so far. Any
> insights as to how to set the browserSlot using a ProtegeJob would be
> much appreciated.
>
>
>
>
>> On Thu, Mar 5, 2009 at 3:36 PM, Tania Tudorache <tudorache at stanford.edu> wrote:
>>
>>> Hi Ron,
>>>
>>> In client-server mode, if you set the browser pattern for a slot from a
>>> client, then this will not be sent to the server. So, the new browser
>>> text will take effect on the client that performed the call. When the
>>> client exits, the next time it will log on, it will not have the
>>> previously set browser pattern.
>>>
>>> The browser slot patterns are read from the server at the initialization
>>> of the client, and after that they are disconnected.
>>>
>>> There are ways of setting the browser slot pattern on the server (and
>>> this will affect all the clients) using a ProtegeJob. If you are
>>> interested in this approach, I can give more details.
>>>
>>> Tania
>>>
>>>
> _______________________________________________
> 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
>
>
More information about the protege-discussion
mailing list