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] a simple questions about owl programming

tingyu li li.hh190 at
Wed Nov 17 07:20:13 PST 2010

hi Thomas, thanks for your response. but I still very confused by these
methods...and I have read all the samples posted on the website, but I don't
find any solutions for my problems, a very similar question is about query
all resources that have a certain property value. the code on website is
like this:

> RDFProperty subClassOfProperty = owlModel.getRDFProperty(RDFSNames.Slot.SUB_CLASS_OF);
> OWLNamedClass owlThingClass = owlModel.getOWLThingClass();
> Collection results = owlModel.getRDFResourcesWithPropertyValue(subClassOfProperty, owlThingClass);
> System.out.println("Subclasses of owl:Thing:");
> for (Iterator it = results.iterator(); it.hasNext();) {
>     RDFResource resource = (RDFResource);
>     System.out.println(" - " + resource.getBrowserText());
> }
> but, actually, there are no slot on the new version owl files. and I think
RDFProperty is not very fit for my file. by the way, I use protege 4.0 to
develop a owl file and save it as format: RDF/XML. the file  is like this:

    <owl:ObjectProperty rdf:about="">
        <rdfs:range rdf:resource=""/>
        <rdfs:domain rdf:resource="
I want get the similar result as the probem I described above. in other
words, if I click Jim as the picture, I can get the result as the rigt part
of the picture displayed, Usage and Property assertions:Jim


2010/11/17 Thomas Russ <tar at>

> On Nov 16, 2010, at 7:07 AM, tingyu li wrote:
>  Hello everyone,
>> I have a simple question about owl programming, and if a instance was
>> specified in my code, and how I get its data properity assertions? and even
>> I can get its class name and superclass or subclass? I can't find a relevant
>> function to do that.
>> right now, I just can use: owlModel.getOWLNamedClass("class name") to
>> specify a class, and use: getInstances to get class's instance. but I don't
>> know how to do a reverse process.
>> I will very appreciate if everyone can give me any suggestions or samples.
> I assume you have looked at
> For your specific question, you need to look at the java docs
> for OWLIndividual and find the appropriate methods like
>   getPropertyValue
>   getPropertyValues
>   getRDFType
>   getRDFTypes
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture.JPG
Type: image/jpeg
Size: 54625 bytes
Desc: not available
URL: <>

More information about the protege-discussion mailing list