emory-libraries/eulfedora — pull request #8 by ghukill (2014-08-01 19:17:24+00:00)
Title: added method purge_relationship() and modify_relationship() to DigiObject

added method purge_relationship() and modify_relationship() to DigitalObject - while accessible through the API, it might be nice to have these methods available for DigitalObjects.

**purge_relationship()** is an almost identical copy of add_relationship, purging of course.

**modify_relationship()** is a hybrid of the two, as there is no native modifyRelationship() in Fedora's API. This method purges the original predicate / object, then adds a new one with the same predicate. If either step fails, reverts to previous and returns False, otherwise returns True.