JenaBeans annotations

9 views
Skip to first unread message

Stefano Bragaglia

unread,
Nov 10, 2009, 5:32:04 AM11/10/09
to jenabean-dev
Good morning,
I'm working on putting together ontology reasoning with a rule engine
like Drools.
Drools needs JavaBeans to work and JenaBeans are perfect since they
can be used in both cases!

I read in past messages that some sort of support to property type
annotation was once available (I'm talking about @InverseOf
annotation) but actually I didn't found any reference in group's pages
even though the feature was planned to be introduced again... Could
you please tell me what's the current state of the feature?

Since I have to work with OWL Ontologies, I would find very usefull
some other property type annotation such as @Symmetric and @Transitive
(and so on) without needing to issue model.createSymmetricProperty
(uri); and model.createTransitiveProperty(uri); every time I create a
new Model...

Do you plan to include such annotations in (near) future?
Can you also please list all the annotations supported by JenaBeans (I
also read about @Transient and @Ignore)?

Thank you in advance and sorry for poor English, but today my brain
fails to start up!
Best regards,
Stefano Bragaglia



thewebs...@gmail.com

unread,
Nov 16, 2009, 12:53:24 PM11/16/09
to jenabean-dev
Hi Stefano,

Yes, there is some support. I'll provide you with details shortly,
however, it's also simple to make the assertion yourself, via RDF
loaded into the model.

On Nov 10, 4:32 am, Stefano Bragaglia <stefano.bragag...@gmail.com>
wrote:

thewebs...@gmail.com

unread,
Nov 21, 2009, 12:13:56 PM11/21/09
to jenabean-dev
Stefano,

See http://code.google.com/p/jenabean/source/browse/trunk/basic/src/test/java/test/bean/SymmetricBean.java

@RdfProperty(value = "http://jenabean.com/isNextTo", symmetric = true)

This causes the "nextTo" property to be declared as symmetric, and if
you model is inferencing, it'll make the assumptions for you and add
the reverse assertion. There is also support for transitive and
inverse.

http://code.google.com/p/jenabean/source/browse/trunk/basic/src/test/java/test/bean/TestInverse.java
http://code.google.com/p/jenabean/source/browse/trunk/basic/src/test/java/test/bean/Apple.java

@RdfProperty(inverseOf="apples")
public Collection<Orange> getOranges() {
return oranges;
}

says that Apple.getOranges is the inverse of Orange.getApples.

On Nov 10, 4:32 am, Stefano Bragaglia <stefano.bragag...@gmail.com>
wrote:

Stefano Bragaglia

unread,
Dec 15, 2009, 10:16:07 AM12/15/09
to jenabean-dev
Thanks for your kind reply!

Best regards,
Stefano
Reply all
Reply to author
Forward
0 new messages