What's the whack job doing still on the property??!?! If he's not a leasee of an apartment, then management should have him arrested for trespass if he refuses to leave. If they don't, this may be a good way for her to break any sort of lease aggrement she has, if that's an issue. (Failure on there part to maintain safety)
Is this guy mental or a substance abuser? Do they still do that 72 hr 'observation' hold at the county psych ward?
I do think the officer went slightly overboard. He didn't know you or what you may have intended to do, so he jumped a bit hard. He could have just asked politely for you to take your weapon inside instead of snatching it and getting pissy.