Cuba says it has restored formal relations with Spain , a year after the European Union imposed diplomatic sanctions on the communist island .