I think the swabs that are applied to checked luggage are just there to pick up any chemicals that are on the outside of your bag. Then, the swab is used to provide a sample for a mass spectrometer, which is an instrument that uses high energy and magnetic fields to break apart molecules into characteristic fragments.
As far as I know, the swab is just a device for sampling. I think the devices at checkpoints are the same.