If I am reading the question correctly, I think a question that should be asked is, "Is the transfer switch breaking the neutral conductor?" If so, then the Gen. is a Seperatly Derived system. If not, then the transfer switch and equipment can use the grounding from the original building.