Visibility of resources in protegex.owl.ui.cls.* components

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Visibility of resources in protegex.owl.ui.cls.* components

Jakob Beetz
Dear all,

While trying to use the UI widgets and comonents in my own app,
I cannot seem to  find the proper way of switch of the display of
System classes (such as rdf:list, rdfs:class etc.)

I tried setting the visibility of all system resources to false,
but they still show up in ClassTreeComponent instances.

The following shows the complete model fine, but system classes are not
switched of

Can anybody hint me to my mistake?
(this is done with some 3.3 beta snapshot)

Thanks a lot in advance,
Cheers
Jakob


snippet:
// switch of the visibilty of all system RDFSclasses
  Iterator iter = owlModel.getRDFSClasses().iterator();
  while (iter.hasNext()){
           Object ob = iter.next();
           if (ob instanceof RDFSClass){
                 RDFSClass cls = (RDFSClass)ob;
                 if (cls.isSystem())
                     cls.setVisible(false);
            }
}
// create a component to display the hirarchy.

ClassTreeComponent clsTree = new
ClassTreeComponent("test",owlModel.getOWLThingClass(),
                     new AbstractAction() {
                         public void actionPerformed(ActionEvent e) {

                         }
                     }

);

--
_______________________________________________________________________________
Dipl.Ing. Jakob Beetz - PhD student           Ontwerp Systemen | Design Systems
Eindhoven University of Technology Dept. of Architecture, Building and Planning
mail: [hidden email]      phone: +31 (0)40 247 4934          loc: VRT 09H08

/"\
\ /    ASCII Ribbon Campaign
  X   against HTML email & vCards
/ \

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: Visibility of resources in protegex.owl.ui.cls.* components

Tania Tudorache
Jakob,

You need to set the property "display hidden classes" at the project to
false, and then you can iterate over the system classes and make them
not visible. This is the code that you could use for that:

        owlModel.getProject().setDisplayHiddenClasses(false);
       
        // this may be expensive if the ontology is very large
        Iterator iter = owlModel.getClses().iterator();
        while (iter.hasNext()) {
            Object ob = iter.next();
            if (ob instanceof Cls) {
                Cls cls = (Cls) ob;
                if (cls.isSystem()) {
                    cls.setVisible(false);                  
                    System.out.println(cls);
                }
            }
        }


Tania



Jakob Beetz wrote:

> Dear all,
>
> While trying to use the UI widgets and comonents in my own app,
> I cannot seem to  find the proper way of switch of the display of
> System classes (such as rdf:list, rdfs:class etc.)
>
> I tried setting the visibility of all system resources to false,
> but they still show up in ClassTreeComponent instances.
>
> The following shows the complete model fine, but system classes are not
> switched of
>
> Can anybody hint me to my mistake?
> (this is done with some 3.3 beta snapshot)
>
> Thanks a lot in advance,
> Cheers
> Jakob
>
>
> snippet:
> // switch of the visibilty of all system RDFSclasses
>   Iterator iter = owlModel.getRDFSClasses().iterator();
>   while (iter.hasNext()){
>            Object ob = iter.next();
>            if (ob instanceof RDFSClass){
>                  RDFSClass cls = (RDFSClass)ob;
>                  if (cls.isSystem())
>                      cls.setVisible(false);
>             }
> }
> // create a component to display the hirarchy.
>
> ClassTreeComponent clsTree = new
> ClassTreeComponent("test",owlModel.getOWLThingClass(),
>                      new AbstractAction() {
>                          public void actionPerformed(ActionEvent e) {
>
>                          }
>                      }
>
> );
>
>  

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: Visibility of resources in protegex.owl.ui.cls.* components

Jakob Beetz
Tania,

thanks a lot, your snippet indeed did the trick, I missed the
setDisplayHiddenClasses(false) part

Thanks for the quick response,
have a nice weekend
Jakob

Tania Tudorache wrote:

