I think an even shorter version should work, as most Resource methods
follow the builder pattern:
negativePropertyAssertion.addProperty(OWL2.assertionProperty, hasPropertyR).
addProperty(OWL2.sourceIndividual, sourceIndividual).
addProperty(OWL2.targetIndividual, targetIndividual);
On Mon, Jan 26, 2015 at 7:56 PM, Joshua TAYLOR <[email protected]> wrote:
> On Mon, Jan 26, 2015 at 1:33 PM, Abeyruwan, Saminda Wishwajith
> <[email protected]> wrote:
>> Property assertionProperty = OWL2.assertionProperty;
>> Property sourceIndividual = OWL2.sourceIndividual;
>> Property targetIndividual = OWL2.targetIndividual;
>> negativePropertyAssertion.addProperty(assertionProperty,
>> hasPropertyR);
>> negativePropertyAssertion.addProperty(sourceIndividual,
>> sourceIndividual);
>> negativePropertyAssertion.addProperty(targetIndividual,
>> targetIndividual);
>
> Just as a note, you don't need to assign the properties to variables
> in advance. You could just do:
>
> negativePropertyAssertion.addProperty(OWL2.assertionProperty,
> hasPropertyR);
> negativePropertyAssertion.addProperty(OWL2.sourceIndividual,
> sourceIndividual);
> negativePropertyAssertion.addProperty(OWL2.targetIndividual,
> targetIndividual);
>
> //JT
>
>
>
>
>
> --
> Joshua Taylor, http://www.cs.rpi.edu/~tayloj/