Alibaba 2.0 and subPropertyOf

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Alibaba 2.0 and subPropertyOf

ckapop
Hello,

I am using AliBaba 2.0 and really like it. I like the fact that you can use the owl compiler to build classes and then use the ObjectRepository to do things like:

Result<Person> persons = con.getObjects(Person.class);

This will return a collection of all Person and all sub classes of Person objects.

I was hoping it would be possible to also do something like this:

Set<University> universities = person.getDegreeFrom();

In which you would get back a list of all University objects that have "degreeFrom" plus any other object properties that are a subclass of this property (rdfs:subPropertyOf). For example undergraduateDegreeFrom is a sub property of degreeFrom. However this doesn't seem to be the case. I have to call  person.undergraduateDegreeFrom () as  person.getDegreeFrom() doesn't follow the sub class trail.

Is there a way to accomplish this? To get a list of objects of all the sub properties by calling the one in which they all derive from?

The documentation is limited and hard to find so any help would be appreciated.

Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alibaba 2.0 and subPropertyOf

James Leigh-2
On Thu, 2014-03-27 at 09:50 -0700, ckapop wrote:

> Hello,
>
> I am using AliBaba 2.0 and really like it. I like the fact that you can use
> the owl compiler to build classes and then use the ObjectRepository to do
> things like:
>
> Result<Person> persons = con.getObjects(Person.class);
>
> This will return a collection of all Person and all sub classes of Person
> objects.
>
> I was hoping it would be possible to also do something like this:
>
> Set<University> universities = person.getDegreeFrom();
>
> In which you would get back a list of all University objects that have
> "degreeFrom" plus any other object properties that are a subclass of this
> property (rdfs:subPropertyOf). For example undergraduateDegreeFrom is a sub
> property of degreeFrom. However this doesn't seem to be the case. I have to
> call  person.undergraduateDegreeFrom () as  person.getDegreeFrom() doesn't
> follow the sub class trail.


If you setup the RDF store to using RDFS inferencing (bundled with
Sesame), subproperties will also be picked up.

Regards,
James


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Sesame-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sesame-general
Loading...