This listener does not work if the result of change to the model is due to rule checking. i.e. assume I have this rule: @ prefix af: <http://personont.org/person#>. .... [GetAge (?a rdf:type af:Person) (?a af:hasBirthDate ?b) getAge(?b,?d)->(?a af:hasAge ?d)]
getAge() is a built-in that is attached to the model. When I query the individuals they have "hasAge" property with the correct value associated with their birthdates. However, the listener is not triggered when this change happens at the rule level. Thanks for your help, -P. On Wednesday, November 6, 2013 6:55 AM, Chris Dollin <[email protected]> wrote: On Wednesday, November 06, 2013 05:21:23 PM Dibyanshu Jaiswal wrote: > I feel if you register the model with a change listener as disscussed > earlier, like: model.register(changeListener); which has proper > implementation of the abstrat methods defined in ModelChangedListener > (atleast for Statementadded()), you will be able to detect every changes > made to your model. "rule checking" suggests inference, which suggests a base model and a deductions model, which suggests there are two models, only one of which is updated -- if that's the listened-to model, everything will be quiet. Too quiet. Hence my request to show code ... Chris > On Tue, Nov 5, 2013 at 8:28 PM, Chris Dollin > <[email protected]>wrote: > > > On Tuesday, November 05, 2013 06:53:17 AM Parastoo Delgoshaei wrote: > > > Claude, > > > Thanks for your response. This solution works only if you have hard > > coded add/removal statements (i.e. model.add( S, P, O2 ); or > > model.remove(s);) However, I do not see any add and removal notifications > > as a result of rule checking. The model certainly has changed I see it in > > the print out after the rule checking. However, the listener does not > > recognize this add/remove. > > > > > > Your help is appreciated, > > > > Show code. > > > > (Are you listening to the model that's being changed?) > > > > Chris > > > > -- > > "The wizard seemed quite willing when I talked to him." /Howl's Moving > > Castle/ > > > > Epimorphics Ltd, http://www.epimorphics.com > > Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 > > 6PT > > Epimorphics Ltd. is a limited company registered in England (number > > 7016688) > > > > > > > -- "I don't want to know what the Structuralists think! I want /Archer's Goon/ to know what YOU think!" Epimorphics Ltd, http://www.epimorphics.com Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Epimorphics Ltd. is a limited company registered in England (number 7016688)
