Vector bundle and principal bundle correspondence for groupoids