You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by tasos martidis <ma...@yahoo.gr> on 2013/10/15 11:16:25 UTC
Jena listDomain method
Dear all,
I am working with Jena for a project in my university. I read an ontology into an OntModel and I use Jena methods to retrieve information.
The problemI face is, that when a property has multiple domains, the listDomains method does not return the names of the OntClasses. It returns a result such as : -26ae10e7:141bb413933:-7fbb.
I use SPARQL to query my OntModel and the results are the same. I only guess that this is an anonymous node and the multiple Classes that are domains, are under this "-26ae10e7:141bb413933:-7fbb"?
Can I get the names/URIs of the classes?
I am sorry if this issue is discussed earlier, I searched the archive a bit, but did not find anything similar.
Regards,
Tasos
Σχετ: Σχετ: Jena listDomain method
Posted by tasos martidis <ma...@yahoo.gr>.
You are right, it worked!
Thanks a lot Dave for the fast response and the valuable input.
Regards,
Tasos
________________________________
Απο: Dave Reynolds <da...@gmail.com>
Προς: users@jena.apache.org
Στάλθηκε: 2:35 μ.μ. Τρίτη, 15 Οκτωβρίου 2013
Θέμα: Re: Σχετ: Jena listDomain method
Unions in OWL are represented as (anonymous) union classes. Since you
are using the OntAPI then you can use OntClass's isUnionClass() to test
for this then use asUnionClass() to get the convenience wrapper from
which you can do things list listOperands().
Dave
On 15/10/13 10:35, tasos martidis wrote:
> Hi all,
>
> just an update. The method performs as it is supposed when we have multiple domains after all. The problem is caused when the domain is an expression such as: ClassA or ClassB. I will try to find how I can get the classes in this case.
>
> Regards,
> Tasos
>
>
>
>
> ________________________________
> Απο: tasos martidis <ma...@yahoo.gr>
> Προς: "users@jena.apache.org" <us...@jena.apache.org>
> Στάλθηκε: 11:16 π.μ. Τρίτη, 15 Οκτωβρίου 2013
> Θέμα: Jena listDomain method
>
>
> Dear all,
>
>
> I am working with Jena for a project in my university. I read an ontology into an OntModel and I use Jena methods to retrieve information.
>
> The problemI face is, that when a property has multiple domains, the listDomains method does not return the names of the OntClasses. It returns a result such as : -26ae10e7:141bb413933:-7fbb.
>
> I use SPARQL to query my OntModel and the results are the same. I only guess that this is an anonymous node and the multiple Classes that are domains, are under this "-26ae10e7:141bb413933:-7fbb"?
>
> Can I get the names/URIs of the classes?
>
> I am sorry if this issue is discussed earlier, I searched the archive a bit, but did not find anything similar.
>
>
> Regards,
> Tasos
>
Re: Σχετ: Jena listDomain method
Posted by Dave Reynolds <da...@gmail.com>.
Unions in OWL are represented as (anonymous) union classes. Since you
are using the OntAPI then you can use OntClass's isUnionClass() to test
for this then use asUnionClass() to get the convenience wrapper from
which you can do things list listOperands().
Dave
On 15/10/13 10:35, tasos martidis wrote:
> Hi all,
>
> just an update. The method performs as it is supposed when we have multiple domains after all. The problem is caused when the domain is an expression such as: ClassA or ClassB. I will try to find how I can get the classes in this case.
>
> Regards,
> Tasos
>
>
>
>
> ________________________________
> Απο: tasos martidis <ma...@yahoo.gr>
> Προς: "users@jena.apache.org" <us...@jena.apache.org>
> Στάλθηκε: 11:16 π.μ. Τρίτη, 15 Οκτωβρίου 2013
> Θέμα: Jena listDomain method
>
>
> Dear all,
>
>
> I am working with Jena for a project in my university. I read an ontology into an OntModel and I use Jena methods to retrieve information.
>
> The problemI face is, that when a property has multiple domains, the listDomains method does not return the names of the OntClasses. It returns a result such as : -26ae10e7:141bb413933:-7fbb.
>
> I use SPARQL to query my OntModel and the results are the same. I only guess that this is an anonymous node and the multiple Classes that are domains, are under this "-26ae10e7:141bb413933:-7fbb"?
>
> Can I get the names/URIs of the classes?
>
> I am sorry if this issue is discussed earlier, I searched the archive a bit, but did not find anything similar.
>
>
> Regards,
> Tasos
>
Σχετ: Jena listDomain method
Posted by tasos martidis <ma...@yahoo.gr>.
Hi all,
just an update. The method performs as it is supposed when we have multiple domains after all. The problem is caused when the domain is an expression such as: ClassA or ClassB. I will try to find how I can get the classes in this case.
Regards,
Tasos
________________________________
Απο: tasos martidis <ma...@yahoo.gr>
Προς: "users@jena.apache.org" <us...@jena.apache.org>
Στάλθηκε: 11:16 π.μ. Τρίτη, 15 Οκτωβρίου 2013
Θέμα: Jena listDomain method
Dear all,
I am working with Jena for a project in my university. I read an ontology into an OntModel and I use Jena methods to retrieve information.
The problemI face is, that when a property has multiple domains, the listDomains method does not return the names of the OntClasses. It returns a result such as : -26ae10e7:141bb413933:-7fbb.
I use SPARQL to query my OntModel and the results are the same. I only guess that this is an anonymous node and the multiple Classes that are domains, are under this "-26ae10e7:141bb413933:-7fbb"?
Can I get the names/URIs of the classes?
I am sorry if this issue is discussed earlier, I searched the archive a bit, but did not find anything similar.
Regards,
Tasos