I do not think this James' parents were Thomas Cochrane and Ann Kerr. Their son James died 17 June 1824 in Glasgow. He had one daughter, Margaret. The names Edward and Edmund are unknown in the family. I base this surmise on entries in a large family bible.