Chemical and surface core-level shifts of barium