On Monday, October 07, 2013 09:24:19 AM Claude Warren wrote: > Assume a Model M containing one Statement S composed of s,p,o. > > the expected state is > M.contains(S) = T > S.getModel() = M > s.getModel() = M > p.getModel() = M > o.getModel() = M > > assume M.remove(S) is called. > what is the expected state? > M.contains(S) = F
Yes. > S.getModel()= ? > s.getModel() = ? > p.getModel() = ? > o.getModel() = ? All M. Removing a statement from a model doesn't change the statement. It also doesn't change the component Resources. > Assume a Model M containing 2 Statements S1 comprising s1,p,o1 and S2 > comprising s2, p, o2 > > the expected state is > M.contains(S1) = T > M.contains(S2) = T > S1.getModel() = M > S2.getModel() = M > s1.getModel() = M > p.getModel() = M > o1.getModel() = M > s2.getModel() = M > o2.getModel() = M > > assume M.remove(S1) is called. > what is the expected state? > M.contains(S1) = F > M.contains(S2) = T Yes. > S1.getModel()= ? > S2.getModel()= ? M. > s1.getModel() = ? M. > p.getModel() = M Yes. > o1.getModel() = ? M. > s2.getModel() = M > o2.getModel() = M Yesyes. > Finally, Is there any difference between calling M.remove(S1) and > M.remove( s1, p, o1)? Yes, you pass different argument. But the statement is removed in both cases. Chris -- "You're down as expendable. You don't get a weapon." /Dark Lord of Derkholm/ 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)