> Jakob,
>
> You need to set the property "display hidden classes" at the project to
> false, and then you can iterate over the system classes and make them
> not visible. This is the code that you could use for that:
>
>         owlModel.getProject().setDisplayHiddenClasses(false);
>        
>         // this may be expensive if the ontology is very large
>         Iterator iter = owlModel.getClses().iterator();
>         while (iter.hasNext()) {
>             Object ob = iter.next();
>             if (ob instanceof Cls) {
>                 Cls cls = (Cls) ob;
>                 if (cls.isSystem()) {
>                     cls.setVisible(false);                  
>                     System.out.println(cls);
>                 }
>             }
>         }
>
>
> Tania
>
>
>
> Jakob Beetz wrote:
>> Dear all,
>>
>> While trying to use the UI widgets and comonents in my own app,
>> I cannot seem to  find the proper way of switch of the display of
>> System classes (such as rdf:list, rdfs:class etc.)
>>
>> I tried setting the visibility of all system resources to false,
>> but they still show up in ClassTreeComponent instances.
>>
>> The following shows the complete model fine, but system classes are not
>> switched of
>>
>> Can anybody hint me to my mistake?
>> (this is done with some 3.3 beta snapshot)
>>
>> Thanks a lot in advance,
>> Cheers
>> Jakob
>>
>>
>> snippet:
>> // switch of the visibilty of all system RDFSclasses
>>   Iterator iter = owlModel.getRDFSClasses().iterator();
>>   while (iter.hasNext()){
>>            Object ob = iter.next();
>>            if (ob instanceof RDFSClass){
>>                  RDFSClass cls = (RDFSClass)ob;
>>                  if (cls.isSystem())
>>                      cls.setVisible(false);
>>             }
>> }
>> // create a component to display the hirarchy.
>>
>> ClassTreeComponent clsTree = new
>> ClassTreeComponent("test",owlModel.getOWLThingClass(),
>>                      new AbstractAction() {
>>                          public void actionPerformed(ActionEvent e) {
>>
>>                          }
>>                      }
>>
>> );
>>
>>  
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

--
_______________________________________________________________________________
Dipl.Ing. Jakob Beetz - PhD student           Ontwerp Systemen | Design Systems
Eindhoven University of Technology Dept. of Architecture, Building and Planning
mail: [hidden email]      phone: +31 (0)40 247 4934          loc: VRT 09H08

/"\
\ /    ASCII Ribbon Campaign
  X   against HTML email & vCards
/ \

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
hms
Reply | Threaded
Open this post in threaded view
|

what is the main defference bettween OWL/PDF Database, OWL/PDF files

hms
I'll  try to create new ontology in owl format
what is the best selection of a project type?
OWL/PDF Database
OWL/PDF files
thanks a lot


Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: what is the main defference bettween OWL/PDF Database, OWL/PDF files

Doug Holmes
I'd suggest you start with OWL/RDF; its a lot simpler and is more than adequate for most projects.   At some point, if the ontology grows to be very large you can switch to the Database version.  
Doug

On May 12, 2007, at 10:01 AM, h-m-s ALkhamash wrote:

I'll  try to create new ontology in owl format
what is the best selection of a project type?
OWL/PDF Database
OWL/PDF files
thanks a lot


Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
_______________________________________________
protege-owl mailing list

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
hms
Reply | Threaded
Open this post in threaded view
|

what is the advantage of Constraints and when I must use it ?

hms
Thank you so much Dough
now I'll start with OWL/RDF.
I know how to build classes,slots,instances
but what is the advantage of Constraints and when I must use it ?
my best regards...


No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: what is the advantage of Constraints and when I must use it ?

Doug Holmes
There is a nice tutorial titled "Protégé OWL Tutorial" [of course..] at http://www.co-ode.org/  (right hand side of the page). its a very good starting place.
Adios,
Doug

On May 12, 2007, at 11:52 AM, h-m-s ALkhamash wrote:

Thank you so much Dough
now I'll start with OWL/RDF.
I know how to build classes,slots,instances
but what is the advantage of Constraints and when I must use it ?
my best regards...


No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
_______________________________________________
protege-owl mailing list

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03