[Pellet-users] Retrieve all ranges of an object property

Evren Sirin evren at clarkparsia.com
Thu Jan 31 18:07:30 UTC 2008


On 1/24/08 1:50 PM, Christiane Telöken wrote:
> Hi,
>
> I am using Jena and Pellet to retrieve all statements contained in my 
> ontology (see attachment).
>
> This works pretty fine unless there is a property that has more than 
> just one range.
>
> Could anybody help me in figuring out all of the possible ranges of an 
> object property?

This is probably related to the known bug explained in [1]:

* Retrieving the domains or ranges of a property do not return complete 
answers

Queries to retrieve the domains or ranges of a property are not guranteed to
return complete answers. Mostly the results contain only a variation of 
asserted domains/ranges. For example, domain/range of sub/super properties 
are propogated in the role hierarchy but their sub/super classes are not 
included in the results.


If not, can you tell specifically which range is missing for which property? Complete and minimal code to reproduce the results would make things much easier.


>
> Moreover I am not yet able to retrieve all subproperties of an property.
>
> ################################################################################### 
>
> The following datastructures are already filled correctly:
>
>
>   // List containing individuals
>   static ArrayList <Individual> indivResources = new ArrayList 
> <Individual> ();
>
>   // List containing object properties
>   static ArrayList <Property> objPropertyResources = new ArrayList 
> <Property> ();
>
> This is the way I am trying to retrieve all the statements:
>
>     Property prop;
>     Statement stmt;
>
>     for (int i = 0; i < indivResources.size(); i++){
>       for (int j = 0; j < objPropertyResources.size(); j++){
>         prop = objPropertyResources.get(j);
>
>         stmt = indivResources.get(i).getProperty(prop);
>         statementResources.add(stmt);
>       }
>     }
>
> As mentioned above, this works for all cases except the one if an 
> property has more than just one range.

What is not working? An exception occurs or missing results? Again 
complete and minimal code that shows the problem would help. With code 
fragments like this it is very hard for us to figure out what is going 
on and what is the expected beahvior.

Cheers,
Evren

[1] 
http://svn.versiondude.net/clark-parsia/pellet-devel/tags/release-1.5.1/BUGS.txt

>
>
> I would be very glad for any hint that helps me with my questions.
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
>
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/



More information about the Pellet-users mailing list