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-owl] travel in a named class using OWL API

Timothy Redmond tredmond at stanford.edu
Mon Jan 25 08:58:05 PST 2010


One ambiguity of your message is that it is unclear what OWL api you are 
using. Since you mention visitors and owl model managers it seems that 
you are using the Manchester OWL API (owlapi.sourceforge.net). If you 
click on the documentation link you will find several examples.

> 1. the class and method to travel in ontology, say MechanicalEngineering.owl;
>   
Example 1 shows how to load an ontology into the Manchester OWL API.

> 2. the class and method to find the wanted class, say class GeometryElements;
>   
You can use the OWL Datafactory to create a java representation of a 
desired class. Note that you will need the full name for the class to do 
this (e.g. it would be something like 
http://foo.ac.uk/MechanialEngineering.owl#GeometryElements)
> 3. the class and method to get the name in a string of all captured subclasses 
> of the GeometryElements?
OWLClass has a convenience method, getSubclasses, which will find those 
subclasses of the class that are asserted in a given ontology or set of 
ontologies.

-Timothy


Chun wrote:
> Hi all, 
>
> I am trying to travel in an ontology and find a specified class, so that to 
> explore all its subclasses and save them in a string array. 
>
> 1. the class and method to travel in ontology, say MechanicalEngineering.owl;
> 2. the class and method to find the wanted class, say class GeometryElements;
> 3. the class and method to get the name in a string of all captured subclasses 
> of the GeometryElements?
>
> Thanks in advance. I have been looking through the JAVADoc, but the visitor 
> patterns and owl model manager make me very confused. 
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>   





More information about the protege-owl mailing list