Purge of object not cleaning up corresponding RELS-EXT statements

Project:RUcore dlr/EDIT
Category:bug report

When purging an object if any RELS-EXT statements exist to other objects in the repository those objects RELS-EXT statements are not be deleted.

The following is an example:
rutgers-lib:1234 is an analytic
rutgers-lib:5678 is a video used in the analytic

RELS-EXT statements that exist:
rutgers-lib:1234 -> isAnalyticOf -> rutgers-lib:5678
rutgers-lib:1234 <- hasAnalytic <- rutgers-lib:5678

When purging analytic rutgers-lib:1234 the second statement in rutgers-lib:5678 still exists.
rutgers-lib:1234 <- hasAnalytic <- rutgers-lib:5678

This is a reference to a now nonexistent object.



The purgeRelationship method is supposed to create a new, cleaned rdf version, but may leave older versions in place in the text of the object. I'm not sure what the problem is yet. I'll check out these objects - assuming they are real.


For a real example ingest a test object. Find another object and create a relationship between the two. Now purge the test object. If you look at the other object you will still see the relationship reference to the newly purged test object.


Oh. I get it now. I thought you were talking about purgeRelationship, but you meant purge object. I wish they would do that automatically, but we may have to add some logic to the purge functions. Since we will have to do that for the RARCH and streaming datastreams anyway, it seems a good time to work on them all together.


You should be able to use the delete method of the relationship API. I think if you pass it the rutgers-lib: of the object being purged before you purge it, a pre-purge, it will do all of the cleanup in both directions.

<a href="http://lefty64.scc-net.rutgers.edu/rucore/api/relationship/doc/#method-delete" title="http://lefty64.scc-net.rutgers.edu/rucore/api/relationship/doc/#method-delete">http://lefty64.scc-net.rutgers.edu/rucore/api/relationship/doc/#method-d...</a>


Status:active» test

It wasn't working on Friday, but seems to be working now and is ready to test with purges with and without the handle too. Thanks to any elves who worked over the weekend;-)


Version:5-x» 6.1
Status:test» closed

Appears to be fixed.

Back to top