'Main method, to be set for the "deduplicate" hook
@param item: the S3ImportItem'

@classmethod
def duplicate(cls, item):

    try:
        duplicate_id = cls.identify(item)
    except ValueError:
        error = ('Ambiguous    data,    try    specifying    parent    organisation:    %s' % item.data.get('name'))
        item.accepted = False
        item.error = error
        if (item.element is not None):
            item.element.set(current.xml.ATTRIBUTE['error'], error)
        return
    if duplicate_id:
        item.id = duplicate_id
        item.method = item.METHOD.UPDATE
