Terrorism is a line of inquiry after an army chaplain was stabbed in Ireland, police have confirmed.