W3C home > Mailing lists > Public > www-rdf-comments@w3.org > October to December 2000

SiRPAC, SetOperations side effects

From: Christian Hansen <3hansen@informatik.uni-hamburg.de>
Date: Wed, 22 Nov 2000 13:13:49 +0100
Message-ID: <3A1BB87D.D0FC380B@informatik.uni-hamburg.de>
To: www-rdf-comments@w3.org

I'm writing some test-classes for parsing and retrieving literals from a
RDF data source. 
I use SiRPAC as api and its quite easy to use and works well, but i
encountered a little problem.
In the SetOperations are some handy methods to handle models as sets
like: union, intersection
and difference. The difference method use a "flat" object copy (the
duplicate() method) from the 
first model to create a temp model and subtracts the second from it.
This changes the orginal
model too, so it's a unwanted side effect. 
It is not a very serious problem and it's easy to fix or make a
workaround, but if someone 
use this classes without looking in the source code may get weird
problems (like i did).
Eventually it makes sense to add a method that create deep object copys
from the Model.
Maybe the SetModel class is better to do set operations with models but
this is just an
interface with no implementations.

If this problem is known or listed in the buglist i'm sorry, but i
didn't find it there.

Best regards,

Christian Hansen

University of Hamburg, Germany
Distributed Systems Group
Received on Wednesday, 22 November 2000 07:13:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:54 UTC