'Add the record to the export map, and update the
reference map with the record\'s references
@param record: the record
@param rmap: the reference map of the record
@param reference_map: the reference map of the request
@param export_map: the export map of the request'

def __map_record(self, record, rmap, reference_map, export_map):

    tablename = self.tablename
    record_id = record[self.table._id]
    if rmap:
        reference_map.extend(rmap)
    if (tablename in export_map):
        export_map[tablename].append(record_id)
    else:
        export_map[tablename] = [record_id]
    return
