Well first if you weren't trespassing and since it was raining, you were just seeking shelter. I'd hire a lawyer and perhaps he'll make the case that they didn't really have the right to arrest you. I dunno.