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] [POSSIBLE VIRUS:###] Re: Help for Protege API - display Superclass information

Timothy Redmond tredmond at stanford.edu
Wed May 11 20:44:13 PDT 2011


So I first want to mention the default way that this is done.  Generally 
all views in Protege respond to the current selection.  This allows all 
the views to synchronize what they are displaying at the same time.  In 
this model, you would simply create a tab as described in [1] and 
include the class description view in your tab.

However you may have a situation where you need a graphical component as 
you describe but that this component must display something other than 
the current selection.  You can do this also.  What you want is an 
OWLFrameList that holds a frame.  In particular the Frame that you want 
to display is OWLClassDescriptionFrame.  You can create the frame with 
the code:

		OWLClassDescriptionFrame frame = new OWLClassDescriptionFrame(getOWLEditorKit());
		list = new OWLFrameList<OWLClass>(getOWLEditorKit(), frame);


The list variable is then a swing component that you can add to other 
swing components.  You can then change the object that the frame 
displays by calling

    list.setRootObject(owlClass);


There is some additional cursory information about Frames and Frame 
lists at [2].  If you look at the TestView class in the attached zip 
file you will see an example of view that displays a random class from 
the ontology whenever the selected class is changed.

-Timothy


[1]http://protegewiki.stanford.edu/wiki/PluginAnatomy#Tab_Plugins_and_the_Viewconfig.xml_File
[2]http://protegewiki.stanford.edu/wiki/PluginAnatomy#Frames.2C_Frame_Sections.2C_and_Rows


On 05/11/2011 01:50 AM, nuno morgado wrote:
> Hello all,
>
>    I'm trying to find a way to display the superclass information, of 
> a selected class on a panel that will be integrated on a plug-in being 
> developed. Since I'm new in this area what I'm looking for is a way to 
> show this (especialy the superclass part) in a panel of the plug-in 
> being developed:
>
>
> I've tried to:
>
>   -include this view on the plu-in but unfortunately I can't control 
> the selection of the class in order to display the information in the 
> window;
>   -search for something that could help me and I've found a class 
> ClsInverseRelationshipPanel, but this class is form Protege 3.4.6.
>
> Has anyone found a way to do this? Or does anyone have an idea on how 
> to solve this?
> By the way, I've managed to get the information I need to present and 
> stores it in a Set<OWLClassExpression>.
>
> Thank you all
> Kind regards
> nuno morgado
>
>
> _______________________________________________
> 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/20110511/3b969185/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 6743 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20110511/3b969185/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.zip
Type: application/zip
Size: 7318 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20110511/3b969185/attachment.zip>


More information about the protege-discussion mailing list