Merge two XmlCtsWorkMetadata Objects.

        - Original (left Object) keeps his parent.
        - Added document overwrite text if it already exists

        :param other: XmlCtsWorkMetadata object
        :type other: CtsWorkMetadata
        :return: XmlCtsWorkMetadata Object
        :rtype XmlCtsWorkMetadata:

def update(self, other):
        """ Merge two XmlCtsWorkMetadata Objects.

        - Original (left Object) keeps his parent.
        - Added document overwrite text if it already exists

        :param other: XmlCtsWorkMetadata object
        :type other: CtsWorkMetadata
        :return: XmlCtsWorkMetadata Object
        :rtype XmlCtsWorkMetadata:
        """
        if not isinstance(other, CtsWorkMetadata):
            raise TypeError("Cannot add %s to CtsWorkMetadata" % type(other))
        elif self.urn != other.urn:
            raise InvalidURN("Cannot add CtsWorkMetadata %s to CtsWorkMetadata %s " % (self.urn, other.urn))

        for urn, text in other.children.items():
            self.texts[urn] = text
            self.texts[urn].parent = self
            self.texts[urn].resource = None

        return self