You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by reda chbihi <ch...@gmail.com> on 2013/01/11 17:25:30 UTC

Creating a reflexive Property

Hi all,

I wanna create some object properties that are reflexive, with JENA,
I don't found any method that can perform that !!

how can I do that with JENA ?

thank you
regards,

-- 
Mohammed Reda CHBIHI LOUHDI
Phd Student - FSDM Fez
IEEE Morocco Section Student Branches Coordinator
E-mails : r.chbihi@ieee.ma / chbihi@uca.ma

Re: Creating a reflexive Property

Posted by reda chbihi <ch...@gmail.com>.
HI,

Thank you for your help,
I use the same method (addProperty) on an ObjectProperty object, like the
following :

ObjectProperty op =
model.createObjectProperty(mypropURI).addProperty(RDF.type,
OWL2.ReflexiveProperty));

regards



2013/1/12 Dave Reynolds <da...@gmail.com>

> On 11/01/13 16:25, reda chbihi wrote:
>
>> Hi all,
>>
>> I wanna create some object properties that are reflexive, with JENA,
>> I don't found any method that can perform that !!
>>
>> how can I do that with JENA ?
>>
>
> Reflexive is an OWL 2 feature and Jena's built-in helper methods only
> support OWL 1. However it is easy to create the requisite RDF syntax for
> this:
>
>     Property myprop = model.createResource(**mypropURI)
>                         .addProperty(RDF.type, OWL2.ReflexiveProperty);
>
> Dave
>
>


-- 
Mohammed Reda CHBIHI LOUHDI

Re: Creating a reflexive Property

Posted by Dave Reynolds <da...@gmail.com>.
On 11/01/13 16:25, reda chbihi wrote:
> Hi all,
>
> I wanna create some object properties that are reflexive, with JENA,
> I don't found any method that can perform that !!
>
> how can I do that with JENA ?

Reflexive is an OWL 2 feature and Jena's built-in helper methods only 
support OWL 1. However it is easy to create the requisite RDF syntax for 
this:

     Property myprop = model.createResource(mypropURI)
                         .addProperty(RDF.type, OWL2.ReflexiveProperty);

Dave