Add a new relationship to the RELS-EXT for this object.
        Calls :meth:`API_M.addRelationship`.

        Example usage::

            isMemberOfCollection = 'info:fedora/fedora-system:def/relations-external#isMemberOfCollection'
            collection_uri = 'info:fedora/foo:456'
            object.add_relationship(isMemberOfCollection, collection_uri)

        :param rel_uri: URI for the new relationship
        :param obj: related object; can be :class:`DigitalObject` or string; if
                        string begins with info:fedora/ it will be treated as
                        a resource, otherwise it will be treated as a literal
        :rtype: boolean

def add_relationship(self, rel_uri, obj):
        """
        Add a new relationship to the RELS-EXT for this object.
        Calls :meth:`API_M.addRelationship`.

        Example usage::

            isMemberOfCollection = 'info:fedora/fedora-system:def/relations-external#isMemberOfCollection'
            collection_uri = 'info:fedora/foo:456'
            object.add_relationship(isMemberOfCollection, collection_uri)

        :param rel_uri: URI for the new relationship
        :param obj: related object; can be :class:`DigitalObject` or string; if
                        string begins with info:fedora/ it will be treated as
                        a resource, otherwise it will be treated as a literal
        :rtype: boolean
        """
        if isinstance(rel_uri, URIRef):
            rel_uri = force_text(rel_uri)

        obj_is_literal = True
        if isinstance(obj, DigitalObject):
            obj = obj.uri
            obj_is_literal = False
        elif (isinstance(obj, str) or isinstance(obj, six.string_types)) \
          and obj.startswith('info:fedora/'):
            obj_is_literal = False

        # this call will change RELS-EXT, possibly creating it if it's
        # missing. remove any cached info we have for that datastream.
        if 'RELS-EXT' in self.dscache:
            del self.dscache['RELS-EXT']
        self._ds_list = None

        return self.api.addRelationship(self.pid, self.uri, rel_uri, obj, obj_is_literal)