They got that one straight out of the Penguin Book of English Folk Songs: see the link Wolfgang gave above, where the text and notes are already quoted in full. The song is an allegory, and probably no more than that, though it certainly is an interesting one.
Malcolm