Rotor and IBA description of proton and neutron alignment in the Ba and Ce isotopes