Hi Oliver,
unfortunately, I did not fully understand your question, so I consider
my answer to not fully satisfy your needs. Maybe it is useful to you to
further describe your situation?
Excerpts from Olivier Torres's message of 2013-12-31 16:35:34 +0100:
> i have the following type hierarchy, from the more general to the more
> specific :
> A1, A2, A3,
>
> and the rules :
> if A1 then B= "value1"
> if A2 then B= "value2"
> if A3 then B= "value3"
This is how I understand your structure:
Subject/Resource: B, Predicate/Property: equals, Object/RDFNode: A[1-3];
> When a triple matches with A3 then the rules infer the triples : B= "value1",
> B= "value2", B= "value3".
> In my use case i want only the deduced triple B= "value3",
> Is someone know how to implement this behavior ?
This is how I would gather all statements containing value3:
Property equals = yourModel.createPropery(yourEqualsNamespace,
yourEqualsLocalName);
RDFNode value3 = yourModel.createLiteral("value3");
StmtIterator statements = yourModel.listStatements(null, equals, value3);
while (statements.hasNext() ) {
System.out.println(statement.next())
}
I haven't tested the code but I hope, you get the idea.
Cheers,
Heinz