On Monday, October 07, 2013 07:44:43 PM Claude Warren wrote: > Assume a Model M containing one Statement S composed of s,p,o. > Assume M has a listener L > Assume a Statement S composed of s,p,o that is of Model M but not in Model > M. > > the expected state is > M.contains(S) = F > S.getModel() = M > s.getModel() = M > p.getModel() = M > o.getModel() = M
Yes. > assume S2 = S.changeLiteralObject( o2 ); > is the expected state > M.contains(S) = F > M.contains(S2)=F > S.getModel()= M > S2.getModel()=M > s.getModel() = M > p.getModel() = M > o.getModel() = M > o2.getModel() = M Yes. > L has no notifications Hmm. There's an implied delete of the old statement, isn't there? I'll have to check the code. > Now assume the same initial state except that S is in M so that > the expected state is > M.contains(S) = T > S.getModel() = M > s.getModel() = M > p.getModel() = M > o.getModel() = M > > assume S2 = S.changeLiteralObject( o2 ); > is the expected state > M.contains(S) = F > M.contains(S2)=T Yes. changeObject() updates the model. > S.getModel()= M > S2.getModel()=M > s.getModel() = M > p.getModel() = M > o.getModel() = M > o2.getModel() = M Yes, resources and literals and statements are (still) immutable. > L has been notified of "remove" S and add S2 I think so. I'm surprised there aren't already tests for that. Chris -- "It is seldom good news." ~Crystal Ball~, /The Tough Guide to Fantasyland/ 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)