On 07/10/13 09:48, Chris Dollin wrote:
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.

What's more, surely it's the case that (= I'd expect)

M empty
S = M.createStatement(s,p,o)    // before add(S)
M.contains(S) = F
S.getModel() = M

        Andy


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


Reply via email to