Strangely enough there is a bug if this is correct.

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

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
L has no notifications

But in reality M.contains(S2) = T  and there are some notifications.

I will have the complete suite of Statement tests done this evening.  And
check it all in, even though it doesn't all work yet.


On Tue, Oct 8, 2013 at 8:55 AM, Chris Dollin
<[email protected]>wrote:

> 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)
>
>


-- 
I like: Like Like - The likeliest place on the web<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to