You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Rick Liao <ri...@capsenta.com> on 2018/08/23 21:06:54 UTC

Get Restriction as QualifiedRestriction

Hello,

I want to find all the cardinality restrictions in an ontology and know
their type (min, max, exact, and qualified or not). I am iterating through
all the restrictions in an OntModel. For each Restriction, I can check if
they are min, max, and exact and use "as..." methods to get the appropriate
class. However, there is no function to see if the Restriction is a
QualifiedRestriction. How do I check if a Restriction is a
QualifiedRestriction and how do I get it as a QualifiedRestriction if it is?

Thanks,
Rick

Re: Get Restriction as QualifiedRestriction

Posted by Rick Liao <ri...@capsenta.com>.
Got it. Thank you!

-Rick

On Fri, Aug 24, 2018 at 3:39 PM, Andy Seaborne <an...@apache.org> wrote:

> Qualified cardinality restrictions are a feature of OWL2.  Jena only has
> API support for OWl1. You can access as RDF look at it as triples to write
> your own inspector; not as pretty but if it is RDF you drop down to the
> triples.
>
>     Andy
>
>
> On 23/08/18 22:06, Rick Liao wrote:
>
>> Hello,
>>
>> I want to find all the cardinality restrictions in an ontology and know
>> their type (min, max, exact, and qualified or not). I am iterating through
>> all the restrictions in an OntModel. For each Restriction, I can check if
>> they are min, max, and exact and use "as..." methods to get the
>> appropriate
>> class. However, there is no function to see if the Restriction is a
>> QualifiedRestriction. How do I check if a Restriction is a
>> QualifiedRestriction and how do I get it as a QualifiedRestriction if it
>> is?
>>
>> Thanks,
>> Rick
>>
>>


-- 
Rick Liao
Capsenta Inc. | Austin, TX
rick@capsenta.com

Re: Get Restriction as QualifiedRestriction

Posted by Andy Seaborne <an...@apache.org>.
Qualified cardinality restrictions are a feature of OWL2.  Jena only has 
API support for OWl1. You can access as RDF look at it as triples to 
write your own inspector; not as pretty but if it is RDF you drop down 
to the triples.

     Andy

On 23/08/18 22:06, Rick Liao wrote:
> Hello,
> 
> I want to find all the cardinality restrictions in an ontology and know
> their type (min, max, exact, and qualified or not). I am iterating through
> all the restrictions in an OntModel. For each Restriction, I can check if
> they are min, max, and exact and use "as..." methods to get the appropriate
> class. However, there is no function to see if the Restriction is a
> QualifiedRestriction. How do I check if a Restriction is a
> QualifiedRestriction and how do I get it as a QualifiedRestriction if it is?
> 
> Thanks,
> Rick
>