ok, I found the error. It's quite embarassing. Somehow the output of the
model got *before* addProperty.
Sorry for that one!
Bye Dennis
Am 30.09.2011 16:50, schrieb Dave Reynolds:
On Fri, 2011-09-30 at 15:58 +0200, Dennis Patzer wrote:
Hello folks,
I have a problem with the following code:
Individual eventIndividual =
eventOntModel.getIndividual(instanceNamespace + eventType);
eventIndividual.addProperty(hasState, inactiveOntResource);
The problem is, that after the addProperty-call, no property is added :-(
That seems unlikely, addProperty definitely works.
The most common cause of problems over addProperty is to apply it to a
Resource which is associated with a different Model from what you
intended. In your case you will be adding to eventOntModel which is
presumably what you want.
The way to debug this is to write a minimal test case to just check that
operation in the way you are using it. The chances are that in doing
that you will spot the problem. If not then you will have a complete
minimal example you can post to see if anyone else can spot it.
Dave