Andriy,

>>> By writing some Java-Code in TBC I want to make tests, if some new
>>> Predicate-Object-pairs on a particular Subject would violate some spin
>>> constraints on this Subject. For this purpose, I remember old pairs,
>>> switch-off change engine (setIgnoreMode(true), i dont want that it
>>> fires changes and writes it into undo/redo), replase old with new ones
>>> (delete 4 + add 4 pairs), check the changed model with
>>> SPINConstraints.check(), then replace new P-O-pairs again with the old
>>> ones ( 4+4), and switch change engine on again. So I make 16(!) change
>>> operations for 4
>>> properties just to test it. May be there is a way I can do this check
>>> much more efficiently? Or, second possibility, how can I achieve TBC
>>> dont rebuild its views on this checks?

creating temporary changes will be a mess, and I don't recommend that.

But you can use the class BufferingGraph (or BufferingMemGraphRegistryGraph) 
for that. Wrap each of the graphs that you want to change with a 
BufferingGraph, and then just add and delete triples from that. This will not 
change the underlying graph, but only pretend that the changes were there. Then 
run the SPIN API calls on a Model that uses the BufferingGraph(s) instead of 
the real ones, to do the constraint checking.

Cheers
Holger

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to