'Process document metadata'

def extract_data(self, metadata):

    if (u'error' in metadata):
        raise self.SourceError(u'Error    fetching    metadata    for    %s:    %s', self.source_path(), metadata[u'error'])
    resources = []
    if (self.translations and metadata[u'translations']):
        options = self.current_options()
        del options[u'translations']
        for translation in metadata[u'translations']:
            url = self.decode_href(translation[u'url'])
            resources.append((u'document', url, options))
    return resources
