walking a class tree

8 views
Skip to first unread message

Simon

unread,
Nov 8, 2011, 9:04:43 AM11/8/11
to sur...@googlegroups.com
Hello all,

I'm completely new to SuRF and am wondering if there's any way, starting at a base class in my ontology, to walk the class tree.  For example:

<owl:Class rdf:about="http://foo.com/bar#Restaurants">
</owl:Class>
<owl:Class rdf:about="http://foo.com/bar#Italian">
<rdfs:subClassOf rdf:resource="http://foo.com/bar#Restaurants"/>
</owl:Class>

I'd like to start with Restaurants and be able to get to Italian in the code.

It seems like a simple thing to do.  Any help is greatly appreciated.

Thanks!
Simon

Simon

unread,
Nov 8, 2011, 11:52:01 AM11/8/11
to sur...@googlegroups.com
It looks like I can do this with base_class.is_rdfs_subClassOf_of.  If there's a better way to do it though, I'm interested.

Cosmin Basca

unread,
Nov 8, 2011, 1:58:19 PM11/8/11
to surfrdf
Hi Simon,

navigating the rdfs:subClassOf attribute (or it's inverse) is the way
to do it, since SuRF itself does not include an inference engine.
Another way - may not work, and I am not sure how much support is
there for it at this stage - would be to enable rdf store level
inference, allowing SuRF to possibly retrieve inferred statements too
(in this case subclass relationships). However, this is not tested and
improbable to function currently, I would just go the rdfs way, since
that works!

Cheers,
Cosmin
Reply all
Reply to author
Forward
0 new messages