Graph: add setDirection and getDirection methods + all needed specs